Merge "Revert "PiP: Potentially hide menu immediately after it appears."" into rvc-dev am: d4445e0c86
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12065341 Change-Id: If78efe2ec7264bc5e7e4f2bd9db4ad016cceed14
This commit is contained in:
@@ -171,7 +171,6 @@ public class PipTouchHandler {
|
|||||||
private float mSavedSnapFraction = -1f;
|
private float mSavedSnapFraction = -1f;
|
||||||
private boolean mSendingHoverAccessibilityEvents;
|
private boolean mSendingHoverAccessibilityEvents;
|
||||||
private boolean mMovementWithinDismiss;
|
private boolean mMovementWithinDismiss;
|
||||||
private boolean mHideMenuAfterShown = false;
|
|
||||||
private PipAccessibilityInteractionConnection mConnection;
|
private PipAccessibilityInteractionConnection mConnection;
|
||||||
|
|
||||||
// Touch state
|
// Touch state
|
||||||
@@ -726,7 +725,6 @@ public class PipTouchHandler {
|
|||||||
// on and changing MotionEvents into HoverEvents.
|
// on and changing MotionEvents into HoverEvents.
|
||||||
// Let's not enable menu show/hide for a11y services.
|
// Let's not enable menu show/hide for a11y services.
|
||||||
if (!mAccessibilityManager.isTouchExplorationEnabled()) {
|
if (!mAccessibilityManager.isTouchExplorationEnabled()) {
|
||||||
mHideMenuAfterShown = true;
|
|
||||||
mTouchState.scheduleHoverExitTimeoutCallback();
|
mTouchState.scheduleHoverExitTimeoutCallback();
|
||||||
}
|
}
|
||||||
if (!shouldDeliverToMenu && mSendingHoverAccessibilityEvents) {
|
if (!shouldDeliverToMenu && mSendingHoverAccessibilityEvents) {
|
||||||
@@ -813,9 +811,6 @@ public class PipTouchHandler {
|
|||||||
mSavedSnapFraction = mMotionHelper.animateToExpandedState(expandedBounds,
|
mSavedSnapFraction = mMotionHelper.animateToExpandedState(expandedBounds,
|
||||||
mMovementBounds, mExpandedMovementBounds, callback);
|
mMovementBounds, mExpandedMovementBounds, callback);
|
||||||
}
|
}
|
||||||
if (mHideMenuAfterShown) {
|
|
||||||
mMenuController.hideMenu();
|
|
||||||
}
|
|
||||||
} else if (menuState == MENU_STATE_NONE && mMenuState == MENU_STATE_FULL) {
|
} else if (menuState == MENU_STATE_NONE && mMenuState == MENU_STATE_FULL) {
|
||||||
// Try and restore the PiP to the closest edge, using the saved snap fraction
|
// Try and restore the PiP to the closest edge, using the saved snap fraction
|
||||||
// if possible
|
// if possible
|
||||||
@@ -853,7 +848,6 @@ public class PipTouchHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
mMenuState = menuState;
|
mMenuState = menuState;
|
||||||
mHideMenuAfterShown = false;
|
|
||||||
updateMovementBounds();
|
updateMovementBounds();
|
||||||
// If pip menu has dismissed, we should register the A11y ActionReplacingConnection for pip
|
// If pip menu has dismissed, we should register the A11y ActionReplacingConnection for pip
|
||||||
// as well, or it can't handle a11y focus and pip menu can't perform any action.
|
// as well, or it can't handle a11y focus and pip menu can't perform any action.
|
||||||
|
|||||||
Reference in New Issue
Block a user