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

Commit e3fa80e1 authored by Liana Kazanova (xWF)'s avatar Liana Kazanova (xWF) Committed by Matt Pietal
Browse files

Revert "Do not handle touches next to shelf"

This reverts commit 0b558a93.

Reason for revert: DroidMonitor: Potential culprit for http://b/373710371 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: I47ba99e2c16bb1509a1bff00c90b2d5a07385c8c
parent 0b558a93
Loading
Loading
Loading
Loading
+6 −11
Original line number Diff line number Diff line
@@ -2098,13 +2098,8 @@ public class NotificationStackScrollLayoutController implements Dumpable {
    }

    class TouchHandler implements Gefingerpoken {
        private boolean mSwipeWantsIt = false;

        @Override
        public boolean onInterceptTouchEvent(MotionEvent ev) {
            // Reset on each call to intercept, and share swipe state with onTouchEvent()
            // below when this method returns true.
            mSwipeWantsIt = false;
            mView.initDownStates(ev);
            mView.handleEmptySpaceClick(ev);

@@ -2131,16 +2126,17 @@ public class NotificationStackScrollLayoutController implements Dumpable {
                    mView.startDraggingOnHun();
                }
            }
            boolean swipeWantsIt = false;
            if (mLongPressedView == null && !mView.isBeingDragged()
                    && !mView.isExpandingNotification()
                    && !mView.getExpandedInThisMotion()
                    && !mView.getOnlyScrollingInThisMotion()
                    && !mView.getDisallowDismissInThisMotion()) {
                mSwipeWantsIt = mSwipeHelper.onInterceptTouchEvent(ev);
                swipeWantsIt = mSwipeHelper.onInterceptTouchEvent(ev);
            }
            // Check if we need to clear any snooze leavebehinds
            boolean isUp = ev.getActionMasked() == MotionEvent.ACTION_UP;
            if (!NotificationSwipeHelper.isTouchInView(ev, guts) && isUp && !mSwipeWantsIt &&
            if (!NotificationSwipeHelper.isTouchInView(ev, guts) && isUp && !swipeWantsIt &&
                    !expandWantsIt && !scrollWantsIt) {
                mView.setCheckForLeaveBehind(false);
                mNotificationGutsManager.closeAndSaveGuts(true /* removeLeavebehind */,
@@ -2159,8 +2155,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
                    && ev.getActionMasked() != MotionEvent.ACTION_DOWN) {
                mJankMonitor.begin(mView, CUJ_NOTIFICATION_SHADE_SCROLL_FLING);
            }
            return mSwipeWantsIt || scrollWantsIt || expandWantsIt || longPressWantsIt ||
                    hunWantsIt;
            return swipeWantsIt || scrollWantsIt || expandWantsIt || longPressWantsIt || hunWantsIt;
        }

        @Override
@@ -2197,7 +2192,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
                    }
                }
            }
            boolean horizontalSwipeWantsIt = mSwipeWantsIt;
            boolean horizontalSwipeWantsIt = false;
            boolean scrollerWantsIt = false;
            // NOTE: the order of these is important. If reversed, onScrollTouch will reset on an
            // UP event, causing horizontalSwipeWantsIt to be set to true on vertical swipes.
@@ -2206,7 +2201,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
                    && !mView.getExpandedInThisMotion()
                    && !onlyScrollingInThisMotion
                    && !mView.getDisallowDismissInThisMotion()) {
                mSwipeHelper.onTouchEvent(ev);
                horizontalSwipeWantsIt = mSwipeHelper.onTouchEvent(ev);
            }
            if (mLongPressedView == null && mView.isExpanded() && !mSwipeHelper.isSwiping()
                    && !expandingNotification && !mView.getDisallowScrollingInThisMotion()) {