summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
index dfe8eb28b2a6..0c997f7f443d 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java
@@ -52,6 +52,7 @@ import android.os.PowerManager;
import android.os.Trace;
import android.os.VibrationAttributes;
import android.os.VibrationEffect;
+import android.provider.Settings;
import android.util.Log;
import android.view.HapticFeedbackConstants;
import android.view.LayoutInflater;
@@ -920,12 +921,21 @@ public class UdfpsController implements DozeReceiver, Dumpable {
true /* isAod */);
};
- if (mScreenOn) {
+ if (isScreenOffUnlockEnabled() || mScreenOn) {
mAodInterruptRunnable.run();
mAodInterruptRunnable = null;
}
}
+ private boolean isScreenOffUnlockEnabled() {
+ return mContext.getResources().getBoolean(R.bool.config_screen_off_udfps_enabled)
+ && Settings.Secure.getIntForUser(
+ mContext.getContentResolver(),
+ Settings.Secure.SCREEN_OFF_UNLOCK_UDFPS_ENABLED,
+ 0,
+ mContext.getUserId()) != 0;
+ }
+
/**
* Add a callback for fingerUp and fingerDown events
*/