Properly handle non split system user when showing bouncer

am: b799d3f127

* commit 'b799d3f127f7410e8d0afe16343032e6115750fc':
  Properly handle non split system user when showing bouncer
This commit is contained in:
Toni Barzic
2016-02-22 20:14:04 +00:00
committed by android-build-merger

View File

@@ -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.