Loading services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -205,7 +205,7 @@ public class FaceProvider implements IBinder.DeathRecipient, ServiceProvider { private void createNewSessionWithoutHandler(@NonNull IFace daemon, int sensorId, int userId) throws RemoteException { // Note that per IFingerprint createSession contract, this method will block until all // Note that per IFace createSession contract, this method will block until all // existing operations are canceled/finished. However, also note that this is fine, since // this method "withoutHandler" means it should only ever be invoked from the worker thread, // so callers will never be blocked. Loading services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java +6 −13 Original line number Diff line number Diff line Loading @@ -71,7 +71,6 @@ import com.android.server.biometrics.sensors.face.FaceUtils; import com.android.server.biometrics.sensors.face.LockoutHalImpl; import com.android.server.biometrics.sensors.face.ServiceProvider; import com.android.server.biometrics.sensors.face.UsageStats; import com.android.server.biometrics.sensors.fingerprint.FingerprintUtils; import org.json.JSONArray; import org.json.JSONException; Loading Loading @@ -259,8 +258,7 @@ public class Face10 implements IHwBinder.DeathRecipient, ServiceProvider { if (!removed.isEmpty()) { // Convert to old fingerprint-like behavior, where remove() receives // one removal // at a time. This way, remove can share some more common code. // one removal at a time. This way, remove can share some more common code. for (int i = 0; i < removed.size(); i++) { final int id = removed.get(i); final Face face = new Face("", id, deviceId); Loading Loading @@ -290,21 +288,16 @@ public class Face10 implements IHwBinder.DeathRecipient, ServiceProvider { final EnumerateConsumer enumerateConsumer = (EnumerateConsumer) client; if (!faceIds.isEmpty()) { // Convert to old fingerprint-like behavior, where enumerate() // receives one // template at a time. This way, enumerate can share some more common // code. // Convert to old fingerprint-like behavior, where enumerate() receives one // template at a time. This way, enumerate can share some more common code. for (int i = 0; i < faceIds.size(); i++) { final Face face = new Face("", faceIds.get(i), deviceId); enumerateConsumer.onEnumerationResult(face, faceIds.size() - i - 1); } } else { // For face, the HIDL contract is to receive an empty list when there // are no // templates enrolled. Send a null identifier since we don't consume // them // anywhere, and send remaining == 0 so this code can be shared with // Fingerprint@2.1 // For face, the HIDL contract is to receive an empty list when there are no // templates enrolled. Send a null identifier since we don't consume them // anywhere, and send remaining == 0 so this code can be shared with Face@1.1 enumerateConsumer.onEnumerationResult(null /* identifier */, 0); } }); Loading services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintEnrollClient.java +2 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.server.biometrics.sensors.fingerprint.aidl; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; import android.hardware.biometrics.BiometricFaceConstants; import android.hardware.biometrics.BiometricFingerprintConstants; import android.hardware.biometrics.BiometricsProtoEnums; import android.hardware.biometrics.common.ICancellationSignal; Loading Loading @@ -89,7 +88,8 @@ class FingerprintEnrollClient extends EnrollClient<ISession> implements Udfps { HardwareAuthTokenUtils.toHardwareAuthToken(mHardwareAuthToken)); } catch (RemoteException e) { Slog.e(TAG, "Remote exception when requesting enroll", e); onError(BiometricFaceConstants.FACE_ERROR_UNABLE_TO_PROCESS, 0 /* vendorCode */); onError(BiometricFingerprintConstants.FINGERPRINT_ERROR_UNABLE_TO_PROCESS, 0 /* vendorCode */); mCallback.onClientFinished(this, false /* success */); } } Loading services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/FingerprintEnrollClient.java +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ public class FingerprintEnrollClient extends EnrollClient<IBiometricsFingerprint final int enrolled = mBiometricUtils.getBiometricsForUser(getContext(), getTargetUserId()) .size(); if (enrolled >= limit) { Slog.w(TAG, "Too many faces registered, user: " + getTargetUserId()); Slog.w(TAG, "Too many fingerprints registered, user: " + getTargetUserId()); return true; } return false; Loading Loading
services/core/java/com/android/server/biometrics/sensors/face/aidl/FaceProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -205,7 +205,7 @@ public class FaceProvider implements IBinder.DeathRecipient, ServiceProvider { private void createNewSessionWithoutHandler(@NonNull IFace daemon, int sensorId, int userId) throws RemoteException { // Note that per IFingerprint createSession contract, this method will block until all // Note that per IFace createSession contract, this method will block until all // existing operations are canceled/finished. However, also note that this is fine, since // this method "withoutHandler" means it should only ever be invoked from the worker thread, // so callers will never be blocked. Loading
services/core/java/com/android/server/biometrics/sensors/face/hidl/Face10.java +6 −13 Original line number Diff line number Diff line Loading @@ -71,7 +71,6 @@ import com.android.server.biometrics.sensors.face.FaceUtils; import com.android.server.biometrics.sensors.face.LockoutHalImpl; import com.android.server.biometrics.sensors.face.ServiceProvider; import com.android.server.biometrics.sensors.face.UsageStats; import com.android.server.biometrics.sensors.fingerprint.FingerprintUtils; import org.json.JSONArray; import org.json.JSONException; Loading Loading @@ -259,8 +258,7 @@ public class Face10 implements IHwBinder.DeathRecipient, ServiceProvider { if (!removed.isEmpty()) { // Convert to old fingerprint-like behavior, where remove() receives // one removal // at a time. This way, remove can share some more common code. // one removal at a time. This way, remove can share some more common code. for (int i = 0; i < removed.size(); i++) { final int id = removed.get(i); final Face face = new Face("", id, deviceId); Loading Loading @@ -290,21 +288,16 @@ public class Face10 implements IHwBinder.DeathRecipient, ServiceProvider { final EnumerateConsumer enumerateConsumer = (EnumerateConsumer) client; if (!faceIds.isEmpty()) { // Convert to old fingerprint-like behavior, where enumerate() // receives one // template at a time. This way, enumerate can share some more common // code. // Convert to old fingerprint-like behavior, where enumerate() receives one // template at a time. This way, enumerate can share some more common code. for (int i = 0; i < faceIds.size(); i++) { final Face face = new Face("", faceIds.get(i), deviceId); enumerateConsumer.onEnumerationResult(face, faceIds.size() - i - 1); } } else { // For face, the HIDL contract is to receive an empty list when there // are no // templates enrolled. Send a null identifier since we don't consume // them // anywhere, and send remaining == 0 so this code can be shared with // Fingerprint@2.1 // For face, the HIDL contract is to receive an empty list when there are no // templates enrolled. Send a null identifier since we don't consume them // anywhere, and send remaining == 0 so this code can be shared with Face@1.1 enumerateConsumer.onEnumerationResult(null /* identifier */, 0); } }); Loading
services/core/java/com/android/server/biometrics/sensors/fingerprint/aidl/FingerprintEnrollClient.java +2 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.server.biometrics.sensors.fingerprint.aidl; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; import android.hardware.biometrics.BiometricFaceConstants; import android.hardware.biometrics.BiometricFingerprintConstants; import android.hardware.biometrics.BiometricsProtoEnums; import android.hardware.biometrics.common.ICancellationSignal; Loading Loading @@ -89,7 +88,8 @@ class FingerprintEnrollClient extends EnrollClient<ISession> implements Udfps { HardwareAuthTokenUtils.toHardwareAuthToken(mHardwareAuthToken)); } catch (RemoteException e) { Slog.e(TAG, "Remote exception when requesting enroll", e); onError(BiometricFaceConstants.FACE_ERROR_UNABLE_TO_PROCESS, 0 /* vendorCode */); onError(BiometricFingerprintConstants.FINGERPRINT_ERROR_UNABLE_TO_PROCESS, 0 /* vendorCode */); mCallback.onClientFinished(this, false /* success */); } } Loading
services/core/java/com/android/server/biometrics/sensors/fingerprint/hidl/FingerprintEnrollClient.java +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ public class FingerprintEnrollClient extends EnrollClient<IBiometricsFingerprint final int enrolled = mBiometricUtils.getBiometricsForUser(getContext(), getTargetUserId()) .size(); if (enrolled >= limit) { Slog.w(TAG, "Too many faces registered, user: " + getTargetUserId()); Slog.w(TAG, "Too many fingerprints registered, user: " + getTargetUserId()); return true; } return false; Loading