Loading quickstep/src/com/android/quickstep/TouchInteractionService.java +3 −1 Original line number Diff line number Diff line Loading @@ -683,7 +683,7 @@ public class TouchInteractionService extends Service implements PluginListener<O final boolean disableHorizontalSwipe = mDeviceState.isInExclusionRegion(event); return new OtherActivityInputConsumer(this, mDeviceState, mTaskAnimationManager, gestureState, shouldDefer, this::onConsumerInactive, mInputMonitorCompat, disableHorizontalSwipe, factory); mInputMonitorCompat, mInputEventReceiver, disableHorizontalSwipe, factory); } private InputConsumer createDeviceLockedInputConsumer(GestureState gestureState) { Loading Loading @@ -732,6 +732,8 @@ public class TouchInteractionService extends Service implements PluginListener<O private void reset() { mConsumer = mUncheckedConsumer = mResetGestureInputConsumer; mGestureState = DEFAULT_STATE; // By default, use batching of the input events mInputEventReceiver.setBatchingEnabled(true); } private void preloadOverview(boolean fromInit) { Loading quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java +10 −2 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ import com.android.quickstep.util.CachedEventDispatcher; import com.android.quickstep.util.MotionPauseDetector; import com.android.quickstep.util.NavBarPosition; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.InputChannelCompat.InputEventReceiver; import com.android.systemui.shared.system.InputMonitorCompat; import java.util.function.Consumer; Loading @@ -92,6 +93,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC private RecentsAnimationCallbacks mActiveCallbacks; private final CachedEventDispatcher mRecentsViewDispatcher = new CachedEventDispatcher(); private final InputMonitorCompat mInputMonitorCompat; private final InputEventReceiver mInputEventReceiver; private final BaseActivityInterface mActivityInterface; private final AbsSwipeUpHandler.Factory mHandlerFactory; Loading Loading @@ -135,8 +137,8 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC public OtherActivityInputConsumer(Context base, RecentsAnimationDeviceState deviceState, TaskAnimationManager taskAnimationManager, GestureState gestureState, boolean isDeferredDownTarget, Consumer<OtherActivityInputConsumer> onCompleteCallback, InputMonitorCompat inputMonitorCompat, boolean disableHorizontalSwipe, Factory handlerFactory) { InputMonitorCompat inputMonitorCompat, InputEventReceiver inputEventReceiver, boolean disableHorizontalSwipe, Factory handlerFactory) { super(base); mDeviceState = deviceState; mNavBarPosition = mDeviceState.getNavBarPosition(); Loading @@ -154,6 +156,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC mOnCompleteCallback = onCompleteCallback; mVelocityTracker = VelocityTracker.obtain(); mInputMonitorCompat = inputMonitorCompat; mInputEventReceiver = inputEventReceiver; boolean continuingPreviousGesture = mTaskAnimationManager.isRecentsAnimationRunning(); mIsDeferredDownTarget = !continuingPreviousGesture && isDeferredDownTarget; Loading Loading @@ -215,6 +218,9 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC switch (ev.getActionMasked()) { case ACTION_DOWN: { // Until we detect the gesture, handle events as we receive them mInputEventReceiver.setBatchingEnabled(false); Object traceToken = TraceHelper.INSTANCE.beginSection(DOWN_EVT, FLAG_CHECK_FOR_RACE_CONDITIONS); mActivePointerId = ev.getPointerId(0); Loading Loading @@ -351,6 +357,8 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC } TestLogging.recordEvent(TestProtocol.SEQUENCE_PILFER, "pilferPointers"); mInputMonitorCompat.pilferPointers(); // Once we detect the gesture, we can enable batching to reduce further updates mInputEventReceiver.setBatchingEnabled(true); mActivityInterface.closeOverlay(); ActivityManagerWrapper.getInstance().closeSystemWindows( Loading Loading
quickstep/src/com/android/quickstep/TouchInteractionService.java +3 −1 Original line number Diff line number Diff line Loading @@ -683,7 +683,7 @@ public class TouchInteractionService extends Service implements PluginListener<O final boolean disableHorizontalSwipe = mDeviceState.isInExclusionRegion(event); return new OtherActivityInputConsumer(this, mDeviceState, mTaskAnimationManager, gestureState, shouldDefer, this::onConsumerInactive, mInputMonitorCompat, disableHorizontalSwipe, factory); mInputMonitorCompat, mInputEventReceiver, disableHorizontalSwipe, factory); } private InputConsumer createDeviceLockedInputConsumer(GestureState gestureState) { Loading Loading @@ -732,6 +732,8 @@ public class TouchInteractionService extends Service implements PluginListener<O private void reset() { mConsumer = mUncheckedConsumer = mResetGestureInputConsumer; mGestureState = DEFAULT_STATE; // By default, use batching of the input events mInputEventReceiver.setBatchingEnabled(true); } private void preloadOverview(boolean fromInit) { Loading
quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java +10 −2 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ import com.android.quickstep.util.CachedEventDispatcher; import com.android.quickstep.util.MotionPauseDetector; import com.android.quickstep.util.NavBarPosition; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.InputChannelCompat.InputEventReceiver; import com.android.systemui.shared.system.InputMonitorCompat; import java.util.function.Consumer; Loading @@ -92,6 +93,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC private RecentsAnimationCallbacks mActiveCallbacks; private final CachedEventDispatcher mRecentsViewDispatcher = new CachedEventDispatcher(); private final InputMonitorCompat mInputMonitorCompat; private final InputEventReceiver mInputEventReceiver; private final BaseActivityInterface mActivityInterface; private final AbsSwipeUpHandler.Factory mHandlerFactory; Loading Loading @@ -135,8 +137,8 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC public OtherActivityInputConsumer(Context base, RecentsAnimationDeviceState deviceState, TaskAnimationManager taskAnimationManager, GestureState gestureState, boolean isDeferredDownTarget, Consumer<OtherActivityInputConsumer> onCompleteCallback, InputMonitorCompat inputMonitorCompat, boolean disableHorizontalSwipe, Factory handlerFactory) { InputMonitorCompat inputMonitorCompat, InputEventReceiver inputEventReceiver, boolean disableHorizontalSwipe, Factory handlerFactory) { super(base); mDeviceState = deviceState; mNavBarPosition = mDeviceState.getNavBarPosition(); Loading @@ -154,6 +156,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC mOnCompleteCallback = onCompleteCallback; mVelocityTracker = VelocityTracker.obtain(); mInputMonitorCompat = inputMonitorCompat; mInputEventReceiver = inputEventReceiver; boolean continuingPreviousGesture = mTaskAnimationManager.isRecentsAnimationRunning(); mIsDeferredDownTarget = !continuingPreviousGesture && isDeferredDownTarget; Loading Loading @@ -215,6 +218,9 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC switch (ev.getActionMasked()) { case ACTION_DOWN: { // Until we detect the gesture, handle events as we receive them mInputEventReceiver.setBatchingEnabled(false); Object traceToken = TraceHelper.INSTANCE.beginSection(DOWN_EVT, FLAG_CHECK_FOR_RACE_CONDITIONS); mActivePointerId = ev.getPointerId(0); Loading Loading @@ -351,6 +357,8 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC } TestLogging.recordEvent(TestProtocol.SEQUENCE_PILFER, "pilferPointers"); mInputMonitorCompat.pilferPointers(); // Once we detect the gesture, we can enable batching to reduce further updates mInputEventReceiver.setBatchingEnabled(true); mActivityInterface.closeOverlay(); ActivityManagerWrapper.getInstance().closeSystemWindows( Loading