Merge "Fix split screen test case failure" into tm-qpr-dev am: 8af0860b12 am: 35318afb7c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20729659

Change-Id: I4d02fe9fe951d4426f615f5f27c66095256fb0ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jeff Chang
2022-12-18 16:44:24 +00:00
committed by Automerger Merge Worker

View File

@@ -155,7 +155,7 @@ public class StageCoordinatorTests extends ShellTestCase {
final ActivityManager.RunningTaskInfo task = new TestRunningTaskInfoBuilder().build();
// Verify move to undefined stage while split screen not activated moves task to side stage.
when(mMainStage.isActive()).thenReturn(false);
when(mStageCoordinator.isSplitScreenVisible()).thenReturn(false);
mStageCoordinator.setSideStagePosition(SPLIT_POSITION_TOP_OR_LEFT, null);
mStageCoordinator.moveToStage(task, STAGE_TYPE_UNDEFINED, SPLIT_POSITION_BOTTOM_OR_RIGHT,
new WindowContainerTransaction());
@@ -163,7 +163,7 @@ public class StageCoordinatorTests extends ShellTestCase {
assertEquals(SPLIT_POSITION_BOTTOM_OR_RIGHT, mStageCoordinator.getSideStagePosition());
// Verify move to undefined stage after split screen activated moves task based on position.
when(mMainStage.isActive()).thenReturn(true);
when(mStageCoordinator.isSplitScreenVisible()).thenReturn(true);
assertEquals(SPLIT_POSITION_TOP_OR_LEFT, mStageCoordinator.getMainStagePosition());
mStageCoordinator.moveToStage(task, STAGE_TYPE_UNDEFINED, SPLIT_POSITION_TOP_OR_LEFT,
new WindowContainerTransaction());
@@ -262,7 +262,7 @@ public class StageCoordinatorTests extends ShellTestCase {
@Test
public void testResolveStartStage_afterSplitActivated_retrievesStagePosition() {
when(mMainStage.isActive()).thenReturn(true);
when(mStageCoordinator.isSplitScreenVisible()).thenReturn(true);
mStageCoordinator.setSideStagePosition(SPLIT_POSITION_TOP_OR_LEFT, null /* wct */);
mStageCoordinator.resolveStartStage(STAGE_TYPE_UNDEFINED, SPLIT_POSITION_TOP_OR_LEFT,