Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +8 −4 Original line number Diff line number Diff line Loading @@ -543,9 +543,9 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin final boolean inFullImmersive = mDesktopUserRepositories.getProfile(taskInfo.userId) .isTaskInFullImmersiveState(taskInfo.taskId); updateRelayoutParams(mRelayoutParams, mContext, taskInfo, applyStartTransactionOnDraw, shouldSetTaskVisibilityPositionAndCrop, mIsStatusBarVisible, mIsKeyguardVisibleAndOccluded, inFullImmersive, updateRelayoutParams(mRelayoutParams, mContext, taskInfo, mSplitScreenController, applyStartTransactionOnDraw, shouldSetTaskVisibilityPositionAndCrop, mIsStatusBarVisible, mIsKeyguardVisibleAndOccluded, inFullImmersive, mDisplayController.getInsetsState(taskInfo.displayId), hasGlobalFocus, displayExclusionRegion); Loading Loading @@ -877,6 +877,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin RelayoutParams relayoutParams, Context context, ActivityManager.RunningTaskInfo taskInfo, SplitScreenController splitScreenController, boolean applyStartTransactionOnDraw, boolean shouldSetTaskVisibilityPositionAndCrop, boolean isStatusBarVisible, Loading Loading @@ -918,7 +919,10 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin || (isStatusBarVisible && !isKeyguardVisibleAndOccluded); } relayoutParams.mIsCaptionVisible = showCaption; relayoutParams.mIsInsetSource = isAppHeader && !inFullImmersiveMode; final boolean isBottomSplit = !splitScreenController.isLeftRightSplit() && splitScreenController.getSplitPosition(taskInfo.taskId) == SPLIT_POSITION_BOTTOM_OR_RIGHT; relayoutParams.mIsInsetSource = (isAppHeader && !inFullImmersiveMode) || isBottomSplit; if (isAppHeader) { if (TaskInfoKt.isTransparentCaptionBarAppearance(taskInfo)) { // The app is requesting to customize the caption bar, which means input on Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java +59 −3 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import static android.view.WindowInsetsController.APPEARANCE_TRANSPARENT_CAPTION import static com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession; import static com.android.wm.shell.MockSurfaceControlHelper.createMockSurfaceControlTransaction; import static com.android.wm.shell.shared.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT; import static com.android.wm.shell.windowdecor.DesktopModeWindowDecoration.CLOSE_MAXIMIZE_MENU_DELAY_MS; import static com.android.wm.shell.windowdecor.WindowDecoration.INVALID_CORNER_RADIUS; Loading Loading @@ -305,7 +306,8 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { RelayoutParams relayoutParams = new RelayoutParams(); DesktopModeWindowDecoration.updateRelayoutParams( relayoutParams, mContext, taskInfo, /* applyStartTransactionOnDraw= */ true, relayoutParams, mContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, /* isKeyguardVisibleAndOccluded */ false, Loading @@ -325,7 +327,8 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { RelayoutParams relayoutParams = new RelayoutParams(); DesktopModeWindowDecoration.updateRelayoutParams( relayoutParams, mContext, taskInfo, /* applyStartTransactionOnDraw= */ true, relayoutParams, mContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, /* isKeyguardVisibleAndOccluded */ false, Loading @@ -344,7 +347,8 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { RelayoutParams relayoutParams = new RelayoutParams(); DesktopModeWindowDecoration.updateRelayoutParams( relayoutParams, mContext, taskInfo, /* applyStartTransactionOnDraw= */ true, relayoutParams, mContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, /* isKeyguardVisibleAndOccluded */ false, Loading @@ -367,6 +371,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -390,6 +395,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -413,6 +419,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading Loading @@ -440,6 +447,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading Loading @@ -468,6 +476,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -493,6 +502,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -518,6 +528,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -542,6 +553,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -566,6 +578,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -589,6 +602,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -612,6 +626,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -634,6 +649,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -657,6 +673,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -680,6 +697,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -704,6 +722,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -729,6 +748,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -752,6 +772,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -777,6 +798,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -791,6 +813,31 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { .isTrue(); } @Test public void updateRelayoutParams_handle_bottomSplitIsInsetSource() { final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(/* visible= */ true); final RelayoutParams relayoutParams = new RelayoutParams(); when(mMockSplitScreenController.isLeftRightSplit()).thenReturn(false); when(mMockSplitScreenController.getSplitPosition(taskInfo.taskId)) .thenReturn(SPLIT_POSITION_BOTTOM_OR_RIGHT); DesktopModeWindowDecoration.updateRelayoutParams( relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, /* isKeyguardVisibleAndOccluded */ false, /* inFullImmersiveMode */ true, new InsetsState(), /* hasGlobalFocus= */ true, mExclusionRegion); assertThat(relayoutParams.mIsInsetSource).isTrue(); } @Test @EnableFlags(Flags.FLAG_ENABLE_FULLY_IMMERSIVE_IN_DESKTOP) public void updateRelayoutParams_header_addsPaddingInFullImmersive() { Loading @@ -808,6 +855,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -832,6 +880,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -855,6 +904,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ false, Loading @@ -878,6 +928,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -900,6 +951,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ false, Loading @@ -922,6 +974,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -945,6 +998,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -960,6 +1014,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ false, Loading @@ -983,6 +1038,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +8 −4 Original line number Diff line number Diff line Loading @@ -543,9 +543,9 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin final boolean inFullImmersive = mDesktopUserRepositories.getProfile(taskInfo.userId) .isTaskInFullImmersiveState(taskInfo.taskId); updateRelayoutParams(mRelayoutParams, mContext, taskInfo, applyStartTransactionOnDraw, shouldSetTaskVisibilityPositionAndCrop, mIsStatusBarVisible, mIsKeyguardVisibleAndOccluded, inFullImmersive, updateRelayoutParams(mRelayoutParams, mContext, taskInfo, mSplitScreenController, applyStartTransactionOnDraw, shouldSetTaskVisibilityPositionAndCrop, mIsStatusBarVisible, mIsKeyguardVisibleAndOccluded, inFullImmersive, mDisplayController.getInsetsState(taskInfo.displayId), hasGlobalFocus, displayExclusionRegion); Loading Loading @@ -877,6 +877,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin RelayoutParams relayoutParams, Context context, ActivityManager.RunningTaskInfo taskInfo, SplitScreenController splitScreenController, boolean applyStartTransactionOnDraw, boolean shouldSetTaskVisibilityPositionAndCrop, boolean isStatusBarVisible, Loading Loading @@ -918,7 +919,10 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin || (isStatusBarVisible && !isKeyguardVisibleAndOccluded); } relayoutParams.mIsCaptionVisible = showCaption; relayoutParams.mIsInsetSource = isAppHeader && !inFullImmersiveMode; final boolean isBottomSplit = !splitScreenController.isLeftRightSplit() && splitScreenController.getSplitPosition(taskInfo.taskId) == SPLIT_POSITION_BOTTOM_OR_RIGHT; relayoutParams.mIsInsetSource = (isAppHeader && !inFullImmersiveMode) || isBottomSplit; if (isAppHeader) { if (TaskInfoKt.isTransparentCaptionBarAppearance(taskInfo)) { // The app is requesting to customize the caption bar, which means input on Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java +59 −3 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import static android.view.WindowInsetsController.APPEARANCE_TRANSPARENT_CAPTION import static com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession; import static com.android.wm.shell.MockSurfaceControlHelper.createMockSurfaceControlTransaction; import static com.android.wm.shell.shared.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT; import static com.android.wm.shell.windowdecor.DesktopModeWindowDecoration.CLOSE_MAXIMIZE_MENU_DELAY_MS; import static com.android.wm.shell.windowdecor.WindowDecoration.INVALID_CORNER_RADIUS; Loading Loading @@ -305,7 +306,8 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { RelayoutParams relayoutParams = new RelayoutParams(); DesktopModeWindowDecoration.updateRelayoutParams( relayoutParams, mContext, taskInfo, /* applyStartTransactionOnDraw= */ true, relayoutParams, mContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, /* isKeyguardVisibleAndOccluded */ false, Loading @@ -325,7 +327,8 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { RelayoutParams relayoutParams = new RelayoutParams(); DesktopModeWindowDecoration.updateRelayoutParams( relayoutParams, mContext, taskInfo, /* applyStartTransactionOnDraw= */ true, relayoutParams, mContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, /* isKeyguardVisibleAndOccluded */ false, Loading @@ -344,7 +347,8 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { RelayoutParams relayoutParams = new RelayoutParams(); DesktopModeWindowDecoration.updateRelayoutParams( relayoutParams, mContext, taskInfo, /* applyStartTransactionOnDraw= */ true, relayoutParams, mContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, /* isKeyguardVisibleAndOccluded */ false, Loading @@ -367,6 +371,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -390,6 +395,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -413,6 +419,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading Loading @@ -440,6 +447,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading Loading @@ -468,6 +476,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -493,6 +502,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -518,6 +528,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -542,6 +553,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -566,6 +578,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -589,6 +602,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -612,6 +626,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -634,6 +649,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -657,6 +673,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -680,6 +697,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -704,6 +722,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -729,6 +748,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -752,6 +772,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -777,6 +798,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -791,6 +813,31 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { .isTrue(); } @Test public void updateRelayoutParams_handle_bottomSplitIsInsetSource() { final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(/* visible= */ true); final RelayoutParams relayoutParams = new RelayoutParams(); when(mMockSplitScreenController.isLeftRightSplit()).thenReturn(false); when(mMockSplitScreenController.getSplitPosition(taskInfo.taskId)) .thenReturn(SPLIT_POSITION_BOTTOM_OR_RIGHT); DesktopModeWindowDecoration.updateRelayoutParams( relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, /* isKeyguardVisibleAndOccluded */ false, /* inFullImmersiveMode */ true, new InsetsState(), /* hasGlobalFocus= */ true, mExclusionRegion); assertThat(relayoutParams.mIsInsetSource).isTrue(); } @Test @EnableFlags(Flags.FLAG_ENABLE_FULLY_IMMERSIVE_IN_DESKTOP) public void updateRelayoutParams_header_addsPaddingInFullImmersive() { Loading @@ -808,6 +855,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -832,6 +880,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -855,6 +904,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ false, Loading @@ -878,6 +928,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -900,6 +951,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ false, Loading @@ -922,6 +974,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -945,6 +998,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading @@ -960,6 +1014,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ false, Loading @@ -983,6 +1038,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase { relayoutParams, mTestableContext, taskInfo, mMockSplitScreenController, /* applyStartTransactionOnDraw= */ true, /* shouldSetTaskPositionAndCrop */ false, /* isStatusBarVisible */ true, Loading