diff options
| author | 2020-03-19 15:36:57 +0100 | |
|---|---|---|
| committer | 2020-03-21 14:08:25 +0000 | |
| commit | c94965914ac3e7fe77113c7da440da2f3ece7879 (patch) | |
| tree | d0c77dcb9ed9c4f337ae9147331b09967970c24d | |
| parent | 58e8d270a7585bdcb4aefa56074f2b36043c2cc2 (diff) | |
Let Home activity restart during first few crashes
After we get to the rate-limit, we wind up on the
"Home App keeps stopping
App info
Close app"
screen like we're supposed to.
Bug: 148087283
Test: adb shell kill -11 `adb shell pidof {launcher}`
Change-Id: I85874c2e4ad7098f87f1dbe6d0430b244852478b
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityStack.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityStack.java b/services/core/java/com/android/server/wm/ActivityStack.java index e8bfe8ef63ac..1feea1f20318 100644 --- a/services/core/java/com/android/server/wm/ActivityStack.java +++ b/services/core/java/com/android/server/wm/ActivityStack.java @@ -2588,6 +2588,13 @@ class ActivityStack extends Task { if (r == null || r.app != app) { 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 " + r.intent.getComponent().flattenToShortString()); Task finishedTask = r.getTask(); |