summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2015-05-01 14:28:49 -0700
committerJorim Jaggi <jjaggi@google.com>2015-05-05 11:43:42 -0700
commit237b061182d36fd3bf2238092ccf3d529ec8877b (patch)
tree860ac4982b87016d135c755b4b6e615d268ae7c2 /packages
parent28a516280a59a81aeecbf4a68057019d59feb872 (diff)
downloadframeworks_base-237b061182d36fd3bf2238092ccf3d529ec8877b.zip
frameworks_base-237b061182d36fd3bf2238092ccf3d529ec8877b.tar.gz
frameworks_base-237b061182d36fd3bf2238092ccf3d529ec8877b.tar.bz2
Only enable fingerprint auth after first regular auth
- Add method hasUserAuthenticatedSinceBoot to TrustManagerService - Use this information to only enable fingerprint auth after the user has at least once authenticated with his regular authentication method. Change-Id: Icf073ac3b340d557b044f6bf27f1a7f8511048e2
Diffstat (limited to 'packages')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
index c7b7628..842cf73 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -58,7 +58,6 @@ import android.hardware.fingerprint.FingerprintManager;
import android.hardware.fingerprint.FingerprintManager.AuthenticationCallback;
import android.hardware.fingerprint.FingerprintUtils;
import android.hardware.fingerprint.FingerprintManager.AuthenticationResult;
-import android.service.trust.TrustAgentService;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
import android.telephony.SubscriptionManager.OnSubscriptionsChangedListener;
@@ -154,6 +153,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
private SubscriptionManager mSubscriptionManager;
private List<SubscriptionInfo> mSubscriptionInfo;
private boolean mFingerprintDetectionRunning;
+ private TrustManager mTrustManager;
private final Handler mHandler = new Handler() {
@Override
@@ -784,8 +784,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
e.printStackTrace();
}
- TrustManager trustManager = (TrustManager) context.getSystemService(Context.TRUST_SERVICE);
- trustManager.registerTrustListener(this);
+ mTrustManager = (TrustManager) context.getSystemService(Context.TRUST_SERVICE);
+ mTrustManager.registerTrustListener(this);
mFpm = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);
updateFingerprintListeningState();
@@ -801,7 +801,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
}
private boolean shouldListenForFingerprint() {
- return mScreenOn && mKeyguardIsVisible && !mSwitchingUser;
+ return mScreenOn && mKeyguardIsVisible && !mSwitchingUser
+ && mTrustManager.hasUserAuthenticatedSinceBoot(ActivityManager.getCurrentUser());
}
private void startListeningForFingerprint() {