Merge "Let Home activity restart during first few crashes" into rvc-dev am: d0db17a1c2

Change-Id: If3e1987728588aad0efed692f1a99f934bac8c83
This commit is contained in:
TreeHugger Robot
2020-03-25 17:40:58 +00:00
committed by Automerger Merge Worker

View File

@@ -2572,6 +2572,13 @@ class ActivityStack extends Task {
if (r == null || r.app != app) { if (r == null || r.app != app) {
return null; return null;
} }
if (r.isActivityTypeHome() && mAtmService.mHomeProcess == app) {
// Home activities should not be force-finished as we have nothing else to go
// back to. AppErrors will get to it after two crashes in MIN_CRASH_INTERVAL.
Slog.w(TAG, " Not force finishing home activity "
+ r.intent.getComponent().flattenToShortString());
return null;
}
Slog.w(TAG, " Force finishing activity " Slog.w(TAG, " Force finishing activity "
+ r.intent.getComponent().flattenToShortString()); + r.intent.getComponent().flattenToShortString());
Task finishedTask = r.getTask(); Task finishedTask = r.getTask();