From fb4fe0e9729c8d74ea473e4f157d7c3eeb4df888 Mon Sep 17 00:00:00 2001 From: Govinda Wasserman Date: Thu, 5 Mar 2020 16:50:22 -0500 Subject: [PATCH] Adds fling gesture suppression to Launcher Test: Tested locally BUG: 150688842 Change-Id: Ifa96bd01363de47cf1d8cdce34d81d525c8c2c04 --- .../android/quickstep/TouchInteractionService.java | 14 +++++++++++--- .../inputconsumers/AssistantInputConsumer.java | 13 ++++++++++--- .../quickstep/OverviewComponentObserver.java | 5 +++++ 3 files changed, 26 insertions(+), 6 deletions(-) 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 beb2857b13..2a14504449 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java @@ -466,8 +466,11 @@ public class TouchInteractionService extends Service implements PluginListener= mFlingDistThreshold && !mLaunchedAssistant && mState != STATE_DELEGATE_ACTIVE) { diff --git a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java index 866836ee72..9edc86e6be 100644 --- a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java +++ b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java @@ -22,6 +22,7 @@ import static android.content.Intent.ACTION_PACKAGE_REMOVED; import static com.android.launcher3.util.PackageManagerHelper.getPackageFilter; import static com.android.systemui.shared.system.PackageManagerWrapper.ACTION_PREFERRED_ACTIVITY_CHANGED; +import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ASSIST_GESTURE_CONSTRAINED; import android.content.BroadcastReceiver; import android.content.ComponentName; @@ -104,6 +105,10 @@ public final class OverviewComponentObserver { updateOverviewTargets(); } + public boolean assistantGestureIsConstrained() { + return (mDeviceState.getSystemUiStateFlags() & SYSUI_STATE_ASSIST_GESTURE_CONSTRAINED) != 0; + } + /** * Update overview intent and {@link BaseActivityInterface} based off the current launcher home * component.