Allow sysui navigation to work when application occludes keyguard
Fixes bug 30650150 Change-Id: Ie4a858dcfd259c733cd32c3c2b1dec2ff437f1ab
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user