Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3552,6 +3552,9 @@ --> <integer name="config_largeScreenSmallestScreenWidthDp">600</integer> <!-- True if the device is using leagacy split. --> <bool name="config_useLegacySplit">true</bool> <!-- True if the device supports running activities on secondary displays. --> <bool name="config_supportsMultiDisplay">true</bool> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -396,6 +396,7 @@ <java-symbol type="integer" name="config_respectsActivityMinWidthHeightMultiWindow" /> <java-symbol type="dimen" name="config_minPercentageMultiWindowSupportWidth" /> <java-symbol type="integer" name="config_largeScreenSmallestScreenWidthDp" /> <java-symbol type="bool" name="config_useLegacySplit" /> <java-symbol type="bool" name="config_noHomeScreen" /> <java-symbol type="bool" name="config_supportsSystemDecorsOnSecondaryDisplays" /> <java-symbol type="bool" name="config_supportsInsecureLockScreen" /> Loading libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +19 −2 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ import android.window.TransitionRequestInfo; import android.window.WindowContainerTransaction; import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.protolog.common.ProtoLog; import com.android.wm.shell.RootTaskDisplayAreaOrganizer; Loading Loading @@ -110,6 +111,11 @@ class StageCoordinator implements SplitLayout.LayoutChangeListener, private final SplitScreenTransitions mSplitTransitions; private boolean mExitSplitScreenOnHide = true; // TODO(b/187041611): remove this flag after totally deprecated legacy split /** Whether the device is supporting legacy split or not. */ private boolean mUseLegacySplit; @SplitScreen.StageType int mDismissTop = NO_DISMISS; private final Runnable mOnTransitionAnimationComplete = () -> { // If still playing, let it finish. Loading Loading @@ -334,10 +340,17 @@ class StageCoordinator implements SplitLayout.LayoutChangeListener, private void onStageRootTaskAppeared(StageListenerImpl stageListener) { if (mMainStageListener.mHasRootTask && mSideStageListener.mHasRootTask) { mUseLegacySplit = mContext.getResources().getBoolean(R.bool.config_useLegacySplit); final WindowContainerTransaction wct = new WindowContainerTransaction(); // Make the stages adjacent to each other so they occlude what's behind them. wct.setAdjacentRoots(mMainStage.mRootTaskInfo.token, mSideStage.mRootTaskInfo.token); // Only sets side stage as launch-adjacent-flag-root when the device is not using legacy // split to prevent new split behavior confusing users. if (!mUseLegacySplit) { wct.setLaunchAdjacentFlagRoot(mSideStage.mRootTaskInfo.token); } mTaskOrganizer.applyTransaction(wct); } } Loading @@ -347,7 +360,11 @@ class StageCoordinator implements SplitLayout.LayoutChangeListener, final WindowContainerTransaction wct = new WindowContainerTransaction(); // Deactivate the main stage if it no longer has a root task. mMainStage.deactivate(wct); if (!mUseLegacySplit) { wct.clearLaunchAdjacentFlagRoot(mSideStage.mRootTaskInfo.token); } mTaskOrganizer.applyTransaction(wct); } } Loading Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -3552,6 +3552,9 @@ --> <integer name="config_largeScreenSmallestScreenWidthDp">600</integer> <!-- True if the device is using leagacy split. --> <bool name="config_useLegacySplit">true</bool> <!-- True if the device supports running activities on secondary displays. --> <bool name="config_supportsMultiDisplay">true</bool> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -396,6 +396,7 @@ <java-symbol type="integer" name="config_respectsActivityMinWidthHeightMultiWindow" /> <java-symbol type="dimen" name="config_minPercentageMultiWindowSupportWidth" /> <java-symbol type="integer" name="config_largeScreenSmallestScreenWidthDp" /> <java-symbol type="bool" name="config_useLegacySplit" /> <java-symbol type="bool" name="config_noHomeScreen" /> <java-symbol type="bool" name="config_supportsSystemDecorsOnSecondaryDisplays" /> <java-symbol type="bool" name="config_supportsInsecureLockScreen" /> Loading
libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +19 −2 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ import android.window.TransitionRequestInfo; import android.window.WindowContainerTransaction; import com.android.internal.R; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.protolog.common.ProtoLog; import com.android.wm.shell.RootTaskDisplayAreaOrganizer; Loading Loading @@ -110,6 +111,11 @@ class StageCoordinator implements SplitLayout.LayoutChangeListener, private final SplitScreenTransitions mSplitTransitions; private boolean mExitSplitScreenOnHide = true; // TODO(b/187041611): remove this flag after totally deprecated legacy split /** Whether the device is supporting legacy split or not. */ private boolean mUseLegacySplit; @SplitScreen.StageType int mDismissTop = NO_DISMISS; private final Runnable mOnTransitionAnimationComplete = () -> { // If still playing, let it finish. Loading Loading @@ -334,10 +340,17 @@ class StageCoordinator implements SplitLayout.LayoutChangeListener, private void onStageRootTaskAppeared(StageListenerImpl stageListener) { if (mMainStageListener.mHasRootTask && mSideStageListener.mHasRootTask) { mUseLegacySplit = mContext.getResources().getBoolean(R.bool.config_useLegacySplit); final WindowContainerTransaction wct = new WindowContainerTransaction(); // Make the stages adjacent to each other so they occlude what's behind them. wct.setAdjacentRoots(mMainStage.mRootTaskInfo.token, mSideStage.mRootTaskInfo.token); // Only sets side stage as launch-adjacent-flag-root when the device is not using legacy // split to prevent new split behavior confusing users. if (!mUseLegacySplit) { wct.setLaunchAdjacentFlagRoot(mSideStage.mRootTaskInfo.token); } mTaskOrganizer.applyTransaction(wct); } } Loading @@ -347,7 +360,11 @@ class StageCoordinator implements SplitLayout.LayoutChangeListener, final WindowContainerTransaction wct = new WindowContainerTransaction(); // Deactivate the main stage if it no longer has a root task. mMainStage.deactivate(wct); if (!mUseLegacySplit) { wct.clearLaunchAdjacentFlagRoot(mSideStage.mRootTaskInfo.token); } mTaskOrganizer.applyTransaction(wct); } } Loading