From 90ddc7bd978a25c924d7b793caf4d7425d0a7cbe Mon Sep 17 00:00:00 2001 From: Ben Lin Date: Mon, 31 Aug 2020 14:25:55 -0700 Subject: [PATCH] PiP: Hide menu when resize starts. Attempting to do resize while PIP menu is still visible causes weird isseus such as jank and flickering, so just hide it. This usually always happen already when user taps the outside bounds, but if the user starts from the inside corners it's problematic. Bug: 164882662 Test: Tap on PIP, see it expands and PIP menu shows up, try to resize - no more flickering Change-Id: If32aacc7e8d8f6784ad7fb83be14a8ba93c3491f --- .../android/systemui/pip/phone/PipResizeGestureHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java index f6853ecf8ee74..50d20d3572d1e 100644 --- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java +++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipResizeGestureHandler.java @@ -329,6 +329,10 @@ public class PipResizeGestureHandler { mInputMonitor.pilferPointers(); } if (mThresholdCrossed) { + if (mPipMenuActivityController.isMenuVisible()) { + mPipMenuActivityController.hideMenuWithoutResize(); + mPipMenuActivityController.hideMenu(); + } final Rect currentPipBounds = mMotionHelper.getBounds(); mLastResizeBounds.set(TaskResizingAlgorithm.resizeDrag(x, y, mDownPoint.x, mDownPoint.y, currentPipBounds, mCtrlType, mMinSize.x,