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 eb5c7f9f69..496a3d858a 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java @@ -22,6 +22,7 @@ import static android.view.MotionEvent.ACTION_UP; import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR; +import static com.android.quickstep.GestureState.DEFAULT_STATE; import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_INPUT_MONITOR; import static com.android.systemui.shared.system.QuickStepContract.KEY_EXTRA_SYSUI_PROXY; import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_TRACING_ENABLED; @@ -124,6 +125,7 @@ public class TouchInteractionService extends Service implements PluginListener mAM.getRunningTask(0))); + mDeviceState.setOrientationTransformIfNeeded(event); + GestureState newGestureState; if (mDeviceState.isInSwipeUpTouchRegion(event)) { + newGestureState = createGestureState(); mConsumer.onConsumerAboutToBeSwitched(); mConsumer = newConsumer(mGestureState, newGestureState, event); @@ -453,6 +453,7 @@ public class TouchInteractionService extends Service implements PluginListener mAM.getRunningTask(0))); + return gestureState; + } + private InputConsumer newConsumer(GestureState previousGestureState, GestureState newGestureState, MotionEvent event) { boolean canStartSystemGesture = mDeviceState.canStartSystemGesture(); diff --git a/quickstep/src/com/android/quickstep/GestureState.java b/quickstep/src/com/android/quickstep/GestureState.java index 501c6f0b74..f7e40cace5 100644 --- a/quickstep/src/com/android/quickstep/GestureState.java +++ b/quickstep/src/com/android/quickstep/GestureState.java @@ -64,6 +64,8 @@ public class GestureState implements RecentsAnimationCallbacks.RecentsAnimationL private static final String TAG = "GestureState"; private static final ArrayList STATE_NAMES = new ArrayList<>(); + public static final GestureState DEFAULT_STATE = new GestureState(); + private static int FLAG_COUNT = 0; private static int getFlagForIndex(String name) { if (DEBUG_STATES) {