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

Skip to content
Commit a775edfa authored by Eric Biggers's avatar Eric Biggers
Browse files

Allow constructing a PIN LockscreenCredential with mInvalidChars

KeyguardManager#setLock() (both overloads) and LockSettingsShellCommand
can try to set a PIN containing arbitrary characters.  The check for
digits-only happens in PasswordMetrics#validatePasswordMetrics().
However, due to one of my recent changes, before getting to that point,
constructing the LockscreenCredential throws IllegalArgumentException if
the PIN contains any chars outside ASCII 32–127.  This is because I had
thought this case would only be possible for PASSWORD.

As it's needed for PIN too, allow this case.

Bug: 219511761
Bug: 232900169
Bug: 243881358
Bug: 288904180
Test: atest LockscreenCredentialTest
Change-Id: Icd101f2dbb0c700a0cc5442a81c0c9ac345737b3
parent 8057abea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment