Loading services/core/java/com/android/server/am/ActivityDisplay.java +11 −1 Original line number Diff line number Diff line Loading @@ -410,7 +410,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> { } } finally { final ActivityStack topFullscreenStack = getStack(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD); getTopStackInWindowingMode(WINDOWING_MODE_FULLSCREEN); if (topFullscreenStack != null && mHomeStack != null && !isTopStack(mHomeStack)) { // Whenever split-screen is dismissed we want the home stack directly behind the // current top fullscreen stack so it shows up when the top stack is finished. Loading Loading @@ -566,6 +566,16 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> { return false; } ActivityStack getTopStackInWindowingMode(int windowingMode) { for (int i = mStacks.size() - 1; i >= 0; --i) { final ActivityStack current = mStacks.get(i); if (windowingMode == current.getWindowingMode()) { return current; } } return null; } int getIndexOf(ActivityStack stack) { return mStacks.indexOf(stack); } Loading services/core/java/com/android/server/am/ActivityManagerService.java +13 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY; 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.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS; import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; Loading Loading @@ -11042,8 +11043,20 @@ public class ActivityManagerService extends IActivityManager.Stub } if (toTop) { // Caller wants the current split-screen primary stack to be the top stack after // it goes fullscreen, so move it to the front. stack.moveToFront("dismissSplitScreenMode"); } else if (mStackSupervisor.isFocusedStack(stack)) { // In this case the current split-screen primary stack shouldn't be the top // stack after it goes fullscreen, but it current has focus, so we move the // focus to the top-most split-screen secondary stack next to it. final ActivityStack otherStack = stack.getDisplay().getTopStackInWindowingMode( WINDOWING_MODE_SPLIT_SCREEN_SECONDARY); if (otherStack != null) { otherStack.moveToFront("dismissSplitScreenMode_other"); } } stack.setWindowingMode(WINDOWING_MODE_FULLSCREEN); } } finally { Loading
services/core/java/com/android/server/am/ActivityDisplay.java +11 −1 Original line number Diff line number Diff line Loading @@ -410,7 +410,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> { } } finally { final ActivityStack topFullscreenStack = getStack(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD); getTopStackInWindowingMode(WINDOWING_MODE_FULLSCREEN); if (topFullscreenStack != null && mHomeStack != null && !isTopStack(mHomeStack)) { // Whenever split-screen is dismissed we want the home stack directly behind the // current top fullscreen stack so it shows up when the top stack is finished. Loading Loading @@ -566,6 +566,16 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> { return false; } ActivityStack getTopStackInWindowingMode(int windowingMode) { for (int i = mStacks.size() - 1; i >= 0; --i) { final ActivityStack current = mStacks.get(i); if (windowingMode == current.getWindowingMode()) { return current; } } return null; } int getIndexOf(ActivityStack stack) { return mStacks.indexOf(stack); } Loading
services/core/java/com/android/server/am/ActivityManagerService.java +13 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY; 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.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS; import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; Loading Loading @@ -11042,8 +11043,20 @@ public class ActivityManagerService extends IActivityManager.Stub } if (toTop) { // Caller wants the current split-screen primary stack to be the top stack after // it goes fullscreen, so move it to the front. stack.moveToFront("dismissSplitScreenMode"); } else if (mStackSupervisor.isFocusedStack(stack)) { // In this case the current split-screen primary stack shouldn't be the top // stack after it goes fullscreen, but it current has focus, so we move the // focus to the top-most split-screen secondary stack next to it. final ActivityStack otherStack = stack.getDisplay().getTopStackInWindowingMode( WINDOWING_MODE_SPLIT_SCREEN_SECONDARY); if (otherStack != null) { otherStack.moveToFront("dismissSplitScreenMode_other"); } } stack.setWindowingMode(WINDOWING_MODE_FULLSCREEN); } } finally {