summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-05-02 04:01:43 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-05-02 13:56:35 -0700
commit9f7fc271dda8989fe5ad5786a2ab409385d6b78c (patch)
treeeb3b006bbc969a938bac274e5858802a24210ea5 /packages/Keyguard/src
parentd6236bdab88bc325232bee0d39d1c746a69c9fe6 (diff)
downloadframeworks_base-9f7fc271dda8989fe5ad5786a2ab409385d6b78c.zip
frameworks_base-9f7fc271dda8989fe5ad5786a2ab409385d6b78c.tar.gz
frameworks_base-9f7fc271dda8989fe5ad5786a2ab409385d6b78c.tar.bz2
keyguard: Allow disabling fingerprint wake-and-unlock
* When the fingerprint sensor is embedded in the power key, wake-and-unlock is total chaos. Add an option to disable it. * The default behavior is unchanged. Change-Id: I50c0a857daba92c17470d8089aca94099c792956
Diffstat (limited to 'packages/Keyguard/src')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
index d515d19..be8ded3 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -1050,9 +1050,16 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
}
private boolean shouldListenForFingerprint() {
- return (mKeyguardIsVisible || !mDeviceInteractive || mBouncer || mGoingToSleep)
- && !mSwitchingUser && !mFingerprintAlreadyAuthenticated
- && !isFingerprintDisabled(getCurrentUser());
+ if (!mSwitchingUser && !mFingerprintAlreadyAuthenticated
+ && !isFingerprintDisabled(getCurrentUser())) {
+ if (mContext.getResources().getBoolean(
+ com.android.keyguard.R.bool.config_fingerprintWakeAndUnlock)) {
+ return mKeyguardIsVisible || !mDeviceInteractive || mBouncer || mGoingToSleep;
+ } else {
+ return mDeviceInteractive && (mKeyguardIsVisible || mBouncer);
+ }
+ }
+ return false;
}
private void startListeningForFingerprint() {