diff options
author | Craig Mautner <cmautner@google.com> | 2013-10-05 00:03:53 -0700 |
---|---|---|
committer | Craig Mautner <cmautner@google.com> | 2013-10-06 10:39:31 -0700 |
commit | 1909125ebab026fff1836a93b9b14ea62f404d22 (patch) | |
tree | bc0e1a557c2fed7d66f2eaeb67afd2839c9443dd /services/java/com/android/server/am/ActivityStack.java | |
parent | 3d61bf45e559e084fa173bd50e2e7d7286dc9a35 (diff) |
Revert to jb-mr2 handling of app died.
Trying to span all potential stacks looking for apps was too complex
and error-prone. Extending the jb-mr2 method across multiple stacks.
Fixes bug 11080696.
Change-Id: I6391ceae4ad6a0955a409c3fb27472219fd5bf6b
Diffstat (limited to 'services/java/com/android/server/am/ActivityStack.java')
-rw-r--r-- | services/java/com/android/server/am/ActivityStack.java | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index 45b30f1cf60a..11a058ef99af 100644 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -3421,13 +3421,9 @@ final class ActivityStack { /** * Reset local parameters because an app's activity died. * @param app The app of the activity that died. - * @return true if home should be launched next. + * @return result from removeHistoryRecordsForAppLocked. */ boolean handleAppDiedLocked(ProcessRecord app) { - if (!containsApp(app)) { - return false; - } - if (mPausingActivity != null && mPausingActivity.app == app) { if (DEBUG_PAUSE || DEBUG_CLEANUP) Slog.v(TAG, "App died while pausing: " + mPausingActivity); @@ -3438,30 +3434,7 @@ final class ActivityStack { mLastNoHistoryActivity = null; } - // Determine if the top task is exiting and should return to home. Do this before it gets - // removed in removeHistoryRecordsForAppsLocked. - boolean launchHomeNext = false; - TaskRecord topTask = mTaskHistory.get(mTaskHistory.size() - 1); - ArrayList<ActivityRecord> activities = topTask.mActivities; - int activityNdx; - for (activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) { - ActivityRecord r = activities.get(activityNdx); - if (r.finishing) { - continue; - } - if (r.app != app) { - // This is the dying activity. - break; - } - } - if (activityNdx < 0) { - // All activities in task belong to app. Set launchHomeNext to task's value. - launchHomeNext = topTask.mOnTopOfHome; - } - - removeHistoryRecordsForAppLocked(app); - - return launchHomeNext; + return removeHistoryRecordsForAppLocked(app); } void handleAppCrashLocked(ProcessRecord app) { |