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

Commit b4c3428e authored by Roman Birg's avatar Roman Birg
Browse files

SystemUI: fix contracting qs settings page



If notifications were present, isInQsArea would return true while
tapping in the notification area, blocking touches and not allowing the
user to grab the qs panel to drag it up.

Add a flag to not check for the notification area and use that for qs
settings interception, but leave the default
behavior for other uses.

Ref: CYNGNOS-1644

Change-Id: I092600c0ef9815e3a4fe2b8101c5b53ffa670275
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 805ef76e
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -628,7 +628,7 @@ public class NotificationPanelView extends PanelView implements
            MetricsLogger.count(mContext, COUNTER_PANEL_OPEN_PEEK, 1);
            return true;
        }
        if (mQsPanel.isOnSettingsPage() && isInQsArea(event.getX(), event.getY())
        if (mQsPanel.isOnSettingsPage() && isInQsArea(event.getX(), event.getY(), false)
                && mQsExpanded) {
            mIntercepting = false;
            // we explicitly do not intercept the touch event here to let the qs settings page
@@ -869,8 +869,13 @@ public class NotificationPanelView extends PanelView implements
    }

    private boolean isInQsArea(float x, float y) {
        return isInQsArea(x, y, true);
    }

    private boolean isInQsArea(float x, float y, boolean includeNotifications) {
        return (x >= mScrollView.getX() && x <= mScrollView.getX() + mScrollView.getWidth()) &&
                (y <= mNotificationStackScroller.getBottomMostNotificationBottom()
                ((includeNotifications
                        && y <= mNotificationStackScroller.getBottomMostNotificationBottom())
                        || y <= mQsContainer.getY() + mQsContainer.getHeight());
    }