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

Commit a5bb866c authored by Eric Biggers's avatar Eric Biggers
Browse files

LockPatternUtils: simplify querying of credential shareability

Instead of creating a UserManager for the desired userId and then
calling the deprecated method
UserManager#isCredentialSharableWithParent() which uses
UserManager#getUserProperties(UserHandle).isCredentialShareableWithParent(),
just call
UserManager#getUserProperties(UserHandle).isCredentialShareableWithParent()
directly.  The result is the same.

Also add the missing "e" to
LockPatternUtils#isCredentialSharableWithParent().

Note that UserManagerInternal (which is part of system_server) cannot be
used in LockPatternUtils (which is used by other system processes too).

Bug: 403355811
Test: atest FrameworksServicesTests:com.android.server.locksettings
Test: atest FrameworksCoreTests:LockPatternUtilsTest
Flag: EXEMPT refactor
Change-Id: I74357bfcaaf344c9eef6cb57022ff7b4a260b14e
parent 1163e15e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment