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

Commit 35f7ed34 authored by Maryam Dehaini's avatar Maryam Dehaini Committed by Android (Google) Code Review
Browse files

Merge "Transition to fullscreen based on position of motion event" into udc-qpr-dev

parents e95c5f05 728333dc
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -574,14 +574,16 @@ class DesktopTasksController(
     * Perform checks required on drag end. Move to fullscreen if drag ends in status bar area.
     *
     * @param taskInfo the task being dragged.
     * @param position position of surface when drag ends
     * @param position position of surface when drag ends.
     * @param y the Y position of the motion event.
     */
    fun onDragPositioningEnd(
            taskInfo: RunningTaskInfo,
            position: Point
            position: Point,
            y: Float
    ) {
        val statusBarHeight = getStatusBarHeight(taskInfo)
        if (position.y <= statusBarHeight && taskInfo.windowingMode == WINDOWING_MODE_FREEFORM) {
        if (y <= statusBarHeight && taskInfo.windowingMode == WINDOWING_MODE_FREEFORM) {
            moveToFullscreenWithAnimation(taskInfo, position)
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -411,7 +411,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
                    mDragPositioningCallback.onDragPositioningEnd(
                            e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx));
                    mDesktopTasksController.ifPresent(c -> c.onDragPositioningEnd(taskInfo,
                            position));
                            position, e.getRawY()));
                    final boolean wasDragging = mIsDragging;
                    mIsDragging = false;
                    return wasDragging;