From abd6dd1143fb7a7254670e5bbe4f08c4c525a5bc Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Tue, 10 Nov 2020 21:45:26 +0900 Subject: [PATCH] Wrapping super.onDestroy in try-catch in MainActivity to workaround NavController crash --- .../java/awais/instagrabber/activities/MainActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/awais/instagrabber/activities/MainActivity.java b/app/src/main/java/awais/instagrabber/activities/MainActivity.java index cb188e8c..cf225525 100644 --- a/app/src/main/java/awais/instagrabber/activities/MainActivity.java +++ b/app/src/main/java/awais/instagrabber/activities/MainActivity.java @@ -220,7 +220,11 @@ public class MainActivity extends BaseLanguageActivity implements FragmentManage @Override protected void onDestroy() { - super.onDestroy(); + try { + super.onDestroy(); + } catch (Exception e) { + Log.e(TAG, "onDestroy: ", e); + } unbindActivityCheckerService(); }