Remove GenerateChallengeBlocking from FingerprintManager
Test: Builds Bug: 162533680 Change-Id: I28c01bf977d32a5decd941c0449081577069d174
This commit is contained in:
@@ -580,37 +580,6 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Same as {@link #generateChallenge(GenerateChallengeCallback)}, except blocks until the
|
||||
* TEE/hardware operation is complete.
|
||||
* @return challenge generated in the TEE/hardware
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(MANAGE_FINGERPRINT)
|
||||
public long generateChallengeBlocking() {
|
||||
final AtomicReference<Long> result = new AtomicReference<>();
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
final GenerateChallengeCallback callback = new InternalGenerateChallengeCallback() {
|
||||
@Override
|
||||
public void onChallengeGenerated(long challenge) {
|
||||
result.set(challenge);
|
||||
latch.countDown();
|
||||
}
|
||||
};
|
||||
|
||||
generateChallenge(callback);
|
||||
|
||||
try {
|
||||
latch.await(1, TimeUnit.SECONDS);
|
||||
} catch (InterruptedException e) {
|
||||
Slog.e(TAG, "Interrupted while generatingChallenge", e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return result.get();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates a unique random challenge in the TEE. A typical use case is to have it wrapped in a
|
||||
* HardwareAuthenticationToken, minted by Gatekeeper upon PIN/Pattern/Password verification.
|
||||
|
||||
Reference in New Issue
Block a user