diff options
4 files changed, 17 insertions, 17 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java index 1acf783257f2..22929c763f27 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java @@ -88,7 +88,7 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition } /** - * Starts Transition of type TRANSIT_START_MOVE_TO_DESKTOP_MODE + * Starts Transition of type TRANSIT_START_DRAG_TO_DESKTOP_MODE * @param wct WindowContainerTransaction for transition * @param moveToDesktopAnimator Animator that shrinks and positions task during two part move * to desktop animation @@ -98,18 +98,18 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition @NonNull MoveToDesktopAnimator moveToDesktopAnimator, Consumer<SurfaceControl.Transaction> onAnimationEndCallback) { mMoveToDesktopAnimator = moveToDesktopAnimator; - startTransition(Transitions.TRANSIT_START_MOVE_TO_DESKTOP_MODE, wct, + startTransition(Transitions.TRANSIT_START_DRAG_TO_DESKTOP_MODE, wct, onAnimationEndCallback); } /** - * Starts Transition of type TRANSIT_FINALIZE_MOVE_TO_DESKTOP_MODE + * Starts Transition of type TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE * @param wct WindowContainerTransaction for transition * @param onAnimationEndCallback to be called after animation */ public void finalizeMoveToDesktop(@NonNull WindowContainerTransaction wct, Consumer<SurfaceControl.Transaction> onAnimationEndCallback) { - startTransition(Transitions.TRANSIT_FINALIZE_MOVE_TO_DESKTOP_MODE, wct, + startTransition(Transitions.TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE, wct, onAnimationEndCallback); } @@ -124,7 +124,7 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition MoveToDesktopAnimator moveToDesktopAnimator, Consumer<SurfaceControl.Transaction> onAnimationEndCallback) { mMoveToDesktopAnimator = moveToDesktopAnimator; - startTransition(Transitions.TRANSIT_CANCEL_ENTERING_DESKTOP_MODE, wct, + startTransition(Transitions.TRANSIT_CANCEL_DRAG_TO_DESKTOP_MODE, wct, onAnimationEndCallback); } @@ -167,7 +167,7 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition } final ActivityManager.RunningTaskInfo taskInfo = change.getTaskInfo(); - if (type == Transitions.TRANSIT_START_MOVE_TO_DESKTOP_MODE + if (type == Transitions.TRANSIT_START_DRAG_TO_DESKTOP_MODE && taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM) { // Transitioning to freeform but keeping fullscreen bounds, so the crop is set // to null and we don't require an animation @@ -194,7 +194,7 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition } Rect endBounds = change.getEndAbsBounds(); - if (type == Transitions.TRANSIT_FINALIZE_MOVE_TO_DESKTOP_MODE + if (type == Transitions.TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE && taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM && !endBounds.isEmpty()) { // This Transition animates a task to freeform bounds after being dragged into freeform @@ -246,7 +246,7 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition return true; } - if (type == Transitions.TRANSIT_CANCEL_ENTERING_DESKTOP_MODE + if (type == Transitions.TRANSIT_CANCEL_DRAG_TO_DESKTOP_MODE && taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM) { // This Transition animates a task to fullscreen after being dragged from the status // bar and then released back into the status bar area diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java index 4ca383f66267..e45dacf1189d 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java @@ -150,18 +150,18 @@ public class Transitions implements RemoteCallable<Transitions>, public static final int TRANSIT_RESTORE_FROM_MAXIMIZE = WindowManager.TRANSIT_FIRST_CUSTOM + 9; /** Transition type for starting the move to desktop mode. */ - public static final int TRANSIT_START_MOVE_TO_DESKTOP_MODE = + public static final int TRANSIT_START_DRAG_TO_DESKTOP_MODE = WindowManager.TRANSIT_FIRST_CUSTOM + 10; /** Transition type for finalizing the move to desktop mode. */ - public static final int TRANSIT_FINALIZE_MOVE_TO_DESKTOP_MODE = + public static final int TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE = WindowManager.TRANSIT_FIRST_CUSTOM + 11; /** Transition type to fullscreen from desktop mode. */ public static final int TRANSIT_EXIT_DESKTOP_MODE = WindowManager.TRANSIT_FIRST_CUSTOM + 12; /** Transition type to animate back to fullscreen when drag to freeform is cancelled. */ - public static final int TRANSIT_CANCEL_ENTERING_DESKTOP_MODE = + public static final int TRANSIT_CANCEL_DRAG_TO_DESKTOP_MODE = WindowManager.TRANSIT_FIRST_CUSTOM + 13; /** Transition type to animate the toggle resize between the max and default desktop sizes. */ diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java index 80cf96a93efa..bb40fd44b5a2 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java @@ -197,8 +197,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { @NonNull TransitionInfo info, @NonNull TransitionInfo.Change change) { if (change.getMode() == WindowManager.TRANSIT_CHANGE - && (info.getType() == Transitions.TRANSIT_FINALIZE_MOVE_TO_DESKTOP_MODE - || info.getType() == Transitions.TRANSIT_CANCEL_ENTERING_DESKTOP_MODE + && (info.getType() == Transitions.TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE + || info.getType() == Transitions.TRANSIT_CANCEL_DRAG_TO_DESKTOP_MODE || info.getType() == Transitions.TRANSIT_EXIT_DESKTOP_MODE || info.getType() == Transitions.TRANSIT_DESKTOP_MODE_TOGGLE_RESIZE)) { mWindowDecorByTaskId.get(change.getTaskInfo().taskId) diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandlerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandlerTest.java index 885ae3851c6d..772d97d8eb32 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandlerTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandlerTest.java @@ -99,7 +99,7 @@ public class EnterDesktopTaskTransitionHandlerTest { final int taskId = 1; WindowContainerTransaction wct = new WindowContainerTransaction(); doReturn(mToken).when(mTransitions) - .startTransition(Transitions.TRANSIT_START_MOVE_TO_DESKTOP_MODE, wct, + .startTransition(Transitions.TRANSIT_START_DRAG_TO_DESKTOP_MODE, wct, mEnterDesktopTaskTransitionHandler); doReturn(taskId).when(mMoveToDesktopAnimator).getTaskId(); @@ -108,7 +108,7 @@ public class EnterDesktopTaskTransitionHandlerTest { TransitionInfo.Change change = createChange(WindowManager.TRANSIT_CHANGE, taskId, WINDOWING_MODE_FREEFORM); - TransitionInfo info = createTransitionInfo(Transitions.TRANSIT_START_MOVE_TO_DESKTOP_MODE, + TransitionInfo info = createTransitionInfo(Transitions.TRANSIT_START_DRAG_TO_DESKTOP_MODE, change); @@ -121,7 +121,7 @@ public class EnterDesktopTaskTransitionHandlerTest { @Test public void testTransitEnterDesktopModeAnimation() throws Throwable { - final int transitionType = Transitions.TRANSIT_FINALIZE_MOVE_TO_DESKTOP_MODE; + final int transitionType = Transitions.TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE; final int taskId = 1; WindowContainerTransaction wct = new WindowContainerTransaction(); doReturn(mToken).when(mTransitions) @@ -132,7 +132,7 @@ public class EnterDesktopTaskTransitionHandlerTest { createChange(WindowManager.TRANSIT_CHANGE, taskId, WINDOWING_MODE_FREEFORM); change.setEndAbsBounds(new Rect(0, 0, 1, 1)); TransitionInfo info = createTransitionInfo( - Transitions.TRANSIT_FINALIZE_MOVE_TO_DESKTOP_MODE, change); + Transitions.TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE, change); runOnUiThread(() -> { try { |