summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Vadim Tryshev <vadimt@google.com> 2016-02-10 14:11:03 -0800
committer Vadim Tryshev <vadimt@google.com> 2016-02-22 14:23:58 -0800
commitec018434d48586c3d2c72ed44ee9164cc4115bc3 (patch)
tree2d51365859e9e0feba8022fc26f734090d134da0
parent1e413f5b77b4105479eb7686dfa9b8428bdf58a1 (diff)
Don't show UNLOCK button when there are no users.
Alternate lock screen shows UNLOCK button in the middle of an empty screen before any user has been created. See the screenshot in the bug. This fixes it. The approach is similar to the check in KeyguardViewMediator.handleHide(). Bug: 27109342 Change-Id: I25536364b2c456d6fd55c79de7f25d2b0667e26f
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
index 190e37ff5481..825b64459397 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
@@ -79,6 +79,11 @@ public class KeyguardBouncer {
}
public void show(boolean resetSecuritySelection) {
+ final int keyguardUserId = KeyguardUpdateMonitor.getCurrentUser();
+ if (keyguardUserId == UserHandle.USER_SYSTEM && UserManager.isSplitSystemUser()) {
+ // In split system user mode, we never unlock system user.
+ return;
+ }
mFalsingManager.onBouncerShown();
ensureView();
if (resetSecuritySelection) {
@@ -91,7 +96,6 @@ public class KeyguardBouncer {
}
final int activeUserId = ActivityManager.getCurrentUser();
- final int keyguardUserId = KeyguardUpdateMonitor.getCurrentUser();
final boolean allowDismissKeyguard =
!(UserManager.isSplitSystemUser() && activeUserId == UserHandle.USER_SYSTEM)
&& activeUserId == keyguardUserId;