diff options
| author | 2015-08-06 02:48:51 +0000 | |
|---|---|---|
| committer | 2015-08-06 02:48:51 +0000 | |
| commit | 40fa4070c70d9ddde681b2fb28627b8a4889080e (patch) | |
| tree | d427d6a444cb9a5937bd86495074b5155961225f | |
| parent | 25f9f7a482b464b0cfe909ccfb8bda295c9ebc35 (diff) | |
| parent | 4a66bbf7fdbd9f96ea4f6d6fe1a63408dd70bd27 (diff) | |
am 4a66bbf7: am 5f96eb0c: am 6fdb85d3: am 120fc2c7: Merge "Disable fingerprint when remotely reset by DPM" into mnc-dev
* commit '4a66bbf7fdbd9f96ea4f6d6fe1a63408dd70bd27':
Disable fingerprint when remotely reset by DPM
| -rw-r--r-- | packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java | 7 | ||||
| -rw-r--r-- | services/core/java/com/android/server/trust/TrustManagerService.java | 6 |
2 files changed, 12 insertions, 1 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java index 5183c356f8d5..55d85206d604 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -557,6 +557,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() { + @Override public void onReceive(Context context, Intent intent) { final String action = intent.getAction(); if (DEBUG) Log.d(TAG, "received broadcast " + action); @@ -610,6 +611,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private final BroadcastReceiver mBroadcastAllReceiver = new BroadcastReceiver() { + @Override public void onReceive(Context context, Intent intent) { final String action = intent.getAction(); if (AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED.equals(action)) { @@ -724,6 +726,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { return new SimData(state, slotId, subId); } + @Override public String toString() { return "SimData{state=" + simState + ",slotId=" + slotId + ",subId=" + subId + "}"; } @@ -939,7 +942,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } private boolean shouldListenForFingerprint() { - return mKeyguardIsVisible && !mSwitchingUser; + return mKeyguardIsVisible && !mSwitchingUser && + mTrustManager.hasUserAuthenticatedSinceBoot( + ActivityManager.getCurrentUser()); } private void startListeningForFingerprint() { diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java index 15da8290ae40..174bf16bbbe6 100644 --- a/services/core/java/com/android/server/trust/TrustManagerService.java +++ b/services/core/java/com/android/server/trust/TrustManagerService.java @@ -579,8 +579,14 @@ public class TrustManagerService extends SystemService { private void clearUserHasAuthenticated(int userId) { if (userId == UserHandle.USER_ALL) { mUserHasAuthenticated.clear(); + synchronized (mUserHasAuthenticatedSinceBoot) { + mUserHasAuthenticatedSinceBoot.clear(); + } } else { mUserHasAuthenticated.put(userId, false); + synchronized (mUserHasAuthenticatedSinceBoot) { + mUserHasAuthenticatedSinceBoot.put(userId, false); + } } } |