am f094bde1: am c63a12b7: am 6fe373b1: am 16d7245b: Merge "Prevent Fingerprint when SIM is locked" into mnc-dr-dev
* commit 'f094bde15dbbe305d594e11dff5fa22737b93c2c':
Prevent Fingerprint when SIM is locked
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
index ead0307..fc6117f 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -523,7 +523,8 @@
final DevicePolicyManager dpm =
(DevicePolicyManager) mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
return dpm != null && (dpm.getKeyguardDisabledFeatures(null, userId)
- & DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT) != 0;
+ & DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT) != 0
+ || isSimPinSecure();
}
public boolean getUserCanSkipBouncer(int userId) {
@@ -1016,7 +1017,7 @@
private boolean shouldListenForFingerprint() {
return (mKeyguardIsVisible || !mDeviceInteractive) && !mSwitchingUser
- && !mFingerprintAlreadyAuthenticated;
+ && !mFingerprintAlreadyAuthenticated && !isFingerprintDisabled(getCurrentUser());
}
private void startListeningForFingerprint() {
@@ -1090,6 +1091,7 @@
* Handle {@link #MSG_DPM_STATE_CHANGED}
*/
protected void handleDevicePolicyManagerStateChanged() {
+ updateFingerprintListeningState();
for (int i = mCallbacks.size() - 1; i >= 0; i--) {
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
if (cb != null) {