Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d20bf93 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Fix array out of bounds in BiometricEnrollActivity

Bug: 189876828
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL
Change-Id: I89f8ea1353cd9243c20c6184d579707da27e7b6f
parent 9e1e5ddb
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -266,9 +266,11 @@ public class BiometricEnrollActivity extends InstrumentedActivity {
                faceManager.getSensorPropertiesInternal();

        // This would need to be updated for devices with multiple sensors of the same modality
        mIsFaceEnrollable = faceManager.getEnrolledFaces(mUserId).size()
        mIsFaceEnrollable = !faceProperties.isEmpty() &&
                faceManager.getEnrolledFaces(mUserId).size()
                        < faceProperties.get(0).maxEnrollmentsPerUser;
        mIsFingerprintEnrollable = fingerprintManager.getEnrolledFingerprints(mUserId).size()
        mIsFingerprintEnrollable = !fpProperties.isEmpty() &&
                fingerprintManager.getEnrolledFingerprints(mUserId).size()
                        < fpProperties.get(0).maxEnrollmentsPerUser;

        if (!mConfirmingCredentials) {