Allow sysui navigation to work when application occludes keyguard
am: 69c1241d3b
Change-Id: I533b955e86cab04d9b57c08d1f162671f374f5c2
This commit is contained in:
@@ -2731,7 +2731,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
public void handleSystemNavigationKey(int key) {
|
public void handleSystemNavigationKey(int key) {
|
||||||
if (SPEW) Log.d(TAG, "handleSystemNavigationKey: " + key);
|
if (SPEW) Log.d(TAG, "handleSystemNavigationKey: " + key);
|
||||||
if (!panelsEnabled() || !mKeyguardMonitor.isDeviceInteractive()
|
if (!panelsEnabled() || !mKeyguardMonitor.isDeviceInteractive()
|
||||||
|| mKeyguardMonitor.isShowing()) {
|
|| mKeyguardMonitor.isShowing() && !mKeyguardMonitor.isOccluded()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4351,7 +4351,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
|||||||
checkBarModes();
|
checkBarModes();
|
||||||
updateMediaMetaData(false, mState != StatusBarState.KEYGUARD);
|
updateMediaMetaData(false, mState != StatusBarState.KEYGUARD);
|
||||||
mKeyguardMonitor.notifyKeyguardState(mStatusBarKeyguardViewManager.isShowing(),
|
mKeyguardMonitor.notifyKeyguardState(mStatusBarKeyguardViewManager.isShowing(),
|
||||||
mStatusBarKeyguardViewManager.isSecure());
|
mStatusBarKeyguardViewManager.isSecure(),
|
||||||
|
mStatusBarKeyguardViewManager.isOccluded());
|
||||||
Trace.endSection();
|
Trace.endSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public final class KeyguardMonitor extends KeyguardUpdateMonitorCallback {
|
|||||||
private int mCurrentUser;
|
private int mCurrentUser;
|
||||||
private boolean mShowing;
|
private boolean mShowing;
|
||||||
private boolean mSecure;
|
private boolean mSecure;
|
||||||
|
private boolean mOccluded;
|
||||||
private boolean mCanSkipBouncer;
|
private boolean mCanSkipBouncer;
|
||||||
|
|
||||||
private boolean mListening;
|
private boolean mListening;
|
||||||
@@ -81,6 +82,10 @@ public final class KeyguardMonitor extends KeyguardUpdateMonitorCallback {
|
|||||||
return mSecure;
|
return mSecure;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isOccluded() {
|
||||||
|
return mOccluded;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean canSkipBouncer() {
|
public boolean canSkipBouncer() {
|
||||||
return mCanSkipBouncer;
|
return mCanSkipBouncer;
|
||||||
}
|
}
|
||||||
@@ -99,10 +104,11 @@ public final class KeyguardMonitor extends KeyguardUpdateMonitorCallback {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void notifyKeyguardState(boolean showing, boolean secure) {
|
public void notifyKeyguardState(boolean showing, boolean secure, boolean occluded) {
|
||||||
if (mShowing == showing && mSecure == secure) return;
|
if (mShowing == showing && mSecure == secure && mOccluded == occluded) return;
|
||||||
mShowing = showing;
|
mShowing = showing;
|
||||||
mSecure = secure;
|
mSecure = secure;
|
||||||
|
mOccluded = occluded;
|
||||||
notifyKeyguardChanged();
|
notifyKeyguardChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user