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

Commit c2251539 authored by Joseph Vincent's avatar Joseph Vincent Committed by Android (Google) Code Review
Browse files

Merge "Add biometric enrollment support for private profile" into main

parents 082537ac 149a06cf
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@ public class ChooseLockGeneric extends SettingsActivity {
        private boolean mOnlyEnforceDevicePasswordRequirement = false;
        private int mExtraLockScreenTitleResId;
        private int mExtraLockScreenDescriptionResId;
        private boolean mWaitingForBiometricEnrollment = false;

        @Override
        public int getMetricsCategory() {
@@ -250,6 +251,7 @@ public class ChooseLockGeneric extends SettingsActivity {
                    ChooseLockSettingsHelper.EXTRA_KEY_FOR_FACE, false);
            mForBiometrics = intent.getBooleanExtra(
                    ChooseLockSettingsHelper.EXTRA_KEY_FOR_BIOMETRICS, false);
            mWaitingForBiometricEnrollment = mForBiometrics || mForFingerprint || mForFace;

            mExtraLockScreenTitleResId = intent.getIntExtra(EXTRA_KEY_CHOOSE_LOCK_SCREEN_TITLE, -1);
            mExtraLockScreenDescriptionResId =
@@ -440,6 +442,7 @@ public class ChooseLockGeneric extends SettingsActivity {
                return true;
            } else if (KEY_SKIP_FINGERPRINT.equals(key) || KEY_SKIP_FACE.equals(key)
                    || KEY_SKIP_BIOMETRICS.equals(key)) {
                mWaitingForBiometricEnrollment = false;
                Intent chooseLockGenericIntent = new Intent(getActivity(),
                    getInternalActivityClass());
                chooseLockGenericIntent.setAction(getIntent().getAction());
@@ -493,6 +496,7 @@ public class ChooseLockGeneric extends SettingsActivity {
                finish();
            } else if (requestCode == CHOOSE_LOCK_BEFORE_BIOMETRIC_REQUEST
                    && resultCode == BiometricEnrollBase.RESULT_FINISHED) {
                mWaitingForBiometricEnrollment = false;
                Intent intent = getBiometricEnrollIntent(getActivity());
                if (data != null) {
                    // ChooseLockGeneric should have requested for a Gatekeeper Password Handle to
@@ -873,7 +877,8 @@ public class ChooseLockGeneric extends SettingsActivity {
            // Otherwise, bugs would be caused. (e.g. b/278488549, b/278530059)
            final boolean hasCredential = mLockPatternUtils.isSecure(mUserId);
            if (!getActivity().isChangingConfigurations()
                    && !mWaitingForConfirmation && !mWaitingForActivityResult && hasCredential) {
                    && !mWaitingForConfirmation && !mWaitingForActivityResult && hasCredential
                    && !mWaitingForBiometricEnrollment) {
                getActivity().finish();
            }
        }