diff options
| author | Brian Colonna <bcolonna@google.com> | 2012-11-28 12:48:32 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-11-28 12:48:32 -0800 |
| commit | ceb87a664fdcfa08f98238bfe41fc3a03603cbf8 (patch) | |
| tree | 04a7e9b7592460b212287702e8cfbd9f952c54c3 | |
| parent | 2c7dac19dd2cab68587cd129b45ad593f7bfdc44 (diff) | |
| parent | 6f6facc17812fe529f3de0b75de5f9011d73eacc (diff) | |
| download | frameworks_base-ceb87a664fdcfa08f98238bfe41fc3a03603cbf8.zip frameworks_base-ceb87a664fdcfa08f98238bfe41fc3a03603cbf8.tar.gz frameworks_base-ceb87a664fdcfa08f98238bfe41fc3a03603cbf8.tar.bz2 | |
am 6f6facc1: Merge "Ignoring FUL unlock signal if user changed fixes b/7572354" into jb-mr1.1-dev
* commit '6f6facc17812fe529f3de0b75de5f9011d73eacc':
Ignoring FUL unlock signal if user changed fixes b/7572354
| -rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java b/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java index 259f1e4..830471a 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java @@ -31,6 +31,7 @@ import android.os.Looper; import android.os.Message; import android.os.PowerManager; import android.os.RemoteException; +import android.os.UserHandle; import android.util.Log; import android.view.View; @@ -214,7 +215,7 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback { handleServiceDisconnected(); break; case MSG_UNLOCK: - handleUnlock(); + handleUnlock(msg.arg1); break; case MSG_CANCEL: handleCancel(); @@ -297,11 +298,18 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback { /** * Stops the Face Unlock service and tells the device to grant access to the user. */ - void handleUnlock() { + void handleUnlock(int authenticatedUserId) { if (DEBUG) Log.d(TAG, "handleUnlock()"); stop(); - mKeyguardScreenCallback.reportSuccessfulUnlockAttempt(); - mKeyguardScreenCallback.dismiss(true); + int currentUserId = mLockPatternUtils.getCurrentUser(); + if (authenticatedUserId == currentUserId) { + if (DEBUG) Log.d(TAG, "Unlocking for user " + authenticatedUserId); + mKeyguardScreenCallback.reportSuccessfulUnlockAttempt(); + mKeyguardScreenCallback.dismiss(true); + } else { + Log.d(TAG, "Ignoring unlock for authenticated user (" + authenticatedUserId + + ") because the current user is " + currentUserId); + } } /** @@ -420,7 +428,8 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback { */ public void unlock() { if (DEBUG) Log.d(TAG, "unlock()"); - mHandler.sendEmptyMessage(MSG_UNLOCK); + Message message = mHandler.obtainMessage(MSG_UNLOCK, UserHandle.getCallingUserId(), -1); + mHandler.sendMessage(message); } /** |
