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
Loading
Please register or sign in to comment