diff options
author | Winson Chung <winsonc@google.com> | 2019-05-23 13:56:10 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2019-05-23 14:33:05 -0700 |
commit | dd71ca04370a8885cfeeb1d2c6846f5299e8edcc (patch) | |
tree | 42736c6ff904ae7933c584085bb0b6a859efbc46 /quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java | |
parent | 9e26fccacc59202912406fe237bd9f11207fd34b (diff) | |
download | android_packages_apps_Trebuchet-dd71ca04370a8885cfeeb1d2c6846f5299e8edcc.tar.gz android_packages_apps_Trebuchet-dd71ca04370a8885cfeeb1d2c6846f5299e8edcc.tar.bz2 android_packages_apps_Trebuchet-dd71ca04370a8885cfeeb1d2c6846f5299e8edcc.zip |
Support individual lock task features
- If screen pinning is enabled, disable gestures and wrap with input
consumer to break out of screen pinning (existing logic)
- If Home & Overview are both disabled, disable gestures completely
- If only Home is disabled, then always launch the user into fallback
recents (to simplify logic around breaking out of overview into Home)
- If only Overview is disabled, then prevent swiping from going into
overview or from triggering overview from home
- Switch to using screen pinning flag check instead of binder call
Bug: 133113732
Bug: 131698989
Change-Id: Ie6f447520d4cc3fa1eaaf8427ee014851688bf37
Diffstat (limited to 'quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java')
-rw-r--r-- | quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java index 0c29fcf5a..6030cea93 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java @@ -26,6 +26,7 @@ import static com.android.launcher3.anim.Interpolators.ACCEL; import static com.android.launcher3.anim.Interpolators.DEACCEL; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS; +import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED; import android.animation.TimeInterpolator; import android.animation.ValueAnimator; @@ -46,9 +47,11 @@ import com.android.launcher3.touch.SwipeDetector; import com.android.launcher3.uioverrides.states.OverviewState; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; +import com.android.quickstep.OverviewInteractionState; import com.android.quickstep.RecentsModel; import com.android.quickstep.TouchInteractionService; import com.android.quickstep.util.LayoutUtils; +import com.android.systemui.shared.system.QuickStepContract; /** * Touch controller for handling various state transitions in portrait UI. @@ -135,7 +138,10 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr } else if (fromState == OVERVIEW) { return isDragTowardPositive ? ALL_APPS : NORMAL; } else if (fromState == NORMAL && isDragTowardPositive) { + int stateFlags = OverviewInteractionState.INSTANCE.get(mLauncher) + .getSystemUiStateFlags(); return mAllowDragToOverview && TouchInteractionService.isConnected() + && (stateFlags & SYSUI_STATE_OVERVIEW_DISABLED) == 0 ? OVERVIEW : ALL_APPS; } return fromState; |