Make setLockCredential() use doVerifyCredential()
Make setLockCredential() call the internal method doVerifyCredential() instead of the public method verifyCredential(). This follows the best practice for service implementations by not re-entering the Binder interface as part of the implementation of a different method in the interface. Specifically, it avoids a redundant permission check that is needed only for incoming Binder calls. (setLockCredential() already does its own permission check and clears the calling identity.) It also avoids a scheduleGc(), which again is done by setLockCredential(). No functional change other than removing redundant work. Test: atest FrameworksServicesTests:com.android.server.locksettings Bug: 320392352 Bug: 416768837 Flag: EXEMPT refactor Change-Id: Iced66ee21db3c130f5606eb28d1f1b1d8385b836
Loading
Please register or sign in to comment