LockSettingsService: simplify querying of credential shareability
Instead of creating a UserManager for the desired userId and then calling the deprecated method UserManager#isCredentialSharableWithParent(), use UserManagerInternal#getUserProperties(userId).isCredentialShareableWithParent(). UserManagerInternal is the preferred way to get user properties in system_server itself, since it avoids unnecessary checks and an unnecessary copy of the UserProperties object. Also add the missing "e" to LockSettingsService#isCredentialSharableWithParent(). Bug: 403355811 Test: atest FrameworksServicesTests:com.android.server.locksettings Flag: EXEMPT refactor Change-Id: I43d11c3cd87f798a3d782146994e17041e55b268
Loading
Please register or sign in to comment