From eeb675683ba25912f5cc09221c074d62c74a1664 Mon Sep 17 00:00:00 2001 From: Joshua Tsuji Date: Mon, 1 Jun 2020 14:21:33 -0400 Subject: [PATCH] Add SysUiOverlayInputConsumer. This consumer is used when Bubbles is expanded, and causes swipes up to hide bubbles via closeSystemDialogs rather than going all the way home. Test: install launcher and swipe up (after including the other CL in this topic) Fixes: 156390484 Change-Id: I36b71dd95dc45a5a547eddfe0faddf61630b6f25 --- .../quickstep/TouchInteractionService.java | 8 ++ .../SysUiOverlayInputConsumer.java | 86 +++++++++++++++++++ .../com/android/quickstep/InputConsumer.java | 2 + .../RecentsAnimationDeviceState.java | 8 +- 4 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/SysUiOverlayInputConsumer.java diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java index 4954588790..0ea735dcba 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java @@ -81,6 +81,7 @@ import com.android.quickstep.inputconsumers.OverviewInputConsumer; import com.android.quickstep.inputconsumers.OverviewWithoutFocusInputConsumer; import com.android.quickstep.inputconsumers.ResetGestureInputConsumer; import com.android.quickstep.inputconsumers.ScreenPinnedInputConsumer; +import com.android.quickstep.inputconsumers.SysUiOverlayInputConsumer; import com.android.quickstep.util.ActiveGestureLog; import com.android.quickstep.util.AssistantUtilities; import com.android.quickstep.util.ProtoTracer; @@ -588,6 +589,13 @@ public class TouchInteractionService extends Service implements PluginListener TYPE_NO_OP; diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java index 6e7c423821..bd667fc102 100644 --- a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java +++ b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java @@ -360,7 +360,6 @@ public class RecentsAnimationDeviceState implements return (mSystemUiStateFlags & SYSUI_STATE_NAV_BAR_HIDDEN) == 0 && (mSystemUiStateFlags & SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED) == 0 && (mSystemUiStateFlags & SYSUI_STATE_QUICK_SETTINGS_EXPANDED) == 0 - && (mSystemUiStateFlags & SYSUI_STATE_BUBBLES_EXPANDED) == 0 && ((mSystemUiStateFlags & SYSUI_STATE_HOME_DISABLED) == 0 || (mSystemUiStateFlags & SYSUI_STATE_OVERVIEW_DISABLED) == 0); } @@ -380,6 +379,13 @@ public class RecentsAnimationDeviceState implements return (mSystemUiStateFlags & SYSUI_STATE_SCREEN_PINNING) != 0; } + /** + * @return whether the bubble stack is expanded + */ + public boolean isBubblesExpanded() { + return (mSystemUiStateFlags & SYSUI_STATE_BUBBLES_EXPANDED) != 0; + } + /** * @return whether lock-task mode is active */