Loading libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java +5 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,11 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { mHideTaskWithSurface = hideTaskWithSurface; } @VisibleForTesting SurfaceControl getTaskLeash() { return mTaskLeash; } SurfaceControl getSurfaceControl() { return mSurfaceControl; } Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/taskview/TaskViewTest.java +12 −0 Original line number Diff line number Diff line Loading @@ -433,10 +433,13 @@ public class TaskViewTest extends ShellTestCase { mTaskViewTransitions.prepareOpenAnimation(mTaskViewTaskController, true /* newTask */, new SurfaceControl.Transaction(), new SurfaceControl.Transaction(), mTaskInfo, mLeash, wct); final SurfaceControl taskLeash = mTaskViewTaskController.getTaskLeash(); mTaskView.surfaceCreated(mock(SurfaceHolder.class)); mTaskViewTaskController.prepareCloseAnimation(); verify(mViewListener).onTaskRemovalStarted(eq(mTaskInfo.taskId)); assertThat(mTaskViewTaskController.getTaskLeash()).isNull(); assertThat(taskLeash.isValid()).isFalse(); } @Test Loading Loading @@ -586,6 +589,15 @@ public class TaskViewTest extends ShellTestCase { } } @Test public void testPrepareOpenAnimation_copiesLeash() { mTaskViewTransitions.prepareOpenAnimation(mTaskViewTaskController, true /* newTask */, new SurfaceControl.Transaction(), new SurfaceControl.Transaction(), mTaskInfo, mLeash, new WindowContainerTransaction()); assertThat(mTaskViewTaskController.getTaskLeash()).isNotEqualTo(mLeash); } @Test public void testTaskViewPrepareOpenAnimationSetsBoundsAndVisibility() { assumeTrue(Transitions.ENABLE_SHELL_TRANSITIONS); Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java +5 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,11 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener { mHideTaskWithSurface = hideTaskWithSurface; } @VisibleForTesting SurfaceControl getTaskLeash() { return mTaskLeash; } SurfaceControl getSurfaceControl() { return mSurfaceControl; } Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/taskview/TaskViewTest.java +12 −0 Original line number Diff line number Diff line Loading @@ -433,10 +433,13 @@ public class TaskViewTest extends ShellTestCase { mTaskViewTransitions.prepareOpenAnimation(mTaskViewTaskController, true /* newTask */, new SurfaceControl.Transaction(), new SurfaceControl.Transaction(), mTaskInfo, mLeash, wct); final SurfaceControl taskLeash = mTaskViewTaskController.getTaskLeash(); mTaskView.surfaceCreated(mock(SurfaceHolder.class)); mTaskViewTaskController.prepareCloseAnimation(); verify(mViewListener).onTaskRemovalStarted(eq(mTaskInfo.taskId)); assertThat(mTaskViewTaskController.getTaskLeash()).isNull(); assertThat(taskLeash.isValid()).isFalse(); } @Test Loading Loading @@ -586,6 +589,15 @@ public class TaskViewTest extends ShellTestCase { } } @Test public void testPrepareOpenAnimation_copiesLeash() { mTaskViewTransitions.prepareOpenAnimation(mTaskViewTaskController, true /* newTask */, new SurfaceControl.Transaction(), new SurfaceControl.Transaction(), mTaskInfo, mLeash, new WindowContainerTransaction()); assertThat(mTaskViewTaskController.getTaskLeash()).isNotEqualTo(mLeash); } @Test public void testTaskViewPrepareOpenAnimationSetsBoundsAndVisibility() { assumeTrue(Transitions.ENABLE_SHELL_TRANSITIONS); Loading