From 03764bcc651c6b723a999a58ed9cc9d253075905 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Sun, 22 Jan 2023 23:22:02 +0400 Subject: [PATCH] fix(youtube/return-youtube-dislike): gracefully exit if Vanced MicroG is missing or not running (#303) Co-authored-by: oSumAtrIX --- .../java/app/revanced/integrations/patches/MicroGSupport.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/app/revanced/integrations/patches/MicroGSupport.java b/app/src/main/java/app/revanced/integrations/patches/MicroGSupport.java index 2d146742..327c8790 100644 --- a/app/src/main/java/app/revanced/integrations/patches/MicroGSupport.java +++ b/app/src/main/java/app/revanced/integrations/patches/MicroGSupport.java @@ -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)) {