Loading services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +2 −18 Original line number Diff line number Diff line Loading @@ -2224,26 +2224,10 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { return; } if (!task.supportsSplitScreenWindowingMode() || forceNonResizable) { if (task.mTransitionController.isShellTransitionsEnabled()) return; // Dismiss docked root task. If task appeared to be in docked root task but is not // resizable - we need to move it to top of fullscreen root task, otherwise it will // be covered. final TaskDisplayArea taskDisplayArea = task.getDisplayArea(); if (taskDisplayArea.isSplitScreenModeActivated()) { // Display a warning toast that we tried to put an app that doesn't support // split-screen in split-screen. mService.getTaskChangeNotificationController() .notifyActivityDismissingDockedRootTask(); taskDisplayArea.onSplitScreenModeDismissed(task); taskDisplayArea.mDisplayContent.ensureActivitiesVisible(null, 0, PRESERVE_WINDOWS, true /* notifyClients */); } return; } if (!forceNonResizable) { handleForcedResizableTaskIfNeeded(task, FORCED_RESIZEABLE_REASON_SPLIT_SCREEN); } } /** Notifies that the top activity of the task is forced to be resizeable. */ private void handleForcedResizableTaskIfNeeded(Task task, int reason) { Loading services/core/java/com/android/server/wm/DisplayContent.java +1 −17 Original line number Diff line number Diff line Loading @@ -3043,13 +3043,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp mTouchExcludeRegion.op(mTmpRegion, Region.Op.UNION); } amendWindowTapExcludeRegion(mTouchExcludeRegion); // TODO(multi-display): Support docked root tasks on secondary displays & task containers. if (mDisplayId == DEFAULT_DISPLAY && getDefaultTaskDisplayArea().isSplitScreenModeActivated()) { mDividerControllerLocked.getTouchRegion(mTmpRect); mTmpRegion.set(mTmpRect); mTouchExcludeRegion.op(mTmpRegion, Op.UNION); } mTapDetector.setTouchExcludeRegion(mTouchExcludeRegion); } Loading Loading @@ -3440,12 +3433,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp if (rootPinnedTask != null) { pw.println(prefix + "rootPinnedTask=" + rootPinnedTask.getName()); } final Task rootSplitScreenPrimaryTask = getDefaultTaskDisplayArea() .getRootSplitScreenPrimaryTask(); if (rootSplitScreenPrimaryTask != null) { pw.println( prefix + "rootSplitScreenPrimaryTask=" + rootSplitScreenPrimaryTask.getName()); } // TODO: Support recents on non-default task containers final Task rootRecentsTask = getDefaultTaskDisplayArea().getRootTask( WINDOWING_MODE_UNDEFINED, ACTIVITY_TYPE_RECENTS); Loading Loading @@ -4849,13 +4836,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp } private static boolean skipImeWindowsDuringTraversal(DisplayContent dc) { // We skip IME windows so they're processed just above their target, except // in split-screen mode where we process the IME containers above the docked divider. // We skip IME windows so they're processed just above their target. // Note that this method check should align with {@link // WindowState#applyImeWindowsIfNeeded} in case of any state mismatch. return dc.mImeLayeringTarget != null && (!dc.getDefaultTaskDisplayArea().isSplitScreenModeActivated() || dc.mImeLayeringTarget.getTask() == null) // Make sure that the IME window won't be skipped to report that it has // completed the orientation change. && !dc.mWmService.mDisplayFrozen; Loading services/core/java/com/android/server/wm/KeyguardController.java +0 −10 Original line number Diff line number Diff line Loading @@ -450,16 +450,6 @@ class KeyguardController { return; } // Dismiss split screen // The lock screen is currently showing, but is occluded by a window that can // show on top of the lock screen. In this can we want to dismiss the docked // stack since it will be complicated/risky to try to put the activity on top // of the lock screen in the right fullscreen configuration. final TaskDisplayArea taskDisplayArea = mRootWindowContainer.getDefaultTaskDisplayArea(); if (taskDisplayArea.isSplitScreenModeActivated()) { taskDisplayArea.onSplitScreenModeDismissed(); } // Dismiss freeform windowing mode if (currentTaskControllingOcclusion == null) { return; Loading services/core/java/com/android/server/wm/LaunchParamsController.java +1 −3 Original line number Diff line number Diff line Loading @@ -150,10 +150,8 @@ class LaunchParamsController { if (mTmpParams.hasWindowingMode() && task.isRootTask() && mTmpParams.mWindowingMode != task.getWindowingMode()) { final int activityType = activity != null ? activity.getActivityType() : task.getActivityType(); task.setWindowingMode(task.getDisplayArea().validateWindowingMode( mTmpParams.mWindowingMode, activity, task, activityType)); mTmpParams.mWindowingMode, activity, task)); } if (mTmpParams.mBounds.isEmpty()) { Loading services/core/java/com/android/server/wm/RootWindowContainer.java +3 −10 Original line number Diff line number Diff line Loading @@ -1907,10 +1907,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent> final Task topFocusedRootTask = getTopDisplayFocusedRootTask(); final int focusRootTaskId = topFocusedRootTask != null ? topFocusedRootTask.getRootTaskId() : INVALID_TASK_ID; // We dismiss the docked root task whenever we switch users. if (getDefaultTaskDisplayArea().isSplitScreenModeActivated()) { getDefaultTaskDisplayArea().onSplitScreenModeDismissed(); } // Also dismiss the pinned root task whenever we switch users. Removing the pinned root task // will also cause all tasks to be moved to the fullscreen root task at a position that is // appropriate. Loading Loading @@ -2866,8 +2862,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> container = rootTask.getDisplayArea(); if (container != null && canLaunchOnDisplay(r, container.mDisplayContent.mDisplayId)) { if (windowingMode == WindowConfiguration.WINDOWING_MODE_UNDEFINED) { windowingMode = container.resolveWindowingMode(r, options, candidateTask, activityType); windowingMode = container.resolveWindowingMode(r, options, candidateTask); } // Always allow organized tasks that created by organizer since the activity type // of an organized task is decided by the activity type of its top child, which Loading @@ -2883,8 +2878,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> || !canLaunchOnDisplay(r, container.mDisplayContent.mDisplayId)) { container = getDefaultTaskDisplayArea(); if (windowingMode == WindowConfiguration.WINDOWING_MODE_UNDEFINED) { windowingMode = container.resolveWindowingMode(r, options, candidateTask, activityType); windowingMode = container.resolveWindowingMode(r, options, candidateTask); } } Loading Loading @@ -2946,8 +2940,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> windowingMode = options != null ? options.getLaunchWindowingMode() : r.getWindowingMode(); } windowingMode = taskDisplayArea.validateWindowingMode(windowingMode, r, candidateTask, r.getActivityType()); windowingMode = taskDisplayArea.validateWindowingMode(windowingMode, r, candidateTask); // Return the topmost valid root task on the display. final int targetWindowingMode = windowingMode; Loading Loading
services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +2 −18 Original line number Diff line number Diff line Loading @@ -2224,26 +2224,10 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { return; } if (!task.supportsSplitScreenWindowingMode() || forceNonResizable) { if (task.mTransitionController.isShellTransitionsEnabled()) return; // Dismiss docked root task. If task appeared to be in docked root task but is not // resizable - we need to move it to top of fullscreen root task, otherwise it will // be covered. final TaskDisplayArea taskDisplayArea = task.getDisplayArea(); if (taskDisplayArea.isSplitScreenModeActivated()) { // Display a warning toast that we tried to put an app that doesn't support // split-screen in split-screen. mService.getTaskChangeNotificationController() .notifyActivityDismissingDockedRootTask(); taskDisplayArea.onSplitScreenModeDismissed(task); taskDisplayArea.mDisplayContent.ensureActivitiesVisible(null, 0, PRESERVE_WINDOWS, true /* notifyClients */); } return; } if (!forceNonResizable) { handleForcedResizableTaskIfNeeded(task, FORCED_RESIZEABLE_REASON_SPLIT_SCREEN); } } /** Notifies that the top activity of the task is forced to be resizeable. */ private void handleForcedResizableTaskIfNeeded(Task task, int reason) { Loading
services/core/java/com/android/server/wm/DisplayContent.java +1 −17 Original line number Diff line number Diff line Loading @@ -3043,13 +3043,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp mTouchExcludeRegion.op(mTmpRegion, Region.Op.UNION); } amendWindowTapExcludeRegion(mTouchExcludeRegion); // TODO(multi-display): Support docked root tasks on secondary displays & task containers. if (mDisplayId == DEFAULT_DISPLAY && getDefaultTaskDisplayArea().isSplitScreenModeActivated()) { mDividerControllerLocked.getTouchRegion(mTmpRect); mTmpRegion.set(mTmpRect); mTouchExcludeRegion.op(mTmpRegion, Op.UNION); } mTapDetector.setTouchExcludeRegion(mTouchExcludeRegion); } Loading Loading @@ -3440,12 +3433,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp if (rootPinnedTask != null) { pw.println(prefix + "rootPinnedTask=" + rootPinnedTask.getName()); } final Task rootSplitScreenPrimaryTask = getDefaultTaskDisplayArea() .getRootSplitScreenPrimaryTask(); if (rootSplitScreenPrimaryTask != null) { pw.println( prefix + "rootSplitScreenPrimaryTask=" + rootSplitScreenPrimaryTask.getName()); } // TODO: Support recents on non-default task containers final Task rootRecentsTask = getDefaultTaskDisplayArea().getRootTask( WINDOWING_MODE_UNDEFINED, ACTIVITY_TYPE_RECENTS); Loading Loading @@ -4849,13 +4836,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp } private static boolean skipImeWindowsDuringTraversal(DisplayContent dc) { // We skip IME windows so they're processed just above their target, except // in split-screen mode where we process the IME containers above the docked divider. // We skip IME windows so they're processed just above their target. // Note that this method check should align with {@link // WindowState#applyImeWindowsIfNeeded} in case of any state mismatch. return dc.mImeLayeringTarget != null && (!dc.getDefaultTaskDisplayArea().isSplitScreenModeActivated() || dc.mImeLayeringTarget.getTask() == null) // Make sure that the IME window won't be skipped to report that it has // completed the orientation change. && !dc.mWmService.mDisplayFrozen; Loading
services/core/java/com/android/server/wm/KeyguardController.java +0 −10 Original line number Diff line number Diff line Loading @@ -450,16 +450,6 @@ class KeyguardController { return; } // Dismiss split screen // The lock screen is currently showing, but is occluded by a window that can // show on top of the lock screen. In this can we want to dismiss the docked // stack since it will be complicated/risky to try to put the activity on top // of the lock screen in the right fullscreen configuration. final TaskDisplayArea taskDisplayArea = mRootWindowContainer.getDefaultTaskDisplayArea(); if (taskDisplayArea.isSplitScreenModeActivated()) { taskDisplayArea.onSplitScreenModeDismissed(); } // Dismiss freeform windowing mode if (currentTaskControllingOcclusion == null) { return; Loading
services/core/java/com/android/server/wm/LaunchParamsController.java +1 −3 Original line number Diff line number Diff line Loading @@ -150,10 +150,8 @@ class LaunchParamsController { if (mTmpParams.hasWindowingMode() && task.isRootTask() && mTmpParams.mWindowingMode != task.getWindowingMode()) { final int activityType = activity != null ? activity.getActivityType() : task.getActivityType(); task.setWindowingMode(task.getDisplayArea().validateWindowingMode( mTmpParams.mWindowingMode, activity, task, activityType)); mTmpParams.mWindowingMode, activity, task)); } if (mTmpParams.mBounds.isEmpty()) { Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +3 −10 Original line number Diff line number Diff line Loading @@ -1907,10 +1907,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent> final Task topFocusedRootTask = getTopDisplayFocusedRootTask(); final int focusRootTaskId = topFocusedRootTask != null ? topFocusedRootTask.getRootTaskId() : INVALID_TASK_ID; // We dismiss the docked root task whenever we switch users. if (getDefaultTaskDisplayArea().isSplitScreenModeActivated()) { getDefaultTaskDisplayArea().onSplitScreenModeDismissed(); } // Also dismiss the pinned root task whenever we switch users. Removing the pinned root task // will also cause all tasks to be moved to the fullscreen root task at a position that is // appropriate. Loading Loading @@ -2866,8 +2862,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> container = rootTask.getDisplayArea(); if (container != null && canLaunchOnDisplay(r, container.mDisplayContent.mDisplayId)) { if (windowingMode == WindowConfiguration.WINDOWING_MODE_UNDEFINED) { windowingMode = container.resolveWindowingMode(r, options, candidateTask, activityType); windowingMode = container.resolveWindowingMode(r, options, candidateTask); } // Always allow organized tasks that created by organizer since the activity type // of an organized task is decided by the activity type of its top child, which Loading @@ -2883,8 +2878,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> || !canLaunchOnDisplay(r, container.mDisplayContent.mDisplayId)) { container = getDefaultTaskDisplayArea(); if (windowingMode == WindowConfiguration.WINDOWING_MODE_UNDEFINED) { windowingMode = container.resolveWindowingMode(r, options, candidateTask, activityType); windowingMode = container.resolveWindowingMode(r, options, candidateTask); } } Loading Loading @@ -2946,8 +2940,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> windowingMode = options != null ? options.getLaunchWindowingMode() : r.getWindowingMode(); } windowingMode = taskDisplayArea.validateWindowingMode(windowingMode, r, candidateTask, r.getActivityType()); windowingMode = taskDisplayArea.validateWindowingMode(windowingMode, r, candidateTask); // Return the topmost valid root task on the display. final int targetWindowingMode = windowingMode; Loading