Loading quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +11 −3 Original line number Diff line number Diff line Loading @@ -453,8 +453,11 @@ public class TouchInteractionService extends Service implements PluginListener<O // Do not change mConsumer as if there is an ongoing QuickSwitch gesture, we should // not interrupt it. QuickSwitch assumes that interruption can only happen if the // next gesture is also quick switch. mUncheckedConsumer = new AssistantInputConsumer(this, newGestureState, InputConsumer.NO_OP, mInputMonitorCompat); mUncheckedConsumer = new AssistantInputConsumer( this, newGestureState, InputConsumer.NO_OP, mInputMonitorCompat, mOverviewComponentObserver.assistantGestureIsConstrained()); } else { mUncheckedConsumer = InputConsumer.NO_OP; } Loading Loading @@ -494,7 +497,12 @@ public class TouchInteractionService extends Service implements PluginListener<O } if (mDeviceState.isFullyGesturalNavMode()) { if (mDeviceState.canTriggerAssistantAction(event)) { base = new AssistantInputConsumer(this, newGestureState, base, mInputMonitorCompat); base = new AssistantInputConsumer( this, newGestureState, base, mInputMonitorCompat, mOverviewComponentObserver.assistantGestureIsConstrained()); } if (FeatureFlags.ENABLE_QUICK_CAPTURE_GESTURE.get()) { Loading quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantInputConsumer.java +10 −3 Original line number Diff line number Diff line Loading @@ -90,12 +90,18 @@ public class AssistantInputConsumer extends DelegateInputConsumer { private final float mSquaredSlop; private final Context mContext; private final GestureDetector mGestureDetector; private final boolean mIsAssistGestureConstrained; public AssistantInputConsumer(Context context, GestureState gestureState, InputConsumer delegate, InputMonitorCompat inputMonitor) { public AssistantInputConsumer( Context context, GestureState gestureState, InputConsumer delegate, InputMonitorCompat inputMonitor, boolean isAssistGestureConstrained) { super(delegate, inputMonitor); final Resources res = context.getResources(); mContext = context; mIsAssistGestureConstrained = isAssistGestureConstrained; mDragDistThreshold = res.getDimension(R.dimen.gestures_assistant_drag_threshold); mFlingDistThreshold = res.getDimension(R.dimen.gestures_assistant_fling_threshold); mTimeThreshold = res.getInteger(R.integer.assistant_gesture_min_time_threshold); Loading Loading @@ -258,7 +264,8 @@ public class AssistantInputConsumer extends DelegateInputConsumer { private class AssistantGestureListener extends SimpleOnGestureListener { @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { if (isValidAssistantGestureAngle(velocityX, -velocityY) if (!mIsAssistGestureConstrained && isValidAssistantGestureAngle(velocityX, -velocityY) && mDistance >= mFlingDistThreshold && !mLaunchedAssistant && mState != STATE_DELEGATE_ACTIVE) { Loading quickstep/src/com/android/quickstep/OverviewComponentObserver.java +5 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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. Loading Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +11 −3 Original line number Diff line number Diff line Loading @@ -453,8 +453,11 @@ public class TouchInteractionService extends Service implements PluginListener<O // Do not change mConsumer as if there is an ongoing QuickSwitch gesture, we should // not interrupt it. QuickSwitch assumes that interruption can only happen if the // next gesture is also quick switch. mUncheckedConsumer = new AssistantInputConsumer(this, newGestureState, InputConsumer.NO_OP, mInputMonitorCompat); mUncheckedConsumer = new AssistantInputConsumer( this, newGestureState, InputConsumer.NO_OP, mInputMonitorCompat, mOverviewComponentObserver.assistantGestureIsConstrained()); } else { mUncheckedConsumer = InputConsumer.NO_OP; } Loading Loading @@ -494,7 +497,12 @@ public class TouchInteractionService extends Service implements PluginListener<O } if (mDeviceState.isFullyGesturalNavMode()) { if (mDeviceState.canTriggerAssistantAction(event)) { base = new AssistantInputConsumer(this, newGestureState, base, mInputMonitorCompat); base = new AssistantInputConsumer( this, newGestureState, base, mInputMonitorCompat, mOverviewComponentObserver.assistantGestureIsConstrained()); } if (FeatureFlags.ENABLE_QUICK_CAPTURE_GESTURE.get()) { Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/AssistantInputConsumer.java +10 −3 Original line number Diff line number Diff line Loading @@ -90,12 +90,18 @@ public class AssistantInputConsumer extends DelegateInputConsumer { private final float mSquaredSlop; private final Context mContext; private final GestureDetector mGestureDetector; private final boolean mIsAssistGestureConstrained; public AssistantInputConsumer(Context context, GestureState gestureState, InputConsumer delegate, InputMonitorCompat inputMonitor) { public AssistantInputConsumer( Context context, GestureState gestureState, InputConsumer delegate, InputMonitorCompat inputMonitor, boolean isAssistGestureConstrained) { super(delegate, inputMonitor); final Resources res = context.getResources(); mContext = context; mIsAssistGestureConstrained = isAssistGestureConstrained; mDragDistThreshold = res.getDimension(R.dimen.gestures_assistant_drag_threshold); mFlingDistThreshold = res.getDimension(R.dimen.gestures_assistant_fling_threshold); mTimeThreshold = res.getInteger(R.integer.assistant_gesture_min_time_threshold); Loading Loading @@ -258,7 +264,8 @@ public class AssistantInputConsumer extends DelegateInputConsumer { private class AssistantGestureListener extends SimpleOnGestureListener { @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { if (isValidAssistantGestureAngle(velocityX, -velocityY) if (!mIsAssistGestureConstrained && isValidAssistantGestureAngle(velocityX, -velocityY) && mDistance >= mFlingDistThreshold && !mLaunchedAssistant && mState != STATE_DELEGATE_ACTIVE) { Loading
quickstep/src/com/android/quickstep/OverviewComponentObserver.java +5 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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. Loading