Merge changes from topics "fp-revokeChallenge", "new-revokeChallenge" into sc-dev
* changes: Consolidate FingerprintManager revokeChallenge Consolidate revokeChallenge methods
This commit is contained in:
@@ -475,28 +475,11 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(MANAGE_BIOMETRIC)
|
||||
public void revokeChallenge() {
|
||||
final List<FaceSensorPropertiesInternal> faceSensorProperties =
|
||||
getSensorPropertiesInternal();
|
||||
if (faceSensorProperties.isEmpty()) {
|
||||
Slog.e(TAG, "No sensors during revokeChallenge");
|
||||
}
|
||||
revokeChallenge(faceSensorProperties.get(0).sensorId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invalidates the current challenge.
|
||||
*
|
||||
* TODO(b/171335732): should take userId and challenge
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(MANAGE_BIOMETRIC)
|
||||
public void revokeChallenge(int sensorId) {
|
||||
public void revokeChallenge(int sensorId, int userId, long challenge) {
|
||||
if (mService != null) {
|
||||
try {
|
||||
mService.revokeChallenge(mToken, sensorId, 0 /* userId */,
|
||||
mContext.getOpPackageName(), 0 /* challenge */);
|
||||
mService.revokeChallenge(mToken, sensorId, userId,
|
||||
mContext.getOpPackageName(), challenge);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
|
||||
@@ -685,17 +685,6 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing
|
||||
generateChallenge(sensorProps.sensorId, userId, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Revokes the current challenge.
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(MANAGE_FINGERPRINT)
|
||||
public void revokeChallenge(int userId) {
|
||||
// On HALs with only single in-flight challenge such as IBiometricsFingerprint@2.1,
|
||||
// this parameter is ignored.
|
||||
revokeChallenge(userId, 0L);
|
||||
}
|
||||
|
||||
/**
|
||||
* Revokes the specified challenge.
|
||||
* @hide
|
||||
|
||||
@@ -135,7 +135,11 @@ public class BiometricDeferredQueue {
|
||||
}
|
||||
|
||||
sensorIds.remove(sensorId);
|
||||
faceManager.revokeChallenge(sensorId);
|
||||
// Challenge is only required for IBiometricsFace@1.0 (and not IFace AIDL). The
|
||||
// IBiometricsFace@1.0 HAL does not require userId to revokeChallenge, so passing
|
||||
// in 0 is OK.
|
||||
final int userId = 0;
|
||||
faceManager.revokeChallenge(sensorId, userId, challenge);
|
||||
|
||||
if (sensorIds.isEmpty()) {
|
||||
Slog.d(TAG, "Done requesting resetLockout for all face sensors");
|
||||
|
||||
Reference in New Issue
Block a user