Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java +3 −0 Original line number Diff line number Diff line Loading @@ -271,6 +271,9 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel { if (e.findPointerIndex(mDragPointerId) == -1) { mDragPointerId = e.getPointerId(0); } final CaptionWindowDecoration decoration = mWindowDecorByTaskId.get(mTaskId); // If a decor's resize drag zone is active, don't also try to reposition it. if (decoration.isHandlingDragResize()) break; final int dragPointerIdx = e.findPointerIndex(mDragPointerId); mDragPositioningCallback.onDragPositioningMove( e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx)); Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java +4 −0 Original line number Diff line number Diff line Loading @@ -286,6 +286,10 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL closeBackground.setTintList(buttonTintColor); } boolean isHandlingDragResize() { return mDragResizeListener.isHandlingDragResize(); } private void closeDragResizeListener() { if (mDragResizeListener == null) { return; Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +3 −1 Original line number Diff line number Diff line Loading @@ -491,8 +491,11 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { return true; } case MotionEvent.ACTION_MOVE: { mShouldClick = false; final DesktopModeWindowDecoration decoration = mWindowDecorByTaskId.get(mTaskId); // If a decor's resize drag zone is active, don't also try to reposition it. if (decoration.isHandlingDragResize()) break; decoration.closeMaximizeMenu(); if (e.findPointerIndex(mDragPointerId) == -1) { mDragPointerId = e.getPointerId(0); Loading @@ -505,7 +508,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { e.getRawX(dragPointerIdx), newTaskBounds)); mIsDragging = true; mShouldClick = false; return true; } case MotionEvent.ACTION_UP: Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +4 −0 Original line number Diff line number Diff line Loading @@ -387,6 +387,10 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin return mHandleMenu != null; } boolean isHandlingDragResize() { return mDragResizeListener.isHandlingDragResize(); } private void loadAppInfo() { String packageName = mTaskInfo.realActivity.getPackageName(); PackageManager pm = mContext.getApplicationContext().getPackageManager(); Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java +10 −1 Original line number Diff line number Diff line Loading @@ -320,6 +320,10 @@ class DragResizeInputListener implements AutoCloseable { } } boolean isHandlingDragResize() { return mInputEventReceiver.isHandlingEvents(); } @Override public void close() { mInputEventReceiver.dispose(); Loading Loading @@ -386,6 +390,10 @@ class DragResizeInputListener implements AutoCloseable { finishInputEvent(inputEvent, handleInputEvent(inputEvent)); } boolean isHandlingEvents() { return mShouldHandleEvents; } private boolean handleInputEvent(InputEvent inputEvent) { if (!(inputEvent instanceof MotionEvent)) { return false; Loading @@ -409,7 +417,6 @@ class DragResizeInputListener implements AutoCloseable { mShouldHandleEvents = isInResizeHandleBounds(x, y); } if (mShouldHandleEvents) { mInputManager.pilferPointers(mInputChannel.getToken()); mDragPointerId = e.getPointerId(0); float rawX = e.getRawX(0); float rawY = e.getRawY(0); Loading @@ -427,6 +434,7 @@ class DragResizeInputListener implements AutoCloseable { if (!mShouldHandleEvents) { break; } mInputManager.pilferPointers(mInputChannel.getToken()); int dragPointerIndex = e.findPointerIndex(mDragPointerId); float rawX = e.getRawX(dragPointerIndex); float rawY = e.getRawY(dragPointerIndex); Loading @@ -437,6 +445,7 @@ class DragResizeInputListener implements AutoCloseable { } case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: { mInputManager.pilferPointers(mInputChannel.getToken()); if (mShouldHandleEvents) { int dragPointerIndex = e.findPointerIndex(mDragPointerId); final Rect taskBounds = mCallback.onDragPositioningEnd( Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java +3 −0 Original line number Diff line number Diff line Loading @@ -271,6 +271,9 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel { if (e.findPointerIndex(mDragPointerId) == -1) { mDragPointerId = e.getPointerId(0); } final CaptionWindowDecoration decoration = mWindowDecorByTaskId.get(mTaskId); // If a decor's resize drag zone is active, don't also try to reposition it. if (decoration.isHandlingDragResize()) break; final int dragPointerIdx = e.findPointerIndex(mDragPointerId); mDragPositioningCallback.onDragPositioningMove( e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx)); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java +4 −0 Original line number Diff line number Diff line Loading @@ -286,6 +286,10 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL closeBackground.setTintList(buttonTintColor); } boolean isHandlingDragResize() { return mDragResizeListener.isHandlingDragResize(); } private void closeDragResizeListener() { if (mDragResizeListener == null) { return; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +3 −1 Original line number Diff line number Diff line Loading @@ -491,8 +491,11 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { return true; } case MotionEvent.ACTION_MOVE: { mShouldClick = false; final DesktopModeWindowDecoration decoration = mWindowDecorByTaskId.get(mTaskId); // If a decor's resize drag zone is active, don't also try to reposition it. if (decoration.isHandlingDragResize()) break; decoration.closeMaximizeMenu(); if (e.findPointerIndex(mDragPointerId) == -1) { mDragPointerId = e.getPointerId(0); Loading @@ -505,7 +508,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { e.getRawX(dragPointerIdx), newTaskBounds)); mIsDragging = true; mShouldClick = false; return true; } case MotionEvent.ACTION_UP: Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +4 −0 Original line number Diff line number Diff line Loading @@ -387,6 +387,10 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin return mHandleMenu != null; } boolean isHandlingDragResize() { return mDragResizeListener.isHandlingDragResize(); } private void loadAppInfo() { String packageName = mTaskInfo.realActivity.getPackageName(); PackageManager pm = mContext.getApplicationContext().getPackageManager(); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java +10 −1 Original line number Diff line number Diff line Loading @@ -320,6 +320,10 @@ class DragResizeInputListener implements AutoCloseable { } } boolean isHandlingDragResize() { return mInputEventReceiver.isHandlingEvents(); } @Override public void close() { mInputEventReceiver.dispose(); Loading Loading @@ -386,6 +390,10 @@ class DragResizeInputListener implements AutoCloseable { finishInputEvent(inputEvent, handleInputEvent(inputEvent)); } boolean isHandlingEvents() { return mShouldHandleEvents; } private boolean handleInputEvent(InputEvent inputEvent) { if (!(inputEvent instanceof MotionEvent)) { return false; Loading @@ -409,7 +417,6 @@ class DragResizeInputListener implements AutoCloseable { mShouldHandleEvents = isInResizeHandleBounds(x, y); } if (mShouldHandleEvents) { mInputManager.pilferPointers(mInputChannel.getToken()); mDragPointerId = e.getPointerId(0); float rawX = e.getRawX(0); float rawY = e.getRawY(0); Loading @@ -427,6 +434,7 @@ class DragResizeInputListener implements AutoCloseable { if (!mShouldHandleEvents) { break; } mInputManager.pilferPointers(mInputChannel.getToken()); int dragPointerIndex = e.findPointerIndex(mDragPointerId); float rawX = e.getRawX(dragPointerIndex); float rawY = e.getRawY(dragPointerIndex); Loading @@ -437,6 +445,7 @@ class DragResizeInputListener implements AutoCloseable { } case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: { mInputManager.pilferPointers(mInputChannel.getToken()); if (mShouldHandleEvents) { int dragPointerIndex = e.findPointerIndex(mDragPointerId); final Rect taskBounds = mCallback.onDragPositioningEnd( Loading