summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2015-05-05 20:51:17 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-05 20:51:18 +0000
commit5be4d295c08614eaf8afd012f90e5c7726bc293e (patch)
treeb7d340c271363c0ce777cb2b27d3ea0649d065d0 /packages
parentd5304020b29762ce79d66c1ed3028b0ee30c68ad (diff)
parent237b061182d36fd3bf2238092ccf3d529ec8877b (diff)
downloadframeworks_base-5be4d295c08614eaf8afd012f90e5c7726bc293e.zip
frameworks_base-5be4d295c08614eaf8afd012f90e5c7726bc293e.tar.gz
frameworks_base-5be4d295c08614eaf8afd012f90e5c7726bc293e.tar.bz2
Merge "Only enable fingerprint auth after first regular auth" into mnc-dev
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() {