From aa401afb4cdfd5bab441e633aee801c2a127aec2 Mon Sep 17 00:00:00 2001 From: Toni Barzic Date: Wed, 17 Feb 2016 15:09:10 -0800 Subject: [PATCH] Properly handle non split system user when showing bouncer For system user, there should be no atempt to dismiss keyguard, but only if system user is split (i.e. not a meat user). Change-Id: Ia2c1e7a3e197c5be72446f21b3883e853485ff26 --- .../com/android/systemui/statusbar/phone/KeyguardBouncer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 aecef140d2bf3..190e37ff54814 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java @@ -19,6 +19,7 @@ package com.android.systemui.statusbar.phone; import android.app.ActivityManager; import android.content.Context; import android.os.UserHandle; +import android.os.UserManager; import android.util.Slog; import android.view.KeyEvent; import android.view.LayoutInflater; @@ -91,7 +92,8 @@ public class KeyguardBouncer { final int activeUserId = ActivityManager.getCurrentUser(); final int keyguardUserId = KeyguardUpdateMonitor.getCurrentUser(); - final boolean allowDismissKeyguard = activeUserId != UserHandle.USER_SYSTEM + final boolean allowDismissKeyguard = + !(UserManager.isSplitSystemUser() && activeUserId == UserHandle.USER_SYSTEM) && activeUserId == keyguardUserId; // If allowed, try to dismiss the Keyguard. If no security auth (password/pin/pattern) is // set, this will dismiss the whole Keyguard. Otherwise, show the bouncer.