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

Commit df4c7c46 authored by Beverly Tai's avatar Beverly Tai Committed by Automerger Merge Worker
Browse files

Merge "Update face lockout co-ex message" into sc-v2-dev am: bb723071 am: 4ed276e6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16016322

Change-Id: I2359117ad1878570bd08088e929fc5873890e571
parents a7e4b2a3 4ed276e6
Loading
Loading
Loading
Loading
+9 −6
Original line number Original line Diff line number Diff line
@@ -819,12 +819,15 @@ public class KeyguardIndicationController {
        }
        }
    }
    }


    private void showTryFingerprintMsg(String a11yString) {
    private void showTryFingerprintMsg(int msgId, String a11yString) {
        if (mKeyguardUpdateMonitor.isUdfpsAvailable()) {
        if (mKeyguardUpdateMonitor.isUdfpsAvailable()) {
            // if udfps available, there will always be a tappable affordance to unlock
            // if udfps available, there will always be a tappable affordance to unlock
            // For example, the lock icon
            // For example, the lock icon
            if (mKeyguardBypassController.getUserHasDeviceEntryIntent()) {
            if (mKeyguardBypassController.getUserHasDeviceEntryIntent()) {
                showTransientIndication(R.string.keyguard_unlock_press);
                showTransientIndication(R.string.keyguard_unlock_press);
            } else if (msgId == FaceManager.FACE_ERROR_LOCKOUT_PERMANENT) {
                // since face is locked out, simply show "try fingerprint"
                showTransientIndication(R.string.keyguard_try_fingerprint);
            } else {
            } else {
                showTransientIndication(R.string.keyguard_face_failed_use_fp);
                showTransientIndication(R.string.keyguard_face_failed_use_fp);
            }
            }
@@ -916,7 +919,7 @@ public class KeyguardIndicationController {
            } else if (mKeyguardUpdateMonitor.isScreenOn()) {
            } else if (mKeyguardUpdateMonitor.isScreenOn()) {
                if (biometricSourceType == BiometricSourceType.FACE
                if (biometricSourceType == BiometricSourceType.FACE
                        && shouldSuppressFaceMsgAndShowTryFingerprintMsg()) {
                        && shouldSuppressFaceMsgAndShowTryFingerprintMsg()) {
                    showTryFingerprintMsg(helpString);
                    showTryFingerprintMsg(msgId, helpString);
                    return;
                    return;
                }
                }
                showTransientIndication(helpString, false /* isError */, showActionToUnlock);
                showTransientIndication(helpString, false /* isError */, showActionToUnlock);
@@ -936,7 +939,7 @@ public class KeyguardIndicationController {
                    && shouldSuppressFaceMsgAndShowTryFingerprintMsg()
                    && shouldSuppressFaceMsgAndShowTryFingerprintMsg()
                    && !mStatusBarKeyguardViewManager.isBouncerShowing()
                    && !mStatusBarKeyguardViewManager.isBouncerShowing()
                    && mKeyguardUpdateMonitor.isScreenOn()) {
                    && mKeyguardUpdateMonitor.isScreenOn()) {
                showTryFingerprintMsg(errString);
                showTryFingerprintMsg(msgId, errString);
                return;
                return;
            }
            }
            if (msgId == FaceManager.FACE_ERROR_TIMEOUT) {
            if (msgId == FaceManager.FACE_ERROR_TIMEOUT) {
@@ -945,7 +948,7 @@ public class KeyguardIndicationController {
                if (!mStatusBarKeyguardViewManager.isBouncerShowing()
                if (!mStatusBarKeyguardViewManager.isBouncerShowing()
                        && mKeyguardUpdateMonitor.isUdfpsEnrolled()
                        && mKeyguardUpdateMonitor.isUdfpsEnrolled()
                        && mKeyguardUpdateMonitor.isFingerprintDetectionRunning()) {
                        && mKeyguardUpdateMonitor.isFingerprintDetectionRunning()) {
                    showTryFingerprintMsg(errString);
                    showTryFingerprintMsg(msgId, errString);
                } else if (mStatusBarKeyguardViewManager.isShowingAlternateAuth()) {
                } else if (mStatusBarKeyguardViewManager.isShowingAlternateAuth()) {
                    mStatusBarKeyguardViewManager.showBouncerMessage(
                    mStatusBarKeyguardViewManager.showBouncerMessage(
                            mContext.getResources().getString(R.string.keyguard_unlock_press),
                            mContext.getResources().getString(R.string.keyguard_unlock_press),