Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3791a5a9 authored by Vincent Wang's avatar Vincent Wang Committed by Android (Google) Code Review
Browse files

Merge "Add default config to control fp screen off unlock default settings" into main

parents a4e305b1 98265957
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ public class AmbientDisplayConfiguration {
    private final Context mContext;
    private final boolean mAlwaysOnByDefault;
    private final boolean mPickupGestureEnabledByDefault;
    private final boolean mScreenOffUdfpsEnabledByDefault;
    private final boolean mScreenOffUdfpsAvailable;

    /** Copied from android.provider.Settings.Secure since these keys are hidden. */
    private static final String[] DOZE_SETTINGS = {
@@ -72,7 +72,7 @@ public class AmbientDisplayConfiguration {
        mAlwaysOnByDefault = mContext.getResources().getBoolean(R.bool.config_dozeAlwaysOnEnabled);
        mPickupGestureEnabledByDefault =
                mContext.getResources().getBoolean(R.bool.config_dozePickupGestureEnabled);
        mScreenOffUdfpsEnabledByDefault =
        mScreenOffUdfpsAvailable =
                mContext.getResources().getBoolean(R.bool.config_screen_off_udfps_enabled);
    }

@@ -152,7 +152,8 @@ public class AmbientDisplayConfiguration {
    /** @hide */
    public boolean screenOffUdfpsEnabled(int user) {
        return !TextUtils.isEmpty(udfpsLongPressSensorType())
                && ((mScreenOffUdfpsEnabledByDefault && Flags.screenOffUnlockUdfps())
                && ((mScreenOffUdfpsAvailable && Flags.screenOffUnlockUdfps())
                && mContext.getResources().getBoolean(R.bool.config_screen_off_udfps_default_on)
                ? boolSettingDefaultOn(SCREEN_OFF_UNLOCK_UDFPS_ENABLED, user)
                : boolSettingDefaultOff(SCREEN_OFF_UNLOCK_UDFPS_ENABLED, user));
    }
+4 −0
Original line number Diff line number Diff line
@@ -7299,6 +7299,10 @@
    <!-- Whether to enable fp unlock when screen turns off on udfps devices -->
    <bool name="config_screen_off_udfps_enabled">false</bool>

    <!-- Default value for fp screen off unlock toggle, it only works for the devices that support
         fp screen off unlock-->
    <bool name="config_screen_off_udfps_default_on">false</bool>

    <!-- The name of the system package that will hold the dependency installer role. -->
    <string name="config_systemDependencyInstaller" translatable="false" />

+3 −0
Original line number Diff line number Diff line
@@ -5791,6 +5791,9 @@
  <!-- Fingerprint screen off unlock config -->
  <java-symbol type="bool" name="config_screen_off_udfps_enabled" />

  <!-- Default toggle for fp screen of unlcok-->
  <java-symbol type="bool" name="config_screen_off_udfps_default_on" />

  <!-- Style for Wear Material3 Button. Will only be used for sdk 36 or above. -->
  <java-symbol type="style" name="Widget.DeviceDefault.Button.WearMaterial3" />