diff options
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java | 2 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java index 2da3b27..1c6dc2c 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -648,7 +648,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { @Override public void onUserSwitchComplete(int newUserId) throws RemoteException { mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_SWITCH_COMPLETE, - newUserId)); + newUserId, 0)); mSwitchingUser = false; } }); diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index f4d0669..8180265 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 |