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

Commit e9260ee4 authored by Jim Miller's avatar Jim Miller Committed by gitbuildkicker
Browse files

Allow sysui navigation to work when application occludes keyguard

Fixes bug 30650150

Change-Id: Ie4a858dcfd259c733cd32c3c2b1dec2ff437f1ab
(cherry picked from commit 69c1241d)
parent aaed5260
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2731,7 +2731,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
    public void handleSystemNavigationKey(int key) {
        if (SPEW) Log.d(TAG, "handleSystemNavigationKey: " + key);
        if (!panelsEnabled() || !mKeyguardMonitor.isDeviceInteractive()
                || mKeyguardMonitor.isShowing()) {
                || mKeyguardMonitor.isShowing() && !mKeyguardMonitor.isOccluded()) {
            return;
        }

@@ -4351,7 +4351,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        checkBarModes();
        updateMediaMetaData(false, mState != StatusBarState.KEYGUARD);
        mKeyguardMonitor.notifyKeyguardState(mStatusBarKeyguardViewManager.isShowing(),
                mStatusBarKeyguardViewManager.isSecure());
                mStatusBarKeyguardViewManager.isSecure(),
                mStatusBarKeyguardViewManager.isOccluded());
        Trace.endSection();
    }

+8 −2
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ public final class KeyguardMonitor extends KeyguardUpdateMonitorCallback {
    private int mCurrentUser;
    private boolean mShowing;
    private boolean mSecure;
    private boolean mOccluded;
    private boolean mCanSkipBouncer;

    private boolean mListening;
@@ -81,6 +82,10 @@ public final class KeyguardMonitor extends KeyguardUpdateMonitorCallback {
        return mSecure;
    }

    public boolean isOccluded() {
        return mOccluded;
    }

    public boolean canSkipBouncer() {
        return mCanSkipBouncer;
    }
@@ -99,10 +104,11 @@ public final class KeyguardMonitor extends KeyguardUpdateMonitorCallback {
        }
    }

    public void notifyKeyguardState(boolean showing, boolean secure) {
        if (mShowing == showing && mSecure == secure) return;
    public void notifyKeyguardState(boolean showing, boolean secure, boolean occluded) {
        if (mShowing == showing && mSecure == secure && mOccluded == occluded) return;
        mShowing = showing;
        mSecure = secure;
        mOccluded = occluded;
        notifyKeyguardChanged();
    }