Merge "Update home screen trackpad gesture behaviors" into udc-dev

This commit is contained in:
Tracy Zhou
2023-03-23 19:03:40 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 3 deletions
@@ -20,6 +20,7 @@ import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.LauncherState.OVERVIEW_ACTIONS;
import static com.android.launcher3.LauncherState.QUICK_SWITCH_FROM_HOME;
import static com.android.launcher3.MotionEventsUtils.isTrackpadMultiFingerSwipe;
import static com.android.launcher3.anim.AlphaUpdateListener.ALPHA_CUTOFF_THRESHOLD;
import static com.android.launcher3.anim.AnimatorListeners.forEndCallback;
import static com.android.launcher3.anim.Interpolators.ACCEL_0_75;
@@ -161,6 +162,9 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
if ((ev.getEdgeFlags() & Utilities.EDGE_NAV_BAR) == 0) {
return false;
}
if (isTrackpadMultiFingerSwipe(ev)) {
return false;
}
int stateFlags = SystemUiProxy.INSTANCE.get(mLauncher).getLastSystemUiStateFlags();
if ((stateFlags & SYSUI_STATE_OVERVIEW_DISABLED) != 0) {
return false;
@@ -18,7 +18,6 @@ package com.android.quickstep;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Surface.ROTATION_0;
import static com.android.launcher3.MotionEventsUtils.isTrackpadMotionEvent;
import static com.android.launcher3.MotionEventsUtils.isTrackpadMultiFingerSwipe;
import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN;
import static com.android.launcher3.util.DisplayController.CHANGE_ALL;
@@ -243,8 +242,8 @@ public class RotationTouchHelper implements DisplayInfoChangeListener {
*/
public boolean isInSwipeUpTouchRegion(MotionEvent event, int pointerIndex,
BaseActivityInterface activity) {
if (isTrackpadMotionEvent(event)) {
return isTrackpadMultiFingerSwipe(event) && !activity.isResumed();
if (isTrackpadMultiFingerSwipe(event)) {
return true;
}
return mOrientationTouchTransformer.touchInValidSwipeRegions(event.getX(pointerIndex),
event.getY(pointerIndex));