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

Commit 0126d698 authored by Matthew Ng's avatar Matthew Ng
Browse files

Prevent 2nd action down motionevent on nav bar press

Since motions events are proxied to launcher on intercept and on touch,
when user touches it used to send both. Prevent the action down proxy
event onTouchEvent will only send one touch event if nothing else
handles it.

Bug: 67957962
Test: manual
Change-Id: Ia2a6bfe6cd963f9383a1468f5ba64dc28005a394
parent df27ca11
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -308,8 +308,13 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
    }

    public boolean onTouchEvent(MotionEvent event) {
        // The same down event was just sent on intercept and therefore can be ignored here
        boolean ignoreProxyDownEvent = event.getAction() == MotionEvent.ACTION_DOWN
                && mOverviewEventSender.getProxy() != null;
        boolean result = mStatusBar.isPresenterFullyCollapsed()
                && (mQuickScrubController.onTouchEvent(event) || proxyMotionEvents(event));
                && (mQuickScrubController.onTouchEvent(event)
                || ignoreProxyDownEvent
                || proxyMotionEvents(event));
        if (mDockWindowEnabled) {
            result |= handleDockWindowEvent(event);
        }