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

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

Merge "Always show face auth error messages on bouncer" into sc-dev am: 34d05933 am: 05575d7f

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

Change-Id: If4cd83f70ac60db70066b635df8cfeaef00a1fef
parents 28580a37 05575d7f
Loading
Loading
Loading
Loading
+10 −16
Original line number Diff line number Diff line
@@ -597,8 +597,8 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal
        if (mDozing && !TextUtils.isEmpty(mTransientIndication)) {
            // Make sure this doesn't get stuck and burns in. Acquire wakelock until its cleared.
            mWakeLock.setAcquired(true);
            hideTransientIndicationDelayed(BaseKeyguardCallback.HIDE_DELAY_MS);
        }
        hideTransientIndicationDelayed(BaseKeyguardCallback.HIDE_DELAY_MS);

        updateIndication(false);
    }
@@ -802,7 +802,6 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal
        } else if (mKeyguardUpdateMonitor.isScreenOn()) {
            showTransientIndication(mContext.getString(R.string.keyguard_unlock),
                    false /* isError */, true /* hideOnScreenOff */);
            hideTransientIndicationDelayed(BaseKeyguardCallback.HIDE_DELAY_MS);
        }
    }

@@ -862,7 +861,6 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal
            if (mDozing) {
                if (!wasPluggedIn && mPowerPluggedIn) {
                    showTransientIndication(computePowerIndication());
                    hideTransientIndicationDelayed(HIDE_DELAY_MS);
                } else if (wasPluggedIn && !mPowerPluggedIn) {
                    hideTransientIndication();
                }
@@ -882,23 +880,19 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal
                return;
            }

            if (biometricSourceType == BiometricSourceType.FACE
                    && shouldSuppressFaceMsgAndShowTryFingerprintMsg()) {
                // suggest trying fingerprint
                showTransientIndication(R.string.keyguard_try_fingerprint);
                return;
            }

            boolean showSwipeToUnlock =
                    msgId == KeyguardUpdateMonitor.BIOMETRIC_HELP_FACE_NOT_RECOGNIZED;
            if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
                mStatusBarKeyguardViewManager.showBouncerMessage(helpString,
                        mInitialTextColorState);
            } else if (mKeyguardUpdateMonitor.isScreenOn()) {
                showTransientIndication(helpString, false /* isError */, showSwipeToUnlock);
                if (!showSwipeToUnlock) {
                    hideTransientIndicationDelayed(TRANSIENT_BIOMETRIC_ERROR_TIMEOUT);
                if (biometricSourceType == BiometricSourceType.FACE
                        && shouldSuppressFaceMsgAndShowTryFingerprintMsg()) {
                    // suggest trying fingerprint
                    showTransientIndication(R.string.keyguard_try_fingerprint);
                    return;
                }
                showTransientIndication(helpString, false /* isError */, showSwipeToUnlock);
            }
            if (showSwipeToUnlock) {
                mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_SWIPE_UP_TO_UNLOCK),
@@ -913,7 +907,9 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal
                return;
            }
            if (biometricSourceType == BiometricSourceType.FACE
                    && shouldSuppressFaceMsgAndShowTryFingerprintMsg()) {
                    && shouldSuppressFaceMsgAndShowTryFingerprintMsg()
                    && !mStatusBarKeyguardViewManager.isBouncerShowing()
                    && mKeyguardUpdateMonitor.isScreenOn()) {
                // suggest trying fingerprint
                showTransientIndication(R.string.keyguard_try_fingerprint);
                return;
@@ -935,8 +931,6 @@ public class KeyguardIndicationController implements KeyguardStateController.Cal
            } else if (mKeyguardUpdateMonitor.isScreenOn()) {
                showTransientIndication(errString, /* isError */ true,
                    /* hideOnScreenOff */ true);
                // We want to keep this message around in case the screen was off
                hideTransientIndicationDelayed(HIDE_DELAY_MS);
            } else {
                mMessageToShowOnScreenOn = errString;
            }