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

Commit 89faff1d authored by Selim Cinek's avatar Selim Cinek
Browse files

Closing the QS when tapping on the notifications now.

Bug: 15394230
Change-Id: Ib9f750db69529afc0d56685fb88a13d183b0d3d5
parent 00a78899
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ public class NotificationPanelView extends PanelView implements
    private boolean mBlockTouches;
    private ArrayList<View> mSwipeTranslationViews = new ArrayList<>();
    private int mNotificationScrimWaitDistance;
    private boolean mOnNotificationsOnDown;

    public NotificationPanelView(Context context, AttributeSet attrs) {
        super(context, attrs);
@@ -347,6 +348,7 @@ public class NotificationPanelView extends PanelView implements
                mInitialTouchX = x;
                initVelocityTracker();
                trackMovement(event);
                mOnNotificationsOnDown = isOnNotifications(x, y);
                if (shouldQuickSettingsIntercept(mInitialTouchX, mInitialTouchY, 0)) {
                    getParent().requestDisallowInterceptTouchEvent(true);
                }
@@ -394,6 +396,8 @@ public class NotificationPanelView extends PanelView implements
                if (mQsTracking) {
                    flingQsWithCurrentVelocity();
                    mQsTracking = false;
                } else if (mQsFullyExpanded && mOnNotificationsOnDown) {
                    flingSettings(0 /* vel */, false /* expand */);
                }
                mIntercepting = false;
                break;
@@ -401,6 +405,10 @@ public class NotificationPanelView extends PanelView implements
        return !mQsExpanded && super.onInterceptTouchEvent(event);
    }

    private boolean isOnNotifications(float x, float y) {
        return mNotificationStackScroller.getChildAtPosition(x, y) != null;
    }

    @Override
    public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {

+3 −2
Original line number Diff line number Diff line
@@ -541,8 +541,9 @@ public class NotificationStackScrollLayout extends ViewGroup
            if (slidingChild.getVisibility() == GONE) {
                continue;
            }
            float top = slidingChild.getTranslationY();
            float bottom = top + slidingChild.getActualHeight();
            float childTop = slidingChild.getTranslationY();
            float top = childTop + slidingChild.getClipTopAmount();
            float bottom = childTop + slidingChild.getActualHeight();
            int left = slidingChild.getLeft();
            int right = slidingChild.getRight();