LockSettingsService: remove redundant calls to verifyChallenge()

Both unlockLskfBasedProtector() and unlockTokenBasedProtector() do a
Gatekeeper verification immediately after decrypting the SP.  Therefore,
it's redundant for doVerifyCredential() to do it again.

Similarly, the same thing is redundant in
setLockCredentialWithSpLocked() too, since either
unlockLskfBasedProtector() or unlockTokenBasedProtector() was just
called to get the SP in the first place.

Remove these redundant calls to verifyChallenge() to simplify the code
and improve performance.

Bug: 269394345
Test: atest AuthBoundKeyTest
Test: atest com.android.server.locksettings
Change-Id: Ib73b4a082793458cedb7d06d3f81b77abb427426
Merged-In: Ib73b4a082793458cedb7d06d3f81b77abb427426
(cherry picked from commit e9d7d483cfc66420f11ac33c5f2492e2721d4e4a)
1 file changed