<!-- config for showing AM/PM on lock screen in 12hour format -->
<bool name="config_showAmpm">true</bool>
+
+ <!-- Should we listen for fingerprints when the screen is off? Devices
+ with a rear-mounted sensor want this, but certain devices have
+ the sensor embedded in the power key and listening all the time
+ causes a poor experience. -->
+ <bool name="config_fingerprintWakeAndUnlock">true</bool>
</resources>
}
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() {