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

Commit 530f3948 authored by Lucas Dupin's avatar Lucas Dupin Committed by android-build-merger
Browse files

Merge "Block touches under scrimmed bouncer" into qt-dev

am: f9bf1762

Change-Id: I4b226012472ba7a929756b311951f8963e99fa74
parents 6a195db9 f9bf1762
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -833,6 +833,11 @@ public class NotificationPanelView extends PanelView implements
            return false;
            return false;
        }
        }
        initDownStates(event);
        initDownStates(event);
        // Do not let touches go to shade or QS if the bouncer is visible,
        // but still let user swipe down to expand the panel, dismissing the bouncer.
        if (mStatusBar.isBouncerShowing()) {
            return true;
        }
        if (mBar.panelEnabled() && mHeadsUpTouchHelper.onInterceptTouchEvent(event)) {
        if (mBar.panelEnabled() && mHeadsUpTouchHelper.onInterceptTouchEvent(event)) {
            mIsExpansionFromHeadsUp = true;
            mIsExpansionFromHeadsUp = true;
            MetricsLogger.count(mContext, COUNTER_PANEL_OPEN, 1);
            MetricsLogger.count(mContext, COUNTER_PANEL_OPEN, 1);
@@ -1000,6 +1005,13 @@ public class NotificationPanelView extends PanelView implements
        if (mBlockTouches || (mQs != null && mQs.isCustomizing())) {
        if (mBlockTouches || (mQs != null && mQs.isCustomizing())) {
            return false;
            return false;
        }
        }

        // Do not allow panel expansion if bouncer is scrimmed, otherwise user would be able to
        // pull down QS or expand the shade.
        if (mStatusBar.isBouncerShowingScrimmed()) {
            return false;
        }

        initDownStates(event);
        initDownStates(event);
        // Make sure the next touch won't the blocked after the current ends.
        // Make sure the next touch won't the blocked after the current ends.
        if (event.getAction() == MotionEvent.ACTION_UP
        if (event.getAction() == MotionEvent.ACTION_UP
+7 −0
Original line number Original line Diff line number Diff line
@@ -4440,6 +4440,13 @@ public class StatusBar extends SystemUI implements DemoMode,
        return mBouncerShowing;
        return mBouncerShowing;
    }
    }


    /**
     * @return Whether the security bouncer from Keyguard is showing.
     */
    public boolean isBouncerShowingScrimmed() {
        return isBouncerShowing() && mStatusBarKeyguardViewManager.bouncerNeedsScrimming();
    }

    /**
    /**
     * @return a PackageManger for userId or if userId is < 0 (USER_ALL etc) then
     * @return a PackageManger for userId or if userId is < 0 (USER_ALL etc) then
     *         return PackageManager for mContext
     *         return PackageManager for mContext