Loading services/core/java/com/android/server/wm/Task.java +50 −19 Original line number Diff line number Diff line Loading @@ -5249,6 +5249,34 @@ class Task extends TaskFragment { if (isFocusableAndVisible()) { someActivityResumed = resumeTopActivityInnerLocked(prev, options, deferPause); } } else { if (DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue()) { // Find visible tasks top-to-bottom. final List<Task> tasksToResumeTopToBottom = new ArrayList<>(); for (int i = mChildren.size() - 1; i >= 0; i--) { final Task child = (Task) getChildAt(i); if (!child.isTopActivityFocusable()) { continue; } if (child.getVisibility(null /* starting */) != TASK_FRAGMENT_VISIBILITY_VISIBLE) { if (child.topRunningActivity() == null) { // Skip the task if no running activity and continue resuming next // task. continue; } // Otherwise, assuming everything behind this task should also be // invisible. break; } tasksToResumeTopToBottom.add(child); } // Resume them bottom-to-top, so Z order is preserved. for (int i = tasksToResumeTopToBottom.size() - 1; i >= 0; i--) { final Task child = tasksToResumeTopToBottom.get(i); someActivityResumed |= child.resumeTopActivityUncheckedLocked(prev, options, deferPause); } } else { int idx = mChildren.size() - 1; while (idx >= 0) { Loading @@ -5259,10 +5287,12 @@ class Task extends TaskFragment { if (child.getVisibility(null /* starting */) != TASK_FRAGMENT_VISIBILITY_VISIBLE) { if (child.topRunningActivity() == null) { // Skip the task if no running activity and continue resuming next task. // Skip the task if no running activity and continue resuming next // task. continue; } // Otherwise, assuming everything behind this task should also be invisible. // Otherwise, assuming everything behind this task should also be // invisible. break; } Loading @@ -5276,6 +5306,7 @@ class Task extends TaskFragment { } } } } // When resuming the top activity, it may be necessary to pause the top activity (for // example, returning to the lock screen. We suppress the normal pause logic in Loading Loading
services/core/java/com/android/server/wm/Task.java +50 −19 Original line number Diff line number Diff line Loading @@ -5249,6 +5249,34 @@ class Task extends TaskFragment { if (isFocusableAndVisible()) { someActivityResumed = resumeTopActivityInnerLocked(prev, options, deferPause); } } else { if (DesktopExperienceFlags.ENABLE_MULTIPLE_DESKTOPS_BACKEND.isTrue()) { // Find visible tasks top-to-bottom. final List<Task> tasksToResumeTopToBottom = new ArrayList<>(); for (int i = mChildren.size() - 1; i >= 0; i--) { final Task child = (Task) getChildAt(i); if (!child.isTopActivityFocusable()) { continue; } if (child.getVisibility(null /* starting */) != TASK_FRAGMENT_VISIBILITY_VISIBLE) { if (child.topRunningActivity() == null) { // Skip the task if no running activity and continue resuming next // task. continue; } // Otherwise, assuming everything behind this task should also be // invisible. break; } tasksToResumeTopToBottom.add(child); } // Resume them bottom-to-top, so Z order is preserved. for (int i = tasksToResumeTopToBottom.size() - 1; i >= 0; i--) { final Task child = tasksToResumeTopToBottom.get(i); someActivityResumed |= child.resumeTopActivityUncheckedLocked(prev, options, deferPause); } } else { int idx = mChildren.size() - 1; while (idx >= 0) { Loading @@ -5259,10 +5287,12 @@ class Task extends TaskFragment { if (child.getVisibility(null /* starting */) != TASK_FRAGMENT_VISIBILITY_VISIBLE) { if (child.topRunningActivity() == null) { // Skip the task if no running activity and continue resuming next task. // Skip the task if no running activity and continue resuming next // task. continue; } // Otherwise, assuming everything behind this task should also be invisible. // Otherwise, assuming everything behind this task should also be // invisible. break; } Loading @@ -5276,6 +5306,7 @@ class Task extends TaskFragment { } } } } // When resuming the top activity, it may be necessary to pause the top activity (for // example, returning to the lock screen. We suppress the normal pause logic in Loading