Merge "Skip passing gesture to bubble when notif expanded" into tm-dev am: 6e6d747d95

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18290837

Change-Id: Idfb054d13409a7c89a65f2a1d3b8463e7a94aa90
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Ats Jenk
2022-05-12 03:46:54 +00:00
committed by Automerger Merge Worker
2 changed files with 11 additions and 1 deletions

View File

@@ -418,6 +418,13 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener {
return (mSystemUiStateFlags & SYSUI_STATE_BUBBLES_EXPANDED) != 0;
}
/**
* @return whether notification panel is expanded
*/
public boolean isNotificationPanelExpanded() {
return (mSystemUiStateFlags & SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) != 0;
}
/**
* @return whether the global actions dialog is showing
*/

View File

@@ -700,7 +700,10 @@ public class TouchInteractionService extends Service
// If Bubbles is expanded, use the overlay input consumer, which will close Bubbles
// instead of going all the way home when a swipe up is detected.
if (mDeviceState.isBubblesExpanded() || mDeviceState.isSystemUiDialogShowing()) {
// Notification panel can be expanded on top of expanded bubbles. Bubbles remain
// expanded in the back. Make sure swipe up is not passed to bubbles in this case.
if ((mDeviceState.isBubblesExpanded() && !mDeviceState.isNotificationPanelExpanded())
|| mDeviceState.isSystemUiDialogShowing()) {
base = new SysUiOverlayInputConsumer(
getBaseContext(), mDeviceState, mInputMonitorCompat);
}