diff options
author | Adrian Roos <roosa@google.com> | 2014-09-03 15:39:10 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-03 15:39:11 +0000 |
commit | 053ff3c776d51dd216f3b87b692336570439033b (patch) | |
tree | 86955e2d0c6ad2292005251f143a460d2180f9f4 /packages/SystemUI/src/com/android/systemui/keyguard | |
parent | 95f3bcdce0b026369d924982dd3315da8dffaf3a (diff) | |
parent | be47b07bef0596dd9bf7137ea08cc1112328c6e8 (diff) | |
download | frameworks_base-053ff3c776d51dd216f3b87b692336570439033b.zip frameworks_base-053ff3c776d51dd216f3b87b692336570439033b.tar.gz frameworks_base-053ff3c776d51dd216f3b87b692336570439033b.tar.bz2 |
Merge "Auto dismiss lockscreen when switching to guest" into lmp-dev
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/keyguard')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 54c2c09..f8d0d9e 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -27,6 +27,7 @@ import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.content.pm.UserInfo; import android.media.AudioManager; import android.media.SoundPool; import android.os.Bundle; @@ -302,6 +303,13 @@ public class KeyguardViewMediator extends SystemUI { @Override public void onUserSwitchComplete(int userId) { mSwitchingUser = false; + if (userId != UserHandle.USER_OWNER) { + UserInfo info = UserManager.get(mContext).getUserInfo(userId); + if (info != null && info.isGuest()) { + // If we just switched to a guest, try to dismiss keyguard. + dismiss(); + } + } } @Override |