From 0dc49ba273c6f0458aa90eae8e905bfa84bf1012 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Mon, 12 Jul 2021 21:28:08 +0900 Subject: [PATCH] Call delete stacktrace files function off the main thread. --- app/src/main/java/awais/instagrabber/utils/FlavorTown.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/awais/instagrabber/utils/FlavorTown.java b/app/src/main/java/awais/instagrabber/utils/FlavorTown.java index ea0b26e6..006b7f96 100755 --- a/app/src/main/java/awais/instagrabber/utils/FlavorTown.java +++ b/app/src/main/java/awais/instagrabber/utils/FlavorTown.java @@ -86,7 +86,7 @@ public final class FlavorTown { settingsHelper.putString(Constants.APP_UA, appUa); final String browserUa = UserAgentUtils.generateBrowserUA(browserUaCode); settingsHelper.putString(Constants.BROWSER_UA, browserUa); - CrashReporterHelper.deleteAllStacktraceFiles(context); + AppExecutors.INSTANCE.getDiskIO().execute(() -> CrashReporterHelper.deleteAllStacktraceFiles(context)); Toast.makeText(context, R.string.updated, Toast.LENGTH_SHORT).show(); settingsHelper.putInteger(Constants.PREV_INSTALL_VERSION, BuildConfig.VERSION_CODE); }