Loading services/java/com/android/server/am/ActivityStack.java +11 −12 Original line number Original line Diff line number Diff line Loading @@ -3438,23 +3438,22 @@ final class ActivityStack { // Determine if the top task is exiting and should return to home. Do this before it gets // Determine if the top task is exiting and should return to home. Do this before it gets // removed in removeHistoryRecordsForAppsLocked. // removed in removeHistoryRecordsForAppsLocked. boolean launchHomeNext = false; boolean launchHomeNext = false; int top = mTaskHistory.size() - 1; TaskRecord topTask = mTaskHistory.get(mTaskHistory.size() - 1); while (top >= 0) { ArrayList<ActivityRecord> activities = topTask.mActivities; final TaskRecord topTask = mTaskHistory.get(top); int activityNdx; if (topTask.mActivities.isEmpty()) { for (activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) { // Not possible, but just in case. ActivityRecord r = activities.get(activityNdx); --top; if (r.finishing) { continue; continue; } } ActivityRecord r = topTask.topRunningActivityLocked(null); if (r.app != app) { if (r != null) { // This is the dying activity. // r will be launched next. break; break; } } // There is an activity in topTask that is finishing. If topTask belongs to the app } // return to home depending on the task flag. if (activityNdx < 0) { // All activities in task belong to app. Set launchHomeNext to task's value. launchHomeNext = topTask.mOnTopOfHome; launchHomeNext = topTask.mOnTopOfHome; break; } } removeHistoryRecordsForAppLocked(app); removeHistoryRecordsForAppLocked(app); Loading services/java/com/android/server/am/ActivityStackSupervisor.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -1932,7 +1932,7 @@ public final class ActivityStackSupervisor { for (int stackNdx = 0; stackNdx < numStacks; ++stackNdx) { for (int stackNdx = 0; stackNdx < numStacks; ++stackNdx) { final ActivityStack stack = mStacks.get(stackNdx); final ActivityStack stack = mStacks.get(stackNdx); // Only update launchHomeTaskNext for the focused stack. // Only update launchHomeTaskNext for the focused stack. launchHomeTaskNext |= (stack == focusedStack && stack.handleAppDiedLocked(app)); launchHomeTaskNext |= (stack.handleAppDiedLocked(app) && stack == focusedStack); } } if (!restarting) { if (!restarting) { Loading Loading
services/java/com/android/server/am/ActivityStack.java +11 −12 Original line number Original line Diff line number Diff line Loading @@ -3438,23 +3438,22 @@ final class ActivityStack { // Determine if the top task is exiting and should return to home. Do this before it gets // Determine if the top task is exiting and should return to home. Do this before it gets // removed in removeHistoryRecordsForAppsLocked. // removed in removeHistoryRecordsForAppsLocked. boolean launchHomeNext = false; boolean launchHomeNext = false; int top = mTaskHistory.size() - 1; TaskRecord topTask = mTaskHistory.get(mTaskHistory.size() - 1); while (top >= 0) { ArrayList<ActivityRecord> activities = topTask.mActivities; final TaskRecord topTask = mTaskHistory.get(top); int activityNdx; if (topTask.mActivities.isEmpty()) { for (activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) { // Not possible, but just in case. ActivityRecord r = activities.get(activityNdx); --top; if (r.finishing) { continue; continue; } } ActivityRecord r = topTask.topRunningActivityLocked(null); if (r.app != app) { if (r != null) { // This is the dying activity. // r will be launched next. break; break; } } // There is an activity in topTask that is finishing. If topTask belongs to the app } // return to home depending on the task flag. if (activityNdx < 0) { // All activities in task belong to app. Set launchHomeNext to task's value. launchHomeNext = topTask.mOnTopOfHome; launchHomeNext = topTask.mOnTopOfHome; break; } } removeHistoryRecordsForAppLocked(app); removeHistoryRecordsForAppLocked(app); Loading
services/java/com/android/server/am/ActivityStackSupervisor.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -1932,7 +1932,7 @@ public final class ActivityStackSupervisor { for (int stackNdx = 0; stackNdx < numStacks; ++stackNdx) { for (int stackNdx = 0; stackNdx < numStacks; ++stackNdx) { final ActivityStack stack = mStacks.get(stackNdx); final ActivityStack stack = mStacks.get(stackNdx); // Only update launchHomeTaskNext for the focused stack. // Only update launchHomeTaskNext for the focused stack. launchHomeTaskNext |= (stack == focusedStack && stack.handleAppDiedLocked(app)); launchHomeTaskNext |= (stack.handleAppDiedLocked(app) && stack == focusedStack); } } if (!restarting) { if (!restarting) { Loading