This enables the back button on secure keyguard screens so the user can
get back to the initial screen.
Partial fix for bug
7094419
Change-Id: I4dc0ac8facfd2930ccb60710c36015ec1d2c8aa6
});
}
updateSecurityViews();
+ setSystemUiVisibility(getSystemUiVisibility() | View.STATUS_BAR_DISABLE_BACK);
}
private void updateSecurityViews() {
}
}
- // Discard current runnable if we're switching back to the selector view
+
if (securityMode == SecurityMode.None) {
+ // Discard current runnable if we're switching back to the selector view
setOnDismissRunnable(null);
+ setSystemUiVisibility(getSystemUiVisibility() | View.STATUS_BAR_DISABLE_BACK);
+ } else {
+ setSystemUiVisibility(getSystemUiVisibility() & (~View.STATUS_BAR_DISABLE_BACK));
}
mCurrentSecuritySelection = securityMode;
maybeCreateKeyguardLocked(enableScreenRotation);
maybeEnableScreenRotation(enableScreenRotation);
- // Disable aspects of the system/status/navigation bars that are not appropriate or
- // useful for the lockscreen but can be re-shown by dialogs or SHOW_WHEN_LOCKED activities.
- // Other disabled bits are handled by the KeyguardViewMediator talking directly to the
- // status bar service.
- int visFlags = View.STATUS_BAR_DISABLE_BACK | View.STATUS_BAR_DISABLE_HOME;
+ // Disable common aspects of the system/status/navigation bars that are not appropriate or
+ // useful on any keyguard screen but can be re-shown by dialogs or SHOW_WHEN_LOCKED
+ // activities. Other disabled bits are handled by the KeyguardViewMediator talking
+ // directly to the status bar service.
+ final int visFlags = View.STATUS_BAR_DISABLE_HOME;
if (DEBUG) Log.v(TAG, "KGVM: Set visibility on " + mKeyguardHost + " to " + visFlags);
mKeyguardHost.setSystemUiVisibility(visFlags);
// windows that appear on top, ever
int flags = StatusBarManager.DISABLE_NONE;
if (mShowing) {
- // disable navigation status bar components (home, recents) if lock screen is up
+ // Permanently disable components not available when keyguard is enabled
+ // (like recents). Temporary enable/disable (e.g. the "back" button) are
+ // done in KeyguardHostView.
flags |= StatusBarManager.DISABLE_RECENT;
if (isSecure() || !ENABLE_INSECURE_STATUS_BAR_EXPAND) {
// showing secure lockscreen; disable expanding.