ChooseLockPassword: Decrease minimum pin length for auto confirm

This default enables auto confirm on a pin length of 4 and
correctly displays it in setup

Squashed:

    From: Adithya R <gh0strider.2k18.reborn@gmail.com>
    Date: Wed, 27 Dec 2023 20:08:33 +0530
    Subject: ChooseLockPassword: Don't uncheck auto confirm above minimum length

    Fixes aaf4cd67.

    Change-Id: Ic94db010318ecbfc1d58653c3fd85b8cdb653e83

Change-Id: I482be235261de1e636c89e33722df4f4e412b07c
Co-authored-by: Mesquita <mesquita@aospa.co>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
Vishalcj17
2023-11-16 14:13:09 +09:00
committed by Joey
parent 48b7e3f855
commit 46a9894013
3 changed files with 6 additions and 3 deletions

View File

@@ -116,4 +116,7 @@
<!-- Summary for Wellbeing screen time usage. [CHAR LIMIT=NONE] -->
<string name="screen_time_summary_usage_today">%1$s today</string>
<!-- Auto pin confirm -->
<string name="lock_screen_auto_pin_confirm_summary_custom">Unlock automatically if you input a correct PIN. This is slightly less secure than tapping Enter to confirm.</string>
</resources>

View File

@@ -39,7 +39,7 @@
<SwitchPreferenceCompat
android:key="auto_pin_confirm"
android:title="@string/lock_screen_auto_pin_confirm_title"
android:summary="@string/lock_screen_auto_pin_confirm_summary" />
android:summary="@string/lock_screen_auto_pin_confirm_summary_custom" />
<SwitchPreferenceCompat
android:key="enhancedPinPrivacy"

View File

@@ -238,7 +238,7 @@ public class ChooseLockPassword extends SettingsActivity {
private static final String KEY_IS_AUTO_CONFIRM_CHECK_MANUALLY_CHANGED =
"auto_confirm_option_set_manually";
private static final int MIN_AUTO_PIN_REQUIREMENT_LENGTH = 6;
private static final int MIN_AUTO_PIN_REQUIREMENT_LENGTH = 4;
private LockscreenCredential mCurrentCredential;
private LockscreenCredential mChosenPassword;
@@ -1027,7 +1027,7 @@ public class ChooseLockPassword extends SettingsActivity {
mAutoPinConfirmOption.setVisibility(View.VISIBLE);
mAutoConfirmSecurityMessage.setVisibility(View.VISIBLE);
if (!mIsAutoPinConfirmOptionSetManually) {
mAutoPinConfirmOption.setChecked(length == MIN_AUTO_PIN_REQUIREMENT_LENGTH);
mAutoPinConfirmOption.setChecked(length >= MIN_AUTO_PIN_REQUIREMENT_LENGTH);
}
} else {
mAutoPinConfirmOption.setVisibility(View.GONE);