Revert "Finish FaceAuthClient onLockout"

This reverts commit 9f26c90ffb.

Reason for revert: Going to push into d1-dev for more soak time

Change-Id: I9151084a896d0cbd7a714104d6ebab60609dba6b
This commit is contained in:
Joshua Mccloskey
2023-06-02 00:24:16 +00:00
parent 1d60da6653
commit bebffbf3fb
3 changed files with 11 additions and 27 deletions

View File

@@ -212,8 +212,6 @@ class FaceAuthenticationClient extends AuthenticationClient<AidlSession, FaceAut
// 1) Authenticated == true
// 2) Error occurred
// 3) Authenticated == false
// 4) onLockout
// 5) onLockoutTimed
mCallback.onClientFinished(this, true /* success */);
}
@@ -306,7 +304,11 @@ class FaceAuthenticationClient extends AuthenticationClient<AidlSession, FaceAut
PerformanceTracker.getInstanceForSensorId(getSensorId())
.incrementTimedLockoutForUser(getTargetUserId());
onError(error, 0 /* vendorCode */);
try {
getListener().onError(getSensorId(), getCookie(), error, 0 /* vendorCode */);
} catch (RemoteException e) {
Slog.e(TAG, "Remote exception", e);
}
}
@Override
@@ -321,6 +323,10 @@ class FaceAuthenticationClient extends AuthenticationClient<AidlSession, FaceAut
PerformanceTracker.getInstanceForSensorId(getSensorId())
.incrementPermanentLockoutForUser(getTargetUserId());
onError(error, 0 /* vendorCode */);
try {
getListener().onError(getSensorId(), getCookie(), error, 0 /* vendorCode */);
} catch (RemoteException e) {
Slog.e(TAG, "Remote exception", e);
}
}
}

View File

@@ -475,7 +475,7 @@ public class FaceProvider implements IBinder.DeathRecipient, ServiceProvider {
BaseClientMonitor clientMonitor,
boolean success) {
mAuthSessionCoordinator.authEndedFor(userId, Utils.getCurrentStrength(sensorId),
sensorId, requestId, client.wasAuthSuccessful());
sensorId, requestId, success);
}
});
});

View File

@@ -151,28 +151,6 @@ public class FaceAuthenticationClientTest {
verify(mHal, never()).authenticate(anyLong());
}
@Test
public void testLockoutEndsOperation() throws RemoteException {
final FaceAuthenticationClient client = createClient(2);
client.start(mCallback);
client.onLockoutPermanent();
verify(mClientMonitorCallbackConverter).onError(anyInt(), anyInt(),
eq(FACE_ERROR_LOCKOUT_PERMANENT), anyInt());
verify(mCallback).onClientFinished(client, false);
}
@Test
public void testTemporaryLockoutEndsOperation() throws RemoteException {
final FaceAuthenticationClient client = createClient(2);
client.start(mCallback);
client.onLockoutTimed(1000);
verify(mClientMonitorCallbackConverter).onError(anyInt(), anyInt(),
eq(FACE_ERROR_LOCKOUT), anyInt());
verify(mCallback).onClientFinished(client, false);
}
@Test
public void notifyHalWhenContextChanges() throws RemoteException {
final FaceAuthenticationClient client = createClient();