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

Commit 0be4205e authored by Matthew Ng's avatar Matthew Ng Committed by Android (Google) Code Review
Browse files

Merge "Do not show track when scrubing when notification shade is down"

parents 7041d8fc 09b26ba6
Loading
Loading
Loading
Loading
+7 −8
Original line number Original line Diff line number Diff line
@@ -150,8 +150,8 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
    }
    }


    public boolean onInterceptTouchEvent(MotionEvent event) {
    public boolean onInterceptTouchEvent(MotionEvent event) {
        if (ActivityManagerWrapper.getInstance().isScreenPinningActive()
        if (mNavigationBarView.inScreenPinning() || mStatusBar.isKeyguardShowing()
                || mStatusBar.isKeyguardShowing()) {
                || !mStatusBar.isPresenterFullyCollapsed()) {
            return false;
            return false;
        }
        }


@@ -170,7 +170,7 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
            }
            }
        }
        }
        boolean handledByQuickscrub = mQuickScrubController.onInterceptTouchEvent(event);
        boolean handledByQuickscrub = mQuickScrubController.onInterceptTouchEvent(event);
        if (mStatusBar.isPresenterFullyCollapsed() && !handledByQuickscrub) {
        if (!handledByQuickscrub) {
            // Proxy motion events until we start intercepting for quickscrub
            // Proxy motion events until we start intercepting for quickscrub
            proxyMotionEvents(event);
            proxyMotionEvents(event);
        }
        }
@@ -184,18 +184,17 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
    }
    }


    public boolean onTouchEvent(MotionEvent event) {
    public boolean onTouchEvent(MotionEvent event) {
        if (ActivityManagerWrapper.getInstance().isScreenPinningActive()
        if (mNavigationBarView.inScreenPinning() || mStatusBar.isKeyguardShowing()
                || mStatusBar.isKeyguardShowing()) {
                || !mStatusBar.isPresenterFullyCollapsed()) {
            return false;
            return false;
        }
        }


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