diff options
| author | 2024-11-27 07:07:11 +0000 | |
|---|---|---|
| committer | 2024-11-27 07:07:11 +0000 | |
| commit | 27477f793b139c3f3ba99fd427c66f44b2ad5c98 (patch) | |
| tree | 28cbf4a44a1cd8d7b5dec550293aeff3d4b45b9a | |
| parent | 7e29ae475ad977fdf9d9ea8354f4627d47fa9cc7 (diff) | |
| parent | ebbb72d787f9c955daa03b3b8269565b04810eac (diff) | |
Merge "End ripple effect on maximized button when finished dragging" into main
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java | 5 |
1 files changed, 1 insertions, 4 deletions
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 0c077da0a5e8..e8b02dcb7a71 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 @@ -831,7 +831,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, private boolean mIsResizeGesture; private boolean mIsDragging; private boolean mTouchscreenInUse; - private boolean mHasLongClicked; private int mDragPointerId = -1; private MotionEvent mMotionEvent; @@ -990,7 +989,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, if (decoration.isMaximizeMenuActive()) { decoration.closeMaximizeMenu(); } else { - mHasLongClicked = true; mDesktopModeUiEventLogger.log(decoration.mTaskInfo, DesktopUiEventEnum.DESKTOP_WINDOW_MAXIMIZE_BUTTON_REVEAL_MENU); decoration.createMaximizeMenu(); @@ -1101,7 +1099,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, updateDragStatus(e.getActionMasked()); mOnDragStartInitialBounds.set(initialBounds); } - mHasLongClicked = false; // Do not consume input event if a button is touched, otherwise it would // prevent the button's ripple effect from showing. return !touchingButton; @@ -1158,7 +1155,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, newTaskBounds, decoration.calculateValidDragArea(), new Rect(mOnDragStartInitialBounds), e, mWindowDecorByTaskId.get(taskInfo.taskId)); - if (touchingButton && !mHasLongClicked) { + if (touchingButton) { // We need the input event to not be consumed here to end the ripple // effect on the touched button. We will reset drag state in the ensuing // onClick call that results. |