summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2015-08-05 13:03:21 -0700
committerJim Miller <jaggies@google.com>2015-08-05 20:06:37 +0000
commit8ae1be120806d0189f65a492004a7b5416aa6c6f (patch)
treecb7d30ab1f82881d6b9b3ad5b0ce23be0d9564a2
parent881cd15519535e493d497fefd857f8fe0236c774 (diff)
downloadframeworks_base-8ae1be120806d0189f65a492004a7b5416aa6c6f.zip
frameworks_base-8ae1be120806d0189f65a492004a7b5416aa6c6f.tar.gz
frameworks_base-8ae1be120806d0189f65a492004a7b5416aa6c6f.tar.bz2
Disable fingerprint when remotely reset by DPM
When the device is lost or stolen, it's safer to fall back to strong authentication (pin, pattern or password). This disables fingerprint like we do with trust agents. Fixes bug 21620081 Change-Id: I7bbe54be3721b2f160b783daeb3acbe434705046
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java7
-rw-r--r--services/core/java/com/android/server/trust/TrustManagerService.java6
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 c7adc98..113b1f4 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -548,6 +548,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);
@@ -599,6 +600,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)) {
@@ -713,6 +715,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 + "}";
}
@@ -895,7 +898,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 15da829..174bf16 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);
+ }
}
}