Skip to content

Commit 772db42

Browse files
Jim MillerAndroid (Google) Code Review
authored andcommitted
Merge "Selectively enable back button in keyguard for security screens." into jb-mr1-dev
2 parents 7d0882b + e23ab8b commit 772db42

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ public void show() {
179179
});
180180
}
181181
updateSecurityViews();
182+
setSystemUiVisibility(getSystemUiVisibility() | View.STATUS_BAR_DISABLE_BACK);
182183
}
183184

184185
private void updateSecurityViews() {
@@ -558,9 +559,13 @@ private void showSecurityScreen(SecurityMode securityMode) {
558559
}
559560
}
560561

561-
// Discard current runnable if we're switching back to the selector view
562+
562563
if (securityMode == SecurityMode.None) {
564+
// Discard current runnable if we're switching back to the selector view
563565
setOnDismissRunnable(null);
566+
setSystemUiVisibility(getSystemUiVisibility() | View.STATUS_BAR_DISABLE_BACK);
567+
} else {
568+
setSystemUiVisibility(getSystemUiVisibility() & (~View.STATUS_BAR_DISABLE_BACK));
564569
}
565570

566571
mCurrentSecuritySelection = securityMode;

policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ public synchronized void show() {
9090
maybeCreateKeyguardLocked(enableScreenRotation);
9191
maybeEnableScreenRotation(enableScreenRotation);
9292

93-
// Disable aspects of the system/status/navigation bars that are not appropriate or
94-
// useful for the lockscreen but can be re-shown by dialogs or SHOW_WHEN_LOCKED activities.
95-
// Other disabled bits are handled by the KeyguardViewMediator talking directly to the
96-
// status bar service.
97-
int visFlags = View.STATUS_BAR_DISABLE_BACK | View.STATUS_BAR_DISABLE_HOME;
93+
// Disable common aspects of the system/status/navigation bars that are not appropriate or
94+
// useful on any keyguard screen but can be re-shown by dialogs or SHOW_WHEN_LOCKED
95+
// activities. Other disabled bits are handled by the KeyguardViewMediator talking
96+
// directly to the status bar service.
97+
final int visFlags = View.STATUS_BAR_DISABLE_HOME;
9898
if (DEBUG) Log.v(TAG, "KGVM: Set visibility on " + mKeyguardHost + " to " + visFlags);
9999
mKeyguardHost.setSystemUiVisibility(visFlags);
100100

policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,9 @@ private void adjustStatusBarLocked() {
12561256
// windows that appear on top, ever
12571257
int flags = StatusBarManager.DISABLE_NONE;
12581258
if (mShowing) {
1259-
// disable navigation status bar components (home, recents) if lock screen is up
1259+
// Permanently disable components not available when keyguard is enabled
1260+
// (like recents). Temporary enable/disable (e.g. the "back" button) are
1261+
// done in KeyguardHostView.
12601262
flags |= StatusBarManager.DISABLE_RECENT;
12611263
if (isSecure() || !ENABLE_INSECURE_STATUS_BAR_EXPAND) {
12621264
// showing secure lockscreen; disable expanding.

0 commit comments

Comments
 (0)