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

Commit bc596251 authored by Chandru S's avatar Chandru S Committed by Android (Google) Code Review
Browse files

Merge "Clear the previous biometric message only after the next face...

Merge "Clear the previous biometric message only after the next face acquisition starts again." into main
parents b2b4ac9d d3e7b649
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.adaptiveauth.Flags.enableAdaptiveAuth;
import static android.app.admin.DevicePolicyManager.DEVICE_OWNER_TYPE_FINANCED;
import static android.app.admin.DevicePolicyResources.Strings.SystemUi.KEYGUARD_MANAGEMENT_DISCLOSURE;
import static android.app.admin.DevicePolicyResources.Strings.SystemUi.KEYGUARD_NAMED_MANAGEMENT_DISCLOSURE;
import static android.hardware.biometrics.BiometricFaceConstants.FACE_ACQUIRED_START;
import static android.hardware.biometrics.BiometricFaceConstants.FACE_ACQUIRED_TOO_DARK;
import static android.hardware.biometrics.BiometricFaceConstants.FACE_ERROR_TIMEOUT;
import static android.hardware.biometrics.BiometricSourceType.FACE;
@@ -1296,6 +1297,12 @@ public class KeyguardIndicationController {
        @Override
        public void onBiometricAcquired(BiometricSourceType biometricSourceType, int acquireInfo) {
            if (biometricSourceType == FACE) {
                if (acquireInfo == FACE_ACQUIRED_START) {
                    // Let's hide any previous messages when authentication starts, otherwise
                    // multiple auth attempts would overlap.
                    hideBiometricMessage();
                    mBiometricErrorMessageToShowOnScreenOn = null;
                }
                mFaceAcquiredMessageDeferral.processFrame(acquireInfo);
            }
        }
@@ -1485,13 +1492,6 @@ public class KeyguardIndicationController {
        @Override
        public void onBiometricRunningStateChanged(boolean running,
                BiometricSourceType biometricSourceType) {
            if (running && biometricSourceType == FACE) {
                // Let's hide any previous messages when authentication starts, otherwise
                // multiple auth attempts would overlap.
                hideBiometricMessage();
                mBiometricErrorMessageToShowOnScreenOn = null;
            }

            if (!running && biometricSourceType == FACE) {
                showTrustAgentErrorMessage(mTrustAgentErrorMessage);
            }