Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +5 −1 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ import com.android.wm.shell.sysui.ShellInit import com.android.wm.shell.sysui.ShellSharedConstants import com.android.wm.shell.transition.Transitions import com.android.wm.shell.util.KtProtoLog import com.android.wm.shell.windowdecor.DesktopModeWindowDecoration import java.io.PrintWriter import java.util.concurrent.Executor import java.util.function.Consumer Loading Loading @@ -614,14 +615,17 @@ class DesktopTasksController( * @param taskInfo the task being dragged. * @param position position of surface when drag ends. * @param y the Y position of the motion event. * @param windowDecor the window decoration for the task being dragged */ fun onDragPositioningEnd( taskInfo: RunningTaskInfo, position: Point, y: Float y: Float, windowDecor: DesktopModeWindowDecoration ) { val statusBarHeight = getStatusBarHeight(taskInfo) if (y <= statusBarHeight && taskInfo.windowingMode == WINDOWING_MODE_FREEFORM) { windowDecor.incrementRelayoutBlock() moveToFullscreenWithAnimation(taskInfo, position) } } Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +6 −4 Original line number Diff line number Diff line Loading @@ -193,7 +193,9 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { @NonNull TransitionInfo info, @NonNull TransitionInfo.Change change) { if (change.getMode() == WindowManager.TRANSIT_CHANGE && (info.getType() == Transitions.TRANSIT_ENTER_DESKTOP_MODE)) { && (info.getType() == Transitions.TRANSIT_ENTER_DESKTOP_MODE || info.getType() == Transitions.TRANSIT_CANCEL_ENTERING_DESKTOP_MODE || info.getType() == Transitions.TRANSIT_EXIT_DESKTOP_MODE)) { mWindowDecorByTaskId.get(change.getTaskInfo().taskId) .addTransitionPausingRelayout(transition); } Loading Loading @@ -411,7 +413,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { mDragPositioningCallback.onDragPositioningEnd( e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx)); mDesktopTasksController.ifPresent(c -> c.onDragPositioningEnd(taskInfo, position, e.getRawY())); position, e.getRawY(), mWindowDecorByTaskId.get(mTaskId))); final boolean wasDragging = mIsDragging; mIsDragging = false; return wasDragging; Loading Loading @@ -577,9 +579,9 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { return; } else if (mDragToDesktopAnimationStarted) { Point position = new Point((int) ev.getX(), (int) ev.getY()); relevantDecor.incrementRelayoutBlock(); mDesktopTasksController.ifPresent( c -> c.cancelMoveToFreeform(relevantDecor.mTaskInfo, position)); c -> c.cancelMoveToFreeform(relevantDecor.mTaskInfo, position)); mDragToDesktopAnimationStarted = false; return; } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +5 −1 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ import com.android.wm.shell.sysui.ShellInit import com.android.wm.shell.sysui.ShellSharedConstants import com.android.wm.shell.transition.Transitions import com.android.wm.shell.util.KtProtoLog import com.android.wm.shell.windowdecor.DesktopModeWindowDecoration import java.io.PrintWriter import java.util.concurrent.Executor import java.util.function.Consumer Loading Loading @@ -614,14 +615,17 @@ class DesktopTasksController( * @param taskInfo the task being dragged. * @param position position of surface when drag ends. * @param y the Y position of the motion event. * @param windowDecor the window decoration for the task being dragged */ fun onDragPositioningEnd( taskInfo: RunningTaskInfo, position: Point, y: Float y: Float, windowDecor: DesktopModeWindowDecoration ) { val statusBarHeight = getStatusBarHeight(taskInfo) if (y <= statusBarHeight && taskInfo.windowingMode == WINDOWING_MODE_FREEFORM) { windowDecor.incrementRelayoutBlock() moveToFullscreenWithAnimation(taskInfo, position) } } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +6 −4 Original line number Diff line number Diff line Loading @@ -193,7 +193,9 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { @NonNull TransitionInfo info, @NonNull TransitionInfo.Change change) { if (change.getMode() == WindowManager.TRANSIT_CHANGE && (info.getType() == Transitions.TRANSIT_ENTER_DESKTOP_MODE)) { && (info.getType() == Transitions.TRANSIT_ENTER_DESKTOP_MODE || info.getType() == Transitions.TRANSIT_CANCEL_ENTERING_DESKTOP_MODE || info.getType() == Transitions.TRANSIT_EXIT_DESKTOP_MODE)) { mWindowDecorByTaskId.get(change.getTaskInfo().taskId) .addTransitionPausingRelayout(transition); } Loading Loading @@ -411,7 +413,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { mDragPositioningCallback.onDragPositioningEnd( e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx)); mDesktopTasksController.ifPresent(c -> c.onDragPositioningEnd(taskInfo, position, e.getRawY())); position, e.getRawY(), mWindowDecorByTaskId.get(mTaskId))); final boolean wasDragging = mIsDragging; mIsDragging = false; return wasDragging; Loading Loading @@ -577,9 +579,9 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { return; } else if (mDragToDesktopAnimationStarted) { Point position = new Point((int) ev.getX(), (int) ev.getY()); relevantDecor.incrementRelayoutBlock(); mDesktopTasksController.ifPresent( c -> c.cancelMoveToFreeform(relevantDecor.mTaskInfo, position)); c -> c.cancelMoveToFreeform(relevantDecor.mTaskInfo, position)); mDragToDesktopAnimationStarted = false; return; } Loading