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

Commit 1f014fd7 authored by Winson Chung's avatar Winson Chung
Browse files

Only check screen pinning state on touch down.

Bug: 74997742
Test: Swipe up, check systrace
Change-Id: I8b2a0819bc839b2bc76775c99df0840ab889a96e
parent 9331af72
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
    private int mTouchDownY;
    private boolean mDownOnRecents;
    private VelocityTracker mVelocityTracker;
    private boolean mIsInScreenPinning;

    private boolean mDockWindowEnabled;
    private boolean mDockWindowTouchSlopExceeded;
@@ -105,6 +106,9 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
    }

    public boolean onInterceptTouchEvent(MotionEvent event) {
        if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
            mIsInScreenPinning = mNavigationBarView.inScreenPinning();
        }
        if (!canHandleGestures()) {
            return false;
        }
@@ -269,7 +273,7 @@ public class NavigationBarGestureHelper implements TunerService.Tunable, Gesture
    }

    private boolean canHandleGestures() {
        return !mNavigationBarView.inScreenPinning() && !mStatusBar.isKeyguardShowing()
        return !mIsInScreenPinning && !mStatusBar.isKeyguardShowing()
                && mStatusBar.isPresenterFullyCollapsed();
    }