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

Commit dda1b33d authored by Justin Weir's avatar Justin Weir
Browse files

Handle down touch events in the home gesture area on locked shade

Touches on the home gesture handle at the bottom of the shade need to
bypass the mUseExternalTouch check, or the shade will only collapse
if notifications are scrolled all the way to the bottom.

Fixes: 407714441
Test: manually ran through shade and unlock CUJs
Flag: NONE bug fix
Change-Id: Iea9fb1717127c1d6f5e3d0b4e224ef87448d51b3
parent 48df9172
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -3975,10 +3975,14 @@ public final class NotificationPanelViewController implements
        @Override
        public boolean onTouchEvent(MotionEvent event) {
            if (!mUseExternalTouch) {
                if (isLockedShadeHomeGestureEvent(event)) {
                    mShadeLog.d("onTouch: down motion event in home gesture area");
                } else {
                    mShadeLog.d("onTouch: external touch handling disabled");
                    // Consume touches below notifications on keyguard to allow for expansion
                    return mStatusBarStateController.getState() == StatusBarState.KEYGUARD;
                }
            }

            if (mAlternateBouncerInteractor.isVisibleState()) {
                mShadeLog.d("onTouch: alternate bouncer visible; ignoring touch");
@@ -4075,6 +4079,11 @@ public final class NotificationPanelViewController implements
            return !mDozing || handled;
        }

        private boolean isLockedShadeHomeGestureEvent(MotionEvent event) {
            return mBarState == SHADE_LOCKED && event.getActionMasked() == MotionEvent.ACTION_DOWN
                    && isInGestureNavHomeHandleArea(event.getY());
        }

        private boolean handleTouch(MotionEvent event) {
            if (mInstantExpanding) {
                mShadeLog.logMotionEvent(event,