From 3243b4bad3eef58ab9ec92b77c337ce0599a95b3 Mon Sep 17 00:00:00 2001 From: Jeff Chang Date: Wed, 14 Dec 2022 22:04:37 +0800 Subject: Fix split screen test case failure 5af1f6704d88d4972, change to use isSplitScreenVisible for related logic. This CL updates the test case with the change together. Bug: 262544588 Test: atest com.android.wm.shell.splitscreen Change-Id: I5713effd96d972b31fad963ed1b966a494ff7823 --- .../src/com/android/wm/shell/splitscreen/StageCoordinatorTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/StageCoordinatorTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/StageCoordinatorTests.java index 3569860b6128..f3b18564b15d 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/StageCoordinatorTests.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/StageCoordinatorTests.java @@ -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, -- cgit v1.2.3-59-g8ed1b