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

Commit b3066dc7 authored by Matt Pietal's avatar Matt Pietal Committed by Android (Google) Code Review
Browse files

Merge "Do not handle touches next to shelf" into main

parents 8c64917d 0b558a93
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -58,22 +58,22 @@
             android:layout_height="match_parent"
             android:visibility="invisible" />

    <!-- Shared container for the notification stack. Can be positioned by either
         the keyguard_root_view or notification_panel -->
    <com.android.systemui.statusbar.notification.stack.ui.view.SharedNotificationContainer
        android:id="@+id/shared_notification_container"
    <!-- Root for all keyguard content. It was previously located within the shade. -->
    <com.android.systemui.keyguard.ui.view.KeyguardRootView
        android:id="@id/keyguard_root_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clipChildren="false"
        android:clipToPadding="false"
        />

    <!-- Root for all keyguard content. It was previously located within the shade. -->
    <com.android.systemui.keyguard.ui.view.KeyguardRootView
        android:id="@id/keyguard_root_view"
    <!-- Shared container for the notification stack. Can be positioned by either
         the keyguard_root_view or notification_panel -->
    <com.android.systemui.statusbar.notification.stack.ui.view.SharedNotificationContainer
        android:id="@+id/shared_notification_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clipChildren="false"
        android:clipToPadding="false"
        />

    <include layout="@layout/brightness_mirror_container" />
+11 −6
Original line number Diff line number Diff line
@@ -2098,8 +2098,13 @@ 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);

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

        @Override
@@ -2192,7 +2197,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
                    }
                }
            }
            boolean horizontalSwipeWantsIt = false;
            boolean horizontalSwipeWantsIt = mSwipeWantsIt;
            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.
@@ -2201,7 +2206,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
                    && !mView.getExpandedInThisMotion()
                    && !onlyScrollingInThisMotion
                    && !mView.getDisallowDismissInThisMotion()) {
                horizontalSwipeWantsIt = mSwipeHelper.onTouchEvent(ev);
                mSwipeHelper.onTouchEvent(ev);
            }
            if (mLongPressedView == null && mView.isExpanded() && !mSwipeHelper.isSwiping()
                    && !expandingNotification && !mView.getDisallowScrollingInThisMotion()) {