diff options
Diffstat (limited to 'services')
| -rw-r--r-- | services/core/java/com/android/server/am/ActivityStack.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index b51f862..c3343f5 100644 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -3054,6 +3054,8 @@ final class ActivityStack { * representation) and cleaning things up as a result of its hosting * processing going away, in which case there is no remaining client-side * state to destroy so only the cleanup here is needed. + * + * Note: Call before #removeActivityFromHistoryLocked. */ final void cleanUpActivityLocked(ActivityRecord r, boolean cleanServices, boolean setState) { @@ -3465,7 +3467,7 @@ final class ActivityStack { if (DEBUG_CLEANUP) Slog.v( TAG, "Record #" + i + " " + r + ": app=" + r.app); if (r.app == app) { - boolean remove; + final boolean remove; if ((!r.haveState && !r.stateNotNeeded) || r.finishing) { // Don't currently have state for the activity, or // it is finishing -- always remove it. @@ -3499,8 +3501,6 @@ final class ActivityStack { mService.updateUsageStats(r, false); } } - removeActivityFromHistoryLocked(r, "appDied"); - } else { // We have the current state for this activity, so // it can be restarted later when needed. @@ -3519,8 +3519,10 @@ final class ActivityStack { r.icicle = null; } } - cleanUpActivityLocked(r, true, true); + if (remove) { + removeActivityFromHistoryLocked(r, "appDied"); + } } } } |
