Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a0718ba authored by Ats Jenk's avatar Ats Jenk Committed by Android (Google) Code Review
Browse files

Merge "Allow dragging split tasks on foldables" into main

parents 7e0218cb 19ed7fa5
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -251,7 +251,8 @@ sealed class DragToDesktopTransitionHandler(
                (cancelState == CancelState.CANCEL_BUBBLE_LEFT ||
                    cancelState == CancelState.CANCEL_BUBBLE_RIGHT)
        ) {
            if (!bubbleController.isPresent) {
            if (bubbleController.isEmpty || state !is TransitionState.FromFullscreen) {
                // TODO(b/388853233): add support for dragging split task to bubble
                startCancelAnimation()
            } else {
                // Animation is handled by BubbleController
@@ -497,6 +498,11 @@ sealed class DragToDesktopTransitionHandler(
            state.cancelState == CancelState.CANCEL_BUBBLE_LEFT ||
                state.cancelState == CancelState.CANCEL_BUBBLE_RIGHT
        ) {
            if (bubbleController.isEmpty || state !is TransitionState.FromFullscreen) {
                // TODO(b/388853233): add support for dragging split task to bubble
                startCancelDragToDesktopTransition()
                return true
            }
            val taskInfo =
                state.draggedTaskChange?.taskInfo ?: error("Expected non-null task info.")
            val wct = WindowContainerTransaction()
+2 −5
Original line number Diff line number Diff line
@@ -1476,16 +1476,13 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel,
                        relevantDecor.mTaskInfo.configuration.windowConfiguration.getBounds());
                boolean dragFromStatusBarAllowed = false;
                final int windowingMode = relevantDecor.mTaskInfo.getWindowingMode();
                if (DesktopModeStatus.canEnterDesktopMode(mContext)) {
                if (DesktopModeStatus.canEnterDesktopMode(mContext)
                        || BubbleAnythingFlagHelper.enableBubbleToFullscreen()) {
                    // In proto2 any full screen or multi-window task can be dragged to
                    // freeform.
                    dragFromStatusBarAllowed = windowingMode == WINDOWING_MODE_FULLSCREEN
                            || windowingMode == WINDOWING_MODE_MULTI_WINDOW;
                }
                if (BubbleAnythingFlagHelper.enableBubbleToFullscreen()) {
                    // TODO(b/388851898): add support for split screen (multi-window wm mode)
                    dragFromStatusBarAllowed = windowingMode == WINDOWING_MODE_FULLSCREEN;
                }
                final boolean shouldStartTransitionDrag =
                        relevantDecor.checkTouchEventInFocusedCaptionHandle(ev)
                                || DesktopModeFlags.ENABLE_HANDLE_INPUT_FIX.isTrue();