Merge "LSS: clear calling identity after permission check in checkCredential()"

This commit is contained in:
TreeHugger Robot
2022-11-17 04:06:35 +00:00
committed by Android (Google) Code Review

View File

@@ -2081,9 +2081,11 @@ public class LockSettingsService extends ILockSettings.Stub {
public VerifyCredentialResponse checkCredential(LockscreenCredential credential, int userId,
ICheckCredentialProgressCallback progressCallback) {
checkPasswordReadPermission();
final long identity = Binder.clearCallingIdentity();
try {
return doVerifyCredential(credential, userId, progressCallback, 0 /* flags */);
} finally {
Binder.restoreCallingIdentity(identity);
scheduleGc();
}
}