Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04d58e84 authored by Matthew Ng's avatar Matthew Ng
Browse files

Do not consume motion events when there is no assistant available

Bug: 112934365
Test: manual
Change-Id: If9254d974a34772357ce32d5ba2734db5a173f6b
parent 40e06932
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -77,6 +77,11 @@ public class TouchInteractionService extends Service {
            mOverviewCommandHelper.onTip(actionType, viewType);
        }

        @Override
        public void onAssistantAvailable(boolean available) {
            // TODO handle assistant
        }

        /** Deprecated methods **/
        public void onQuickStep(MotionEvent motionEvent) { }

+203 B (153 KiB)

File changed.

No diff preview for this file type.

+7 −1
Original line number Diff line number Diff line
@@ -121,6 +121,11 @@ public class TouchInteractionService extends Service {
            mOverviewCommandHelper.onTip(actionType, viewType);
        }

        @Override
        public void onAssistantAvailable(boolean available) {
            mAssistantAvailable = available;
        }

        /** Deprecated methods **/
        public void onQuickStep(MotionEvent motionEvent) { }

@@ -174,6 +179,7 @@ public class TouchInteractionService extends Service {
    private TaskOverlayFactory mTaskOverlayFactory;
    private InputConsumerController mInputConsumer;
    private SwipeSharedState mSwipeSharedState;
    private boolean mAssistantAvailable;

    private boolean mIsUserUnlocked;
    private List<Runnable> mOnUserUnlockedCallbacks;
@@ -308,7 +314,7 @@ public class TouchInteractionService extends Service {

        if (runningTaskInfo == null && !mSwipeSharedState.goingToLauncher) {
            return InputConsumer.NO_OP;
        } else if (mOverviewInteractionState.isSwipeUpGestureEnabled()
        } else if (mAssistantAvailable && mOverviewInteractionState.isSwipeUpGestureEnabled()
                && FeatureFlags.ENABLE_ASSISTANT_GESTURE.get()
                && AssistantTouchConsumer.withinTouchRegion(this, event.getX())) {
            return new AssistantTouchConsumer(this, mRecentsModel.getSystemUiProxy());