Loading core/java/android/hardware/face/FaceSensorProperties.java +8 −1 Original line number Diff line number Diff line Loading @@ -40,21 +40,27 @@ public class FaceSensorProperties implements Parcelable { * from above the HAL. */ public final boolean supportsSelfIllumination; /** * Maximum number of enrollments a user/profile can have. */ public final int maxTemplatesAllowed; /** * Initializes SensorProperties with specified values */ public FaceSensorProperties(int sensorId, boolean supportsFaceDetection, boolean supportsSelfIllumination) { boolean supportsSelfIllumination, int maxTemplatesAllowed) { this.sensorId = sensorId; this.supportsFaceDetection = supportsFaceDetection; this.supportsSelfIllumination = supportsSelfIllumination; this.maxTemplatesAllowed = maxTemplatesAllowed; } protected FaceSensorProperties(Parcel in) { sensorId = in.readInt(); supportsFaceDetection = in.readBoolean(); supportsSelfIllumination = in.readBoolean(); maxTemplatesAllowed = in.readInt(); } public static final Creator<FaceSensorProperties> CREATOR = Loading @@ -80,5 +86,6 @@ public class FaceSensorProperties implements Parcelable { dest.writeInt(sensorId); dest.writeBoolean(supportsFaceDetection); dest.writeBoolean(supportsSelfIllumination); dest.writeInt(maxTemplatesAllowed); } } core/java/android/hardware/fingerprint/FingerprintSensorProperties.java +6 −1 Original line number Diff line number Diff line Loading @@ -48,21 +48,25 @@ public class FingerprintSensorProperties implements Parcelable { // IBiometricsFingerprint@2.1 does not manage timeout below the HAL, so the Gatekeeper HAT // cannot be checked public final boolean resetLockoutRequiresHardwareAuthToken; // Maximum number of enrollments a user/profile can have. public final int maxTemplatesAllowed; /** * Initializes SensorProperties with specified values */ public FingerprintSensorProperties(int sensorId, @SensorType int sensorType, boolean resetLockoutRequiresHardwareAuthToken) { boolean resetLockoutRequiresHardwareAuthToken, int maxTemplatesAllowed) { this.sensorId = sensorId; this.sensorType = sensorType; this.resetLockoutRequiresHardwareAuthToken = resetLockoutRequiresHardwareAuthToken; this.maxTemplatesAllowed = maxTemplatesAllowed; } protected FingerprintSensorProperties(Parcel in) { sensorId = in.readInt(); sensorType = in.readInt(); resetLockoutRequiresHardwareAuthToken = in.readBoolean(); maxTemplatesAllowed = in.readInt(); } public static final Creator<FingerprintSensorProperties> CREATOR = Loading @@ -88,5 +92,6 @@ public class FingerprintSensorProperties implements Parcelable { dest.writeInt(sensorId); dest.writeInt(sensorType); dest.writeBoolean(resetLockoutRequiresHardwareAuthToken); dest.writeInt(maxTemplatesAllowed); } } packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -182,7 +182,8 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // IBiometricsFace@1.0 does not support detection, only authentication. when(mFaceSensorProperties.isEmpty()).thenReturn(false); when(mFaceSensorProperties.get(anyInt())).thenReturn(new FaceSensorProperties(0 /* id */, false /* supportsFaceDetection */, true /* supportsSelfIllumination */)); false /* supportsFaceDetection */, true /* supportsSelfIllumination */, 1 /* maxTemplatesAllowed */)); when(mFingerprintManager.isHardwareDetected()).thenReturn(true); when(mFingerprintManager.hasEnrolledTemplates(anyInt())).thenReturn(true); Loading services/core/java/com/android/server/biometrics/sensors/face/Face10.java +3 −1 Original line number Diff line number Diff line Loading @@ -282,8 +282,10 @@ class Face10 implements IHwBinder.DeathRecipient { @NonNull LockoutResetDispatcher lockoutResetDispatcher) { final boolean supportsSelfIllumination = context.getResources() .getBoolean(R.bool.config_faceAuthSupportsSelfIllumination); final int maxTemplatesAllowed = context.getResources() .getInteger(R.integer.config_faceMaxTemplatesPerUser); mFaceSensorProperties = new FaceSensorProperties(sensorId, false /* supportsFaceDetect */, supportsSelfIllumination); supportsSelfIllumination, maxTemplatesAllowed); mContext = context; mSensorId = sensorId; mScheduler = new BiometricScheduler(TAG, null /* gestureAvailabilityTracker */); Loading services/core/java/com/android/server/biometrics/sensors/fingerprint/Fingerprint21.java +4 −1 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.util.Slog; import android.util.proto.ProtoOutputStream; import android.view.Surface; import com.android.internal.R; import com.android.internal.util.FrameworkStatsLog; import com.android.server.biometrics.Utils; import com.android.server.biometrics.fingerprint.FingerprintServiceDumpProto; Loading Loading @@ -338,8 +339,10 @@ class Fingerprint21 implements IHwBinder.DeathRecipient { : FingerprintSensorProperties.TYPE_REAR; // resetLockout is controlled by the framework, so hardwareAuthToken is not required final boolean resetLockoutRequiresHardwareAuthToken = false; final int maxTemplatesAllowed = mContext.getResources() .getInteger(R.integer.config_fingerprintMaxTemplatesPerUser); mSensorProperties = new FingerprintSensorProperties(sensorId, sensorType, resetLockoutRequiresHardwareAuthToken); resetLockoutRequiresHardwareAuthToken, maxTemplatesAllowed); } static Fingerprint21 newInstance(@NonNull Context context, int sensorId, Loading Loading
core/java/android/hardware/face/FaceSensorProperties.java +8 −1 Original line number Diff line number Diff line Loading @@ -40,21 +40,27 @@ public class FaceSensorProperties implements Parcelable { * from above the HAL. */ public final boolean supportsSelfIllumination; /** * Maximum number of enrollments a user/profile can have. */ public final int maxTemplatesAllowed; /** * Initializes SensorProperties with specified values */ public FaceSensorProperties(int sensorId, boolean supportsFaceDetection, boolean supportsSelfIllumination) { boolean supportsSelfIllumination, int maxTemplatesAllowed) { this.sensorId = sensorId; this.supportsFaceDetection = supportsFaceDetection; this.supportsSelfIllumination = supportsSelfIllumination; this.maxTemplatesAllowed = maxTemplatesAllowed; } protected FaceSensorProperties(Parcel in) { sensorId = in.readInt(); supportsFaceDetection = in.readBoolean(); supportsSelfIllumination = in.readBoolean(); maxTemplatesAllowed = in.readInt(); } public static final Creator<FaceSensorProperties> CREATOR = Loading @@ -80,5 +86,6 @@ public class FaceSensorProperties implements Parcelable { dest.writeInt(sensorId); dest.writeBoolean(supportsFaceDetection); dest.writeBoolean(supportsSelfIllumination); dest.writeInt(maxTemplatesAllowed); } }
core/java/android/hardware/fingerprint/FingerprintSensorProperties.java +6 −1 Original line number Diff line number Diff line Loading @@ -48,21 +48,25 @@ public class FingerprintSensorProperties implements Parcelable { // IBiometricsFingerprint@2.1 does not manage timeout below the HAL, so the Gatekeeper HAT // cannot be checked public final boolean resetLockoutRequiresHardwareAuthToken; // Maximum number of enrollments a user/profile can have. public final int maxTemplatesAllowed; /** * Initializes SensorProperties with specified values */ public FingerprintSensorProperties(int sensorId, @SensorType int sensorType, boolean resetLockoutRequiresHardwareAuthToken) { boolean resetLockoutRequiresHardwareAuthToken, int maxTemplatesAllowed) { this.sensorId = sensorId; this.sensorType = sensorType; this.resetLockoutRequiresHardwareAuthToken = resetLockoutRequiresHardwareAuthToken; this.maxTemplatesAllowed = maxTemplatesAllowed; } protected FingerprintSensorProperties(Parcel in) { sensorId = in.readInt(); sensorType = in.readInt(); resetLockoutRequiresHardwareAuthToken = in.readBoolean(); maxTemplatesAllowed = in.readInt(); } public static final Creator<FingerprintSensorProperties> CREATOR = Loading @@ -88,5 +92,6 @@ public class FingerprintSensorProperties implements Parcelable { dest.writeInt(sensorId); dest.writeInt(sensorType); dest.writeBoolean(resetLockoutRequiresHardwareAuthToken); dest.writeInt(maxTemplatesAllowed); } }
packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +2 −1 Original line number Diff line number Diff line Loading @@ -182,7 +182,8 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { // IBiometricsFace@1.0 does not support detection, only authentication. when(mFaceSensorProperties.isEmpty()).thenReturn(false); when(mFaceSensorProperties.get(anyInt())).thenReturn(new FaceSensorProperties(0 /* id */, false /* supportsFaceDetection */, true /* supportsSelfIllumination */)); false /* supportsFaceDetection */, true /* supportsSelfIllumination */, 1 /* maxTemplatesAllowed */)); when(mFingerprintManager.isHardwareDetected()).thenReturn(true); when(mFingerprintManager.hasEnrolledTemplates(anyInt())).thenReturn(true); Loading
services/core/java/com/android/server/biometrics/sensors/face/Face10.java +3 −1 Original line number Diff line number Diff line Loading @@ -282,8 +282,10 @@ class Face10 implements IHwBinder.DeathRecipient { @NonNull LockoutResetDispatcher lockoutResetDispatcher) { final boolean supportsSelfIllumination = context.getResources() .getBoolean(R.bool.config_faceAuthSupportsSelfIllumination); final int maxTemplatesAllowed = context.getResources() .getInteger(R.integer.config_faceMaxTemplatesPerUser); mFaceSensorProperties = new FaceSensorProperties(sensorId, false /* supportsFaceDetect */, supportsSelfIllumination); supportsSelfIllumination, maxTemplatesAllowed); mContext = context; mSensorId = sensorId; mScheduler = new BiometricScheduler(TAG, null /* gestureAvailabilityTracker */); Loading
services/core/java/com/android/server/biometrics/sensors/fingerprint/Fingerprint21.java +4 −1 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.util.Slog; import android.util.proto.ProtoOutputStream; import android.view.Surface; import com.android.internal.R; import com.android.internal.util.FrameworkStatsLog; import com.android.server.biometrics.Utils; import com.android.server.biometrics.fingerprint.FingerprintServiceDumpProto; Loading Loading @@ -338,8 +339,10 @@ class Fingerprint21 implements IHwBinder.DeathRecipient { : FingerprintSensorProperties.TYPE_REAR; // resetLockout is controlled by the framework, so hardwareAuthToken is not required final boolean resetLockoutRequiresHardwareAuthToken = false; final int maxTemplatesAllowed = mContext.getResources() .getInteger(R.integer.config_fingerprintMaxTemplatesPerUser); mSensorProperties = new FingerprintSensorProperties(sensorId, sensorType, resetLockoutRequiresHardwareAuthToken); resetLockoutRequiresHardwareAuthToken, maxTemplatesAllowed); } static Fingerprint21 newInstance(@NonNull Context context, int sensorId, Loading