Change the message for sequential characters in a password
Change the error message for sequential characters in the password when the password quality requirement is NUMERIC_COMPLEX or higher. The error message stays the same in case of PIN. Screenshots from local testing: - http://screen/po62FX6aGKoRCU7 - http://screen/BXU6mcJEHMoU4TR - http://screen/BhCzSDdY83WCQeH Bug: 299044500 Test: Tested locally, see screenshots Flag: EXEMPT simple change to an error message Change-Id: I2e96fef6b5f9a11013fbaa8e231bddc7fa45867f
This commit is contained in:
@@ -1763,10 +1763,13 @@
|
|||||||
<string name="lockpassword_password_recently_used">Device admin doesn\'t allow using a recent
|
<string name="lockpassword_password_recently_used">Device admin doesn\'t allow using a recent
|
||||||
password</string>
|
password</string>
|
||||||
|
|
||||||
<!-- [CHAR_LIMIT=NONE] Error shown when the user tries to set an ascending or descending sequence of digits -->
|
<!-- [CHAR_LIMIT=NONE] Error shown when the user tries to set an ascending or descending sequence of digits as PIN -->
|
||||||
<string name="lockpassword_pin_no_sequential_digits">Ascending, descending, or repeated sequence
|
<string name="lockpassword_pin_no_sequential_digits">Ascending, descending, or repeated sequence
|
||||||
of digits isn\'t allowed</string>
|
of digits isn\'t allowed</string>
|
||||||
|
|
||||||
|
<!-- Error shown when the user tries to set an ascending or descending sequence of alphanumeric characters in the password [CHAR_LIMIT=NONE] -->
|
||||||
|
<string name="lockpassword_password_no_sequential_characters">Ascending, descending, or repeated sequence of characters isn\'t allowed</string>
|
||||||
|
|
||||||
<!-- Label for Confirm button when entering PIN / password the second time. [CHAR LIMIT=30] -->
|
<!-- Label for Confirm button when entering PIN / password the second time. [CHAR LIMIT=30] -->
|
||||||
<string name="lockpassword_confirm_label">Confirm</string>
|
<string name="lockpassword_confirm_label">Confirm</string>
|
||||||
|
|
||||||
|
@@ -927,7 +927,9 @@ public class ChooseLockPassword extends SettingsActivity {
|
|||||||
: R.string.lockpassword_pin_too_long));
|
: R.string.lockpassword_pin_too_long));
|
||||||
break;
|
break;
|
||||||
case CONTAINS_SEQUENCE:
|
case CONTAINS_SEQUENCE:
|
||||||
messages.add(getString(R.string.lockpassword_pin_no_sequential_digits));
|
messages.add(getString(mIsAlphaMode
|
||||||
|
? R.string.lockpassword_password_no_sequential_characters
|
||||||
|
: R.string.lockpassword_pin_no_sequential_digits));
|
||||||
break;
|
break;
|
||||||
case RECENTLY_USED:
|
case RECENTLY_USED:
|
||||||
DevicePolicyManager devicePolicyManager =
|
DevicePolicyManager devicePolicyManager =
|
||||||
|
@@ -71,7 +71,6 @@ import org.junit.Test;
|
|||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.robolectric.Robolectric;
|
import org.robolectric.Robolectric;
|
||||||
import org.robolectric.RobolectricTestRunner;
|
import org.robolectric.RobolectricTestRunner;
|
||||||
import org.robolectric.Shadows;
|
|
||||||
import org.robolectric.annotation.Config;
|
import org.robolectric.annotation.Config;
|
||||||
import org.robolectric.shadows.ShadowDrawable;
|
import org.robolectric.shadows.ShadowDrawable;
|
||||||
|
|
||||||
@@ -314,7 +313,7 @@ public class ChooseLockPasswordTest {
|
|||||||
/* minComplexity= */ PASSWORD_COMPLEXITY_NONE,
|
/* minComplexity= */ PASSWORD_COMPLEXITY_NONE,
|
||||||
/* passwordType= */ PASSWORD_QUALITY_ALPHABETIC,
|
/* passwordType= */ PASSWORD_QUALITY_ALPHABETIC,
|
||||||
/* userEnteredPassword= */ LockscreenCredential.createPassword("12345678"),
|
/* userEnteredPassword= */ LockscreenCredential.createPassword("12345678"),
|
||||||
"Ascending, descending, or repeated sequence of digits isn't allowed");
|
"Ascending, descending, or repeated sequence of characters isn't allowed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -356,7 +355,7 @@ public class ChooseLockPasswordTest {
|
|||||||
/* minComplexity= */ PASSWORD_COMPLEXITY_LOW,
|
/* minComplexity= */ PASSWORD_COMPLEXITY_LOW,
|
||||||
/* passwordType= */ PASSWORD_QUALITY_ALPHABETIC,
|
/* passwordType= */ PASSWORD_QUALITY_ALPHABETIC,
|
||||||
/* userEnteredPassword= */ LockscreenCredential.createPassword("12345678"),
|
/* userEnteredPassword= */ LockscreenCredential.createPassword("12345678"),
|
||||||
"Ascending, descending, or repeated sequence of digits isn't allowed");
|
"Ascending, descending, or repeated sequence of characters isn't allowed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user