Loading core/java/android/hardware/biometrics/flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -39,3 +39,11 @@ flag { description: "This flag controls whether LSKF fallback is removed from biometric prompt when the phone is outside trusted locations" bug: "322081563" } flag { name: "screen_off_unlock_udfps" is_exported: true namespace: "biometrics_integration" description: "This flag controls Whether to enable fp unlock when screen turns off on udfps devices" bug: "373792870" } core/java/android/hardware/display/AmbientDisplayConfiguration.java +7 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.hardware.display; import android.annotation.TestApi; import android.content.Context; import android.hardware.biometrics.Flags; import android.os.Build; import android.os.SystemProperties; import android.provider.Settings; Loading @@ -41,6 +42,7 @@ public class AmbientDisplayConfiguration { private final Context mContext; private final boolean mAlwaysOnByDefault; private final boolean mPickupGestureEnabledByDefault; private final boolean mScreenOffUdfpsEnabledByDefault; /** Copied from android.provider.Settings.Secure since these keys are hidden. */ private static final String[] DOZE_SETTINGS = { Loading Loading @@ -68,6 +70,8 @@ public class AmbientDisplayConfiguration { mAlwaysOnByDefault = mContext.getResources().getBoolean(R.bool.config_dozeAlwaysOnEnabled); mPickupGestureEnabledByDefault = mContext.getResources().getBoolean(R.bool.config_dozePickupGestureEnabled); mScreenOffUdfpsEnabledByDefault = mContext.getResources().getBoolean(R.bool.config_screen_off_udfps_enabled); } /** @hide */ Loading Loading @@ -146,7 +150,9 @@ public class AmbientDisplayConfiguration { /** @hide */ public boolean screenOffUdfpsEnabled(int user) { return !TextUtils.isEmpty(udfpsLongPressSensorType()) && boolSettingDefaultOff("screen_off_udfps_enabled", user); && ((mScreenOffUdfpsEnabledByDefault && Flags.screenOffUnlockUdfps()) ? boolSettingDefaultOn("screen_off_udfps_enabled", user) : boolSettingDefaultOff("screen_off_udfps_enabled", user)); } /** @hide */ Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -7178,4 +7178,7 @@ <!-- The name of the service for forensic backup transport. --> <string name="config_forensicBackupTransport" translatable="false"></string> <!-- Whether to enable fp unlock when screen turns off on udfps devices --> <bool name="config_screen_off_udfps_enabled">false</bool> </resources> core/res/res/values/symbols.xml +3 −0 Original line number Diff line number Diff line Loading @@ -5639,4 +5639,7 @@ <!-- Forensic backup transport --> <java-symbol type="string" name="config_forensicBackupTransport" /> <!-- Fingerprint screen off unlock config --> <java-symbol type="bool" name="config_screen_off_udfps_enabled" /> </resources> packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java +3 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.doze; import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT; import static android.hardware.biometrics.Flags.screenOffUnlockUdfps; import static com.android.systemui.doze.DozeLog.REASON_SENSOR_QUICK_PICKUP; import static com.android.systemui.doze.DozeLog.REASON_SENSOR_UDFPS_LONG_PRESS; Loading Loading @@ -248,8 +249,8 @@ public class DozeSensors { true /* touchscreen */, false /* ignoresSetting */, dozeParameters.longPressUsesProx(), false /* immediatelyReRegister */, true /* requiresAod */ screenOffUnlockUdfps() /* immediatelyReRegister */, !screenOffUnlockUdfps() /* requiresAod */ ), new PluginSensor( new SensorManagerPlugin.Sensor(TYPE_WAKE_DISPLAY), Loading Loading
core/java/android/hardware/biometrics/flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -39,3 +39,11 @@ flag { description: "This flag controls whether LSKF fallback is removed from biometric prompt when the phone is outside trusted locations" bug: "322081563" } flag { name: "screen_off_unlock_udfps" is_exported: true namespace: "biometrics_integration" description: "This flag controls Whether to enable fp unlock when screen turns off on udfps devices" bug: "373792870" }
core/java/android/hardware/display/AmbientDisplayConfiguration.java +7 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.hardware.display; import android.annotation.TestApi; import android.content.Context; import android.hardware.biometrics.Flags; import android.os.Build; import android.os.SystemProperties; import android.provider.Settings; Loading @@ -41,6 +42,7 @@ public class AmbientDisplayConfiguration { private final Context mContext; private final boolean mAlwaysOnByDefault; private final boolean mPickupGestureEnabledByDefault; private final boolean mScreenOffUdfpsEnabledByDefault; /** Copied from android.provider.Settings.Secure since these keys are hidden. */ private static final String[] DOZE_SETTINGS = { Loading Loading @@ -68,6 +70,8 @@ public class AmbientDisplayConfiguration { mAlwaysOnByDefault = mContext.getResources().getBoolean(R.bool.config_dozeAlwaysOnEnabled); mPickupGestureEnabledByDefault = mContext.getResources().getBoolean(R.bool.config_dozePickupGestureEnabled); mScreenOffUdfpsEnabledByDefault = mContext.getResources().getBoolean(R.bool.config_screen_off_udfps_enabled); } /** @hide */ Loading Loading @@ -146,7 +150,9 @@ public class AmbientDisplayConfiguration { /** @hide */ public boolean screenOffUdfpsEnabled(int user) { return !TextUtils.isEmpty(udfpsLongPressSensorType()) && boolSettingDefaultOff("screen_off_udfps_enabled", user); && ((mScreenOffUdfpsEnabledByDefault && Flags.screenOffUnlockUdfps()) ? boolSettingDefaultOn("screen_off_udfps_enabled", user) : boolSettingDefaultOff("screen_off_udfps_enabled", user)); } /** @hide */ Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -7178,4 +7178,7 @@ <!-- The name of the service for forensic backup transport. --> <string name="config_forensicBackupTransport" translatable="false"></string> <!-- Whether to enable fp unlock when screen turns off on udfps devices --> <bool name="config_screen_off_udfps_enabled">false</bool> </resources>
core/res/res/values/symbols.xml +3 −0 Original line number Diff line number Diff line Loading @@ -5639,4 +5639,7 @@ <!-- Forensic backup transport --> <java-symbol type="string" name="config_forensicBackupTransport" /> <!-- Fingerprint screen off unlock config --> <java-symbol type="bool" name="config_screen_off_udfps_enabled" /> </resources>
packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java +3 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.doze; import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT; import static android.hardware.biometrics.Flags.screenOffUnlockUdfps; import static com.android.systemui.doze.DozeLog.REASON_SENSOR_QUICK_PICKUP; import static com.android.systemui.doze.DozeLog.REASON_SENSOR_UDFPS_LONG_PRESS; Loading Loading @@ -248,8 +249,8 @@ public class DozeSensors { true /* touchscreen */, false /* ignoresSetting */, dozeParameters.longPressUsesProx(), false /* immediatelyReRegister */, true /* requiresAod */ screenOffUnlockUdfps() /* immediatelyReRegister */, !screenOffUnlockUdfps() /* requiresAod */ ), new PluginSensor( new SensorManagerPlugin.Sensor(TYPE_WAKE_DISPLAY), Loading