Loading services/core/java/com/android/server/wm/ActivityStack.java +6 −44 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY; import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY; import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.app.WindowConfiguration.activityTypeToString; import static android.app.WindowConfiguration.windowingModeToString; Loading Loading @@ -269,9 +268,6 @@ class ActivityStack extends Task { private final AnimatingActivityRegistry mAnimatingActivityRegistry = new AnimatingActivityRegistry(); /** Stores the override windowing-mode from before a transient mode change (eg. split) */ private int mRestoreOverrideWindowingMode = WINDOWING_MODE_UNDEFINED; private boolean mTopActivityOccludesKeyguard; private ActivityRecord mTopDismissingKeyguardActivity; Loading Loading @@ -661,19 +657,6 @@ class ActivityStack extends Task { setWindowingMode(windowingMode, false /* creating */); } /** * A transient windowing mode is one which activities enter into temporarily. Examples of this * are Split window modes and pip. Non-transient modes are modes that displays can adopt. * * @param windowingMode the windowingMode to test for transient-ness. * @return {@code true} if the windowing mode is transient, {@code false} otherwise. */ private static boolean isTransientWindowingMode(int windowingMode) { return windowingMode == WINDOWING_MODE_PINNED || windowingMode == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY || windowingMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY; } /** * Specialization of {@link #setWindowingMode(int)} for this subclass. * Loading @@ -698,11 +681,6 @@ class ActivityStack extends Task { final int currentOverrideMode = getRequestedOverrideWindowingMode(); final Task topTask = getTopMostTask(); int windowingMode = preferredWindowingMode; if (preferredWindowingMode == WINDOWING_MODE_UNDEFINED && isTransientWindowingMode(currentMode)) { // Leaving a transient mode. Interpret UNDEFINED as "restore" windowingMode = mRestoreOverrideWindowingMode; } // Need to make sure windowing mode is supported. If we in the process of creating the stack // no need to resolve the windowing mode again as it is already resolved to the right mode. Loading @@ -712,30 +690,17 @@ class ActivityStack extends Task { windowingMode = WINDOWING_MODE_UNDEFINED; } } if (taskDisplayArea.getRootSplitScreenPrimaryTask() == this && windowingMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY) { // Resolution to split-screen secondary for the primary split-screen stack means // we want to leave split-screen mode. windowingMode = mRestoreOverrideWindowingMode; } final boolean alreadyInSplitScreenMode = taskDisplayArea.isSplitScreenModeActivated(); // Take any required action due to us not supporting the preferred windowing mode. if (alreadyInSplitScreenMode && windowingMode == WINDOWING_MODE_FULLSCREEN if (creating && alreadyInSplitScreenMode && windowingMode == WINDOWING_MODE_FULLSCREEN && isActivityTypeStandardOrUndefined()) { final boolean preferredSplitScreen = preferredWindowingMode == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY || preferredWindowingMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY; if (preferredSplitScreen || creating) { // Looks like we can't launch in split screen mode or the stack we are launching // doesn't support split-screen mode, go ahead an dismiss split-screen and display a // warning toast about it. // If the stack is being created explicitly in fullscreen mode, dismiss split-screen // and display a warning toast about it. mAtmService.getTaskChangeNotificationController() .notifyActivityDismissingDockedStack(); taskDisplayArea.onSplitScreenModeDismissed(this); } } if (currentMode == windowingMode) { // You are already in the window mode, so we can skip most of the work below. However, Loading Loading @@ -797,9 +762,6 @@ class ActivityStack extends Task { + " while there is already one isn't currently supported"); //return; } if (isTransientWindowingMode(windowingMode) && !isTransientWindowingMode(currentMode)) { mRestoreOverrideWindowingMode = currentOverrideMode; } mTmpRect2.setEmpty(); if (windowingMode != WINDOWING_MODE_FULLSCREEN) { Loading Loading
services/core/java/com/android/server/wm/ActivityStack.java +6 −44 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY; import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY; import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.app.WindowConfiguration.activityTypeToString; import static android.app.WindowConfiguration.windowingModeToString; Loading Loading @@ -269,9 +268,6 @@ class ActivityStack extends Task { private final AnimatingActivityRegistry mAnimatingActivityRegistry = new AnimatingActivityRegistry(); /** Stores the override windowing-mode from before a transient mode change (eg. split) */ private int mRestoreOverrideWindowingMode = WINDOWING_MODE_UNDEFINED; private boolean mTopActivityOccludesKeyguard; private ActivityRecord mTopDismissingKeyguardActivity; Loading Loading @@ -661,19 +657,6 @@ class ActivityStack extends Task { setWindowingMode(windowingMode, false /* creating */); } /** * A transient windowing mode is one which activities enter into temporarily. Examples of this * are Split window modes and pip. Non-transient modes are modes that displays can adopt. * * @param windowingMode the windowingMode to test for transient-ness. * @return {@code true} if the windowing mode is transient, {@code false} otherwise. */ private static boolean isTransientWindowingMode(int windowingMode) { return windowingMode == WINDOWING_MODE_PINNED || windowingMode == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY || windowingMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY; } /** * Specialization of {@link #setWindowingMode(int)} for this subclass. * Loading @@ -698,11 +681,6 @@ class ActivityStack extends Task { final int currentOverrideMode = getRequestedOverrideWindowingMode(); final Task topTask = getTopMostTask(); int windowingMode = preferredWindowingMode; if (preferredWindowingMode == WINDOWING_MODE_UNDEFINED && isTransientWindowingMode(currentMode)) { // Leaving a transient mode. Interpret UNDEFINED as "restore" windowingMode = mRestoreOverrideWindowingMode; } // Need to make sure windowing mode is supported. If we in the process of creating the stack // no need to resolve the windowing mode again as it is already resolved to the right mode. Loading @@ -712,30 +690,17 @@ class ActivityStack extends Task { windowingMode = WINDOWING_MODE_UNDEFINED; } } if (taskDisplayArea.getRootSplitScreenPrimaryTask() == this && windowingMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY) { // Resolution to split-screen secondary for the primary split-screen stack means // we want to leave split-screen mode. windowingMode = mRestoreOverrideWindowingMode; } final boolean alreadyInSplitScreenMode = taskDisplayArea.isSplitScreenModeActivated(); // Take any required action due to us not supporting the preferred windowing mode. if (alreadyInSplitScreenMode && windowingMode == WINDOWING_MODE_FULLSCREEN if (creating && alreadyInSplitScreenMode && windowingMode == WINDOWING_MODE_FULLSCREEN && isActivityTypeStandardOrUndefined()) { final boolean preferredSplitScreen = preferredWindowingMode == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY || preferredWindowingMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY; if (preferredSplitScreen || creating) { // Looks like we can't launch in split screen mode or the stack we are launching // doesn't support split-screen mode, go ahead an dismiss split-screen and display a // warning toast about it. // If the stack is being created explicitly in fullscreen mode, dismiss split-screen // and display a warning toast about it. mAtmService.getTaskChangeNotificationController() .notifyActivityDismissingDockedStack(); taskDisplayArea.onSplitScreenModeDismissed(this); } } if (currentMode == windowingMode) { // You are already in the window mode, so we can skip most of the work below. However, Loading Loading @@ -797,9 +762,6 @@ class ActivityStack extends Task { + " while there is already one isn't currently supported"); //return; } if (isTransientWindowingMode(windowingMode) && !isTransientWindowingMode(currentMode)) { mRestoreOverrideWindowingMode = currentOverrideMode; } mTmpRect2.setEmpty(); if (windowingMode != WINDOWING_MODE_FULLSCREEN) { Loading