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
This commit is contained in:
Ben Lin
2020-08-31 14:25:55 -07:00
parent a90f6e059f
commit 90ddc7bd97

View File

@@ -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,