Changed: Check crash log file whenever TermuxActivity is resumed instead of only on app startup

This adds onto 06dbfbdb since receiver would not be registered to receive `ACTION_NOTIFY_APP_CRASH` if `TermuxActivity` was not be in foreground
This commit is contained in:
agnostic-apollo
2022-03-16 21:22:38 +05:00
parent 477b36acd1
commit cc58ddde31

View File

@@ -200,11 +200,6 @@ public final class TermuxActivity extends AppCompatActivity implements ServiceCo
if (savedInstanceState != null)
mIsActivityRecreated = savedInstanceState.getBoolean(ARG_ACTIVITY_RECREATED, false);
// Check if a crash happened on last run of the app or if a plugin crashed and show a
// notification with the crash details if it did
TermuxCrashUtils.notifyAppCrashFromCrashLogFile(this, LOG_TAG);
// Delete ReportInfo serialized object files from cache older than 14 days
ReportActivity.deleteReportInfoFilesOlderThanXDays(this, 14, false);
@@ -316,6 +311,10 @@ public final class TermuxActivity extends AppCompatActivity implements ServiceCo
if (mTermuxTerminalViewClient != null)
mTermuxTerminalViewClient.onResume();
// Check if a crash happened on last run of the app or if a plugin crashed and show a
// notification with the crash details if it did
TermuxCrashUtils.notifyAppCrashFromCrashLogFile(this, LOG_TAG);
mIsOnResumeAfterOnCreate = false;
}