fix(youtube/return-youtube-dislike): gracefully exit if Vanced MicroG is missing or not running (#303)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
LisoUseInAIKyrios 2023-01-22 23:22:02 +04:00 committed by GitHub
parent 0127e7251c
commit 03764bcc65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,9 @@ public class MicroGSupport {
} catch (PackageManager.NameNotFoundException exception) {
LogHelper.printException(() -> ("Vanced MicroG was not found"), exception);
startIntent(context, VANCED_MICROG_DOWNLOAD_LINK, str("microg_not_installed_warning"));
// Gracefully exit the app, so it does not crash.
System.exit(0);
}
try (var client = context.getContentResolver().acquireContentProviderClient(VANCED_MICROG_PROVIDER)) {