Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java +18 −9 Original line number Diff line number Diff line Loading @@ -292,20 +292,29 @@ public class PipResizeGestureHandler { break; case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: mPipTaskOrganizer.scheduleFinishResizePip(mLastResizeBounds, (Rect bounds) -> { if (!mLastResizeBounds.isEmpty()) { mPipTaskOrganizer.scheduleFinishResizePip(mLastResizeBounds, (Rect bounds) -> { new Handler(Looper.getMainLooper()).post(() -> { mMotionHelper.synchronizePinnedStackBounds(); mUpdateMovementBoundsRunnable.run(); mCtrlType = CTRL_NONE; mAllowGesture = false; mThresholdCrossed = false; resetState(); }); }); } else { resetState(); } break; } } } private void resetState() { mCtrlType = CTRL_NONE; mAllowGesture = false; mThresholdCrossed = false; } void updateMaxSize(int maxX, int maxY) { mMaxSize.set(maxX, maxY); } Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java +1 −3 Original line number Diff line number Diff line Loading @@ -606,11 +606,9 @@ public class PipTouchHandler { MotionEvent ev = (MotionEvent) inputEvent; if (mPipResizeGestureHandler.isWithinTouchRegion((int) ev.getX(), (int) ev.getY())) { if (mPipResizeGestureHandler.isWithinTouchRegion((int) ev.getRawX(), (int) ev.getRawY())) { return true; } if (mMagnetizedPip.maybeConsumeMotionEvent(ev)) { // If the first touch event occurs within the magnetic field, pass the ACTION_DOWN event // to the touch state. Touch state needs a DOWN event in order to later process MOVE Loading Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java +18 −9 Original line number Diff line number Diff line Loading @@ -292,20 +292,29 @@ public class PipResizeGestureHandler { break; case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: mPipTaskOrganizer.scheduleFinishResizePip(mLastResizeBounds, (Rect bounds) -> { if (!mLastResizeBounds.isEmpty()) { mPipTaskOrganizer.scheduleFinishResizePip(mLastResizeBounds, (Rect bounds) -> { new Handler(Looper.getMainLooper()).post(() -> { mMotionHelper.synchronizePinnedStackBounds(); mUpdateMovementBoundsRunnable.run(); mCtrlType = CTRL_NONE; mAllowGesture = false; mThresholdCrossed = false; resetState(); }); }); } else { resetState(); } break; } } } private void resetState() { mCtrlType = CTRL_NONE; mAllowGesture = false; mThresholdCrossed = false; } void updateMaxSize(int maxX, int maxY) { mMaxSize.set(maxX, maxY); } Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java +1 −3 Original line number Diff line number Diff line Loading @@ -606,11 +606,9 @@ public class PipTouchHandler { MotionEvent ev = (MotionEvent) inputEvent; if (mPipResizeGestureHandler.isWithinTouchRegion((int) ev.getX(), (int) ev.getY())) { if (mPipResizeGestureHandler.isWithinTouchRegion((int) ev.getRawX(), (int) ev.getRawY())) { return true; } if (mMagnetizedPip.maybeConsumeMotionEvent(ev)) { // If the first touch event occurs within the magnetic field, pass the ACTION_DOWN event // to the touch state. Touch state needs a DOWN event in order to later process MOVE Loading