Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +41 −36 Original line number Original line Diff line number Diff line Loading @@ -298,8 +298,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private boolean mCredentialAttempted; private boolean mCredentialAttempted; private boolean mKeyguardGoingAway; private boolean mKeyguardGoingAway; private boolean mGoingToSleep; private boolean mGoingToSleep; private boolean mBouncerFullyShown; private boolean mPrimaryBouncerFullyShown; private boolean mBouncerIsOrWillBeShowing; private boolean mPrimaryBouncerIsOrWillBeShowing; private boolean mUdfpsBouncerShowing; private boolean mUdfpsBouncerShowing; private boolean mAuthInterruptActive; private boolean mAuthInterruptActive; private boolean mNeedsSlowUnlockTransition; private boolean mNeedsSlowUnlockTransition; Loading Loading @@ -1648,8 +1648,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab public void onAuthenticationFailed() { public void onAuthenticationFailed() { String reason = String reason = mKeyguardBypassController.canBypass() ? "bypass" mKeyguardBypassController.canBypass() ? "bypass" : mUdfpsBouncerShowing ? "udfpsBouncer" : : mUdfpsBouncerShowing ? "udfpsBouncer" mBouncerFullyShown ? "bouncer" : "udfpsFpDown"; : mPrimaryBouncerFullyShown ? "bouncer" : "udfpsFpDown"; requestActiveUnlock( requestActiveUnlock( ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN.BIOMETRIC_FAIL, ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN.BIOMETRIC_FAIL, "faceFailure-" + reason); "faceFailure-" + reason); Loading Loading @@ -2041,7 +2042,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab handleKeyguardReset(); handleKeyguardReset(); break; break; case MSG_KEYGUARD_BOUNCER_CHANGED: case MSG_KEYGUARD_BOUNCER_CHANGED: handleKeyguardBouncerChanged(msg.arg1, msg.arg2); handlePrimaryBouncerChanged(msg.arg1, msg.arg2); break; break; case MSG_REPORT_EMERGENCY_CALL_ACTION: case MSG_REPORT_EMERGENCY_CALL_ACTION: handleReportEmergencyCallAction(); handleReportEmergencyCallAction(); Loading Loading @@ -2511,7 +2512,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab requestOrigin, requestOrigin, extraReason, canFaceBypass extraReason, canFaceBypass || mUdfpsBouncerShowing || mUdfpsBouncerShowing || mBouncerFullyShown || mPrimaryBouncerFullyShown || mAuthController.isUdfpsFingerDown()); || mAuthController.isUdfpsFingerDown()); } } Loading @@ -2532,7 +2533,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private boolean shouldTriggerActiveUnlock() { private boolean shouldTriggerActiveUnlock() { // Triggers: // Triggers: final boolean triggerActiveUnlockForAssistant = shouldTriggerActiveUnlockForAssistant(); final boolean triggerActiveUnlockForAssistant = shouldTriggerActiveUnlockForAssistant(); final boolean awakeKeyguard = mBouncerFullyShown || mUdfpsBouncerShowing final boolean awakeKeyguard = mPrimaryBouncerFullyShown || mUdfpsBouncerShowing || (isKeyguardVisible() && !mGoingToSleep || (isKeyguardVisible() && !mGoingToSleep && mStatusBarState != StatusBarState.SHADE_LOCKED); && mStatusBarState != StatusBarState.SHADE_LOCKED); Loading Loading @@ -2611,7 +2612,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab final boolean shouldListenKeyguardState = final boolean shouldListenKeyguardState = isKeyguardVisible() isKeyguardVisible() || !mDeviceInteractive || !mDeviceInteractive || (mBouncerIsOrWillBeShowing && !mKeyguardGoingAway) || (mPrimaryBouncerIsOrWillBeShowing && !mKeyguardGoingAway) || mGoingToSleep || mGoingToSleep || shouldListenForFingerprintAssistant || shouldListenForFingerprintAssistant || (mKeyguardOccluded && mIsDreaming) || (mKeyguardOccluded && mIsDreaming) Loading @@ -2630,8 +2631,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab && mIsPrimaryUser && mIsPrimaryUser && biometricEnabledForUser; && biometricEnabledForUser; final boolean shouldListenBouncerState = final boolean shouldListenBouncerState = !(mFingerprintLockedOut !(mFingerprintLockedOut && mBouncerIsOrWillBeShowing && mCredentialAttempted); && mPrimaryBouncerIsOrWillBeShowing && mCredentialAttempted); final boolean isEncryptedOrLockdownForUser = isEncryptedOrLockdown(user); final boolean isEncryptedOrLockdownForUser = isEncryptedOrLockdown(user); Loading @@ -2656,7 +2657,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab user, user, shouldListen, shouldListen, biometricEnabledForUser, biometricEnabledForUser, mBouncerIsOrWillBeShowing, mPrimaryBouncerIsOrWillBeShowing, userCanSkipBouncer, userCanSkipBouncer, mCredentialAttempted, mCredentialAttempted, mDeviceInteractive, mDeviceInteractive, Loading Loading @@ -2713,7 +2714,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab // Scan even when encrypted or timeout to show a preemptive bouncer when bypassing. // Scan even when encrypted or timeout to show a preemptive bouncer when bypassing. // Lock-down mode shouldn't scan, since it is more explicit. // Lock-down mode shouldn't scan, since it is more explicit. boolean strongAuthAllowsScanning = (!isEncryptedOrTimedOut || canBypass boolean strongAuthAllowsScanning = (!isEncryptedOrTimedOut || canBypass && !mBouncerFullyShown); && !mPrimaryBouncerFullyShown); // If the device supports face detection (without authentication) and bypass is enabled, // If the device supports face detection (without authentication) and bypass is enabled, // allow face scanning to happen if the device is in lockdown mode. // allow face scanning to happen if the device is in lockdown mode. Loading @@ -2734,7 +2735,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. final boolean shouldListen = final boolean shouldListen = (mBouncerFullyShown (mPrimaryBouncerFullyShown || mAuthInterruptActive || mAuthInterruptActive || mOccludingAppRequestingFace || mOccludingAppRequestingFace || awakeKeyguard || awakeKeyguard Loading @@ -2761,7 +2762,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mAuthInterruptActive, mAuthInterruptActive, becauseCannotSkipBouncer, becauseCannotSkipBouncer, biometricEnabledForUser, biometricEnabledForUser, mBouncerFullyShown, mPrimaryBouncerFullyShown, faceAuthenticated, faceAuthenticated, faceDisabledForUser, faceDisabledForUser, isFaceLockedOut(), isFaceLockedOut(), Loading Loading @@ -3291,17 +3292,19 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab /** /** * Handle {@link #MSG_KEYGUARD_BOUNCER_CHANGED} * Handle {@link #MSG_KEYGUARD_BOUNCER_CHANGED} * * * @see #sendKeyguardBouncerChanged(boolean, boolean) * @see #sendPrimaryBouncerChanged(boolean, boolean) */ */ private void handleKeyguardBouncerChanged(int bouncerIsOrWillBeShowing, int bouncerFullyShown) { private void handlePrimaryBouncerChanged(int primaryBouncerIsOrWillBeShowing, int primaryBouncerFullyShown) { Assert.isMainThread(); Assert.isMainThread(); final boolean wasBouncerIsOrWillBeShowing = mBouncerIsOrWillBeShowing; final boolean wasPrimaryBouncerIsOrWillBeShowing = mPrimaryBouncerIsOrWillBeShowing; final boolean wasBouncerFullyShown = mBouncerFullyShown; final boolean wasPrimaryBouncerFullyShown = mPrimaryBouncerFullyShown; mBouncerIsOrWillBeShowing = bouncerIsOrWillBeShowing == 1; mPrimaryBouncerIsOrWillBeShowing = primaryBouncerIsOrWillBeShowing == 1; mBouncerFullyShown = bouncerFullyShown == 1; mPrimaryBouncerFullyShown = primaryBouncerFullyShown == 1; mLogger.logKeyguardBouncerChanged(mBouncerIsOrWillBeShowing, mBouncerFullyShown); mLogger.logPrimaryKeyguardBouncerChanged(mPrimaryBouncerIsOrWillBeShowing, mPrimaryBouncerFullyShown); if (mBouncerFullyShown) { if (mPrimaryBouncerFullyShown) { // If the bouncer is shown, always clear this flag. This can happen in the following // If the bouncer is shown, always clear this flag. This can happen in the following // situations: 1) Default camera with SHOW_WHEN_LOCKED is not chosen yet. 2) Secure // situations: 1) Default camera with SHOW_WHEN_LOCKED is not chosen yet. 2) Secure // camera requests dismiss keyguard (tapping on photos for example). When these happen, // camera requests dismiss keyguard (tapping on photos for example). When these happen, Loading @@ -3311,18 +3314,18 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mCredentialAttempted = false; mCredentialAttempted = false; } } if (wasBouncerIsOrWillBeShowing != mBouncerIsOrWillBeShowing) { if (wasPrimaryBouncerIsOrWillBeShowing != mPrimaryBouncerIsOrWillBeShowing) { for (int i = 0; i < mCallbacks.size(); i++) { for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { if (cb != null) { cb.onKeyguardBouncerStateChanged(mBouncerIsOrWillBeShowing); cb.onKeyguardBouncerStateChanged(mPrimaryBouncerIsOrWillBeShowing); } } } } updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE); updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE); } } if (wasBouncerFullyShown != mBouncerFullyShown) { if (wasPrimaryBouncerFullyShown != mPrimaryBouncerFullyShown) { if (mBouncerFullyShown) { if (mPrimaryBouncerFullyShown) { requestActiveUnlock( requestActiveUnlock( ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN.UNLOCK_INTENT, ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN.UNLOCK_INTENT, "bouncerFullyShown"); "bouncerFullyShown"); Loading @@ -3330,7 +3333,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab for (int i = 0; i < mCallbacks.size(); i++) { for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { if (cb != null) { cb.onKeyguardBouncerFullyShowingChanged(mBouncerFullyShown); cb.onKeyguardBouncerFullyShowingChanged(mPrimaryBouncerFullyShown); } } } } updateFaceListeningState(BIOMETRIC_ACTION_UPDATE, updateFaceListeningState(BIOMETRIC_ACTION_UPDATE, Loading Loading @@ -3481,14 +3484,15 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab } } /** /** * @see #handleKeyguardBouncerChanged(int, int) * @see #handlePrimaryBouncerChanged(int, int) */ */ public void sendKeyguardBouncerChanged(boolean bouncerIsOrWillBeShowing, public void sendPrimaryBouncerChanged(boolean primaryBouncerIsOrWillBeShowing, boolean bouncerFullyShown) { boolean primaryBouncerFullyShown) { mLogger.logSendKeyguardBouncerChanged(bouncerIsOrWillBeShowing, bouncerFullyShown); mLogger.logSendPrimaryBouncerChanged(primaryBouncerIsOrWillBeShowing, primaryBouncerFullyShown); Message message = mHandler.obtainMessage(MSG_KEYGUARD_BOUNCER_CHANGED); Message message = mHandler.obtainMessage(MSG_KEYGUARD_BOUNCER_CHANGED); message.arg1 = bouncerIsOrWillBeShowing ? 1 : 0; message.arg1 = primaryBouncerIsOrWillBeShowing ? 1 : 0; message.arg2 = bouncerFullyShown ? 1 : 0; message.arg2 = primaryBouncerFullyShown ? 1 : 0; message.sendToTarget(); message.sendToTarget(); } } Loading Loading @@ -3848,7 +3852,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab if (isUdfpsSupported()) { if (isUdfpsSupported()) { pw.println(" udfpsEnrolled=" + isUdfpsEnrolled()); pw.println(" udfpsEnrolled=" + isUdfpsEnrolled()); pw.println(" shouldListenForUdfps=" + shouldListenForFingerprint(true)); pw.println(" shouldListenForUdfps=" + shouldListenForFingerprint(true)); pw.println(" mBouncerIsOrWillBeShowing=" + mBouncerIsOrWillBeShowing); pw.println(" mPrimaryBouncerIsOrWillBeShowing=" + mPrimaryBouncerIsOrWillBeShowing); pw.println(" mStatusBarState=" + StatusBarState.toString(mStatusBarState)); pw.println(" mStatusBarState=" + StatusBarState.toString(mStatusBarState)); pw.println(" mUdfpsBouncerShowing=" + mUdfpsBouncerShowing); pw.println(" mUdfpsBouncerShowing=" + mUdfpsBouncerShowing); } else if (isSfpsSupported()) { } else if (isSfpsSupported()) { Loading Loading @@ -3880,7 +3885,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab pw.println(" mFaceLockedOutPermanent=" + mFaceLockedOutPermanent); pw.println(" mFaceLockedOutPermanent=" + mFaceLockedOutPermanent); pw.println(" enabledByUser=" + mBiometricEnabledForUser.get(userId)); pw.println(" enabledByUser=" + mBiometricEnabledForUser.get(userId)); pw.println(" mSecureCameraLaunched=" + mSecureCameraLaunched); pw.println(" mSecureCameraLaunched=" + mSecureCameraLaunched); pw.println(" mBouncerFullyShown=" + mBouncerFullyShown); pw.println(" mPrimaryBouncerFullyShown=" + mPrimaryBouncerFullyShown); pw.println(" mNeedsSlowUnlockTransition=" + mNeedsSlowUnlockTransition); pw.println(" mNeedsSlowUnlockTransition=" + mNeedsSlowUnlockTransition); } } mListenModels.print(pw); mListenModels.print(pw); Loading packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java +11 −12 Original line number Original line Diff line number Diff line Loading @@ -50,15 +50,10 @@ public interface KeyguardViewController { /** /** * Resets the state of Keyguard View. * Resets the state of Keyguard View. * @param hideBouncerWhenShowing * @param hideBouncerWhenShowing when true, hides the primary and alternate bouncers if showing. */ */ void reset(boolean hideBouncerWhenShowing); void reset(boolean hideBouncerWhenShowing); /** * Stop showing any alternate auth methods. */ void resetAlternateAuth(boolean forceUpdateScrim); /** /** * Called when the device started going to sleep. * Called when the device started going to sleep. */ */ Loading Loading @@ -156,20 +151,24 @@ public interface KeyguardViewController { void notifyKeyguardAuthenticated(boolean strongAuth); void notifyKeyguardAuthenticated(boolean strongAuth); /** /** * Shows the Bouncer. * Shows the primary bouncer. * */ void showPrimaryBouncer(boolean scrimmed); /** * When the primary bouncer is fully visible or is showing but animation didn't finish yet. */ */ void showBouncer(boolean scrimmed); boolean primaryBouncerIsOrWillBeShowing(); /** /** * Returns {@code true} when the bouncer is currently showing * Returns {@code true} when the primary bouncer or alternate bouncer is currently showing */ */ boolean isBouncerShowing(); boolean isBouncerShowing(); /** /** * When bouncer is fully visible or it is showing but animation didn't finish yet. * Stop showing the alternate bouncer, if showing. */ */ boolean bouncerIsOrWillBeShowing(); void hideAlternateBouncer(boolean forceUpdateScrim); // TODO: Deprecate registerStatusBar in KeyguardViewController interface. It is currently // TODO: Deprecate registerStatusBar in KeyguardViewController interface. It is currently // only used for testing purposes in StatusBarKeyguardViewManager, and it prevents us from // only used for testing purposes in StatusBarKeyguardViewManager, and it prevents us from Loading packages/SystemUI/src/com/android/keyguard/LockIconViewController.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -701,7 +701,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme "lock-screen-lock-icon-longpress", "lock-screen-lock-icon-longpress", TOUCH_VIBRATION_ATTRIBUTES); TOUCH_VIBRATION_ATTRIBUTES); mKeyguardViewController.showBouncer(/* scrim */ true); mKeyguardViewController.showPrimaryBouncer(/* scrim */ true); } } Loading packages/SystemUI/src/com/android/keyguard/logging/KeyguardUpdateMonitorLogger.kt +15 −12 Original line number Original line Diff line number Diff line Loading @@ -166,13 +166,16 @@ class KeyguardUpdateMonitorLogger @Inject constructor( { "Previously active sub id $int1 is now invalid, will remove" }) { "Previously active sub id $int1 is now invalid, will remove" }) } } fun logKeyguardBouncerChanged(bouncerIsOrWillBeShowing: Boolean, bouncerFullyShown: Boolean) { fun logPrimaryKeyguardBouncerChanged( primaryBouncerIsOrWillBeShowing: Boolean, primaryBouncerFullyShown: Boolean ) { logBuffer.log(TAG, DEBUG, { logBuffer.log(TAG, DEBUG, { bool1 = bouncerIsOrWillBeShowing bool1 = primaryBouncerIsOrWillBeShowing bool2 = bouncerFullyShown bool2 = primaryBouncerFullyShown }, { }, { "handleKeyguardBouncerChanged " + "handlePrimaryBouncerChanged " + "bouncerIsOrWillBeShowing=$bool1 bouncerFullyShowing=$bool2" "primaryBouncerIsOrWillBeShowing=$bool1 primaryBouncerFullyShown=$bool2" }) }) } } Loading Loading @@ -229,16 +232,16 @@ class KeyguardUpdateMonitorLogger @Inject constructor( { "Retrying fingerprint attempt: $int1" }) { "Retrying fingerprint attempt: $int1" }) } } fun logSendKeyguardBouncerChanged( fun logSendPrimaryBouncerChanged( bouncerIsOrWillBeShowing: Boolean, primaryBouncerIsOrWillBeShowing: Boolean, bouncerFullyShown: Boolean, primaryBouncerFullyShown: Boolean, ) { ) { logBuffer.log(TAG, DEBUG, { logBuffer.log(TAG, DEBUG, { bool1 = bouncerIsOrWillBeShowing bool1 = primaryBouncerIsOrWillBeShowing bool2 = bouncerFullyShown bool2 = primaryBouncerFullyShown }, { }, { "sendKeyguardBouncerChanged bouncerIsOrWillBeShowing=$bool1 " + "sendPrimaryBouncerChanged primaryBouncerIsOrWillBeShowing=$bool1 " + "bouncerFullyShown=$bool2" "primaryBouncerFullyShown=$bool2" }) }) } } Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +10 −10 Original line number Original line Diff line number Diff line Loading @@ -69,7 +69,7 @@ import com.android.systemui.dump.DumpManager; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.flags.Flags; import com.android.systemui.flags.Flags; import com.android.systemui.keyguard.ScreenLifecycle; import com.android.systemui.keyguard.ScreenLifecycle; import com.android.systemui.keyguard.domain.interactor.BouncerInteractor; import com.android.systemui.keyguard.domain.interactor.PrimaryBouncerInteractor; import com.android.systemui.plugins.FalsingManager; import com.android.systemui.plugins.FalsingManager; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.shade.ShadeExpansionStateManager; import com.android.systemui.shade.ShadeExpansionStateManager; Loading Loading @@ -142,7 +142,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { @NonNull private final LatencyTracker mLatencyTracker; @NonNull private final LatencyTracker mLatencyTracker; @VisibleForTesting @NonNull final BiometricDisplayListener mOrientationListener; @VisibleForTesting @NonNull final BiometricDisplayListener mOrientationListener; @NonNull private final ActivityLaunchAnimator mActivityLaunchAnimator; @NonNull private final ActivityLaunchAnimator mActivityLaunchAnimator; @NonNull private final BouncerInteractor mBouncerInteractor; @NonNull private final PrimaryBouncerInteractor mPrimaryBouncerInteractor; // Currently the UdfpsController supports a single UDFPS sensor. If devices have multiple // Currently the UdfpsController supports a single UDFPS sensor. If devices have multiple // sensors, this, in addition to a lot of the code here, will be updated. // sensors, this, in addition to a lot of the code here, will be updated. Loading Loading @@ -235,7 +235,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { mUdfpsDisplayMode, requestId, reason, callback, mUdfpsDisplayMode, requestId, reason, callback, (view, event, fromUdfpsView) -> onTouch(requestId, event, (view, event, fromUdfpsView) -> onTouch(requestId, event, fromUdfpsView), mActivityLaunchAnimator, mFeatureFlags, fromUdfpsView), mActivityLaunchAnimator, mFeatureFlags, mBouncerInteractor))); mPrimaryBouncerInteractor))); } } @Override @Override Loading Loading @@ -354,14 +354,14 @@ public class UdfpsController implements DozeReceiver, Dumpable { if (!mOverlayParams.equals(overlayParams)) { if (!mOverlayParams.equals(overlayParams)) { mOverlayParams = overlayParams; mOverlayParams = overlayParams; final boolean wasShowingAltAuth = mKeyguardViewManager.isShowingAlternateAuth(); final boolean wasShowingAltAuth = mKeyguardViewManager.isShowingAlternateBouncer(); // When the bounds change it's always necessary to re-create the overlay's window with // When the bounds change it's always necessary to re-create the overlay's window with // new LayoutParams. If the overlay needs to be shown, this will re-create and show the // new LayoutParams. If the overlay needs to be shown, this will re-create and show the // overlay with the updated LayoutParams. Otherwise, the overlay will remain hidden. // overlay with the updated LayoutParams. Otherwise, the overlay will remain hidden. redrawOverlay(); redrawOverlay(); if (wasShowingAltAuth) { if (wasShowingAltAuth) { mKeyguardViewManager.showGenericBouncer(true); mKeyguardViewManager.showBouncer(true); } } } } } } Loading Loading @@ -660,7 +660,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { @NonNull ActivityLaunchAnimator activityLaunchAnimator, @NonNull ActivityLaunchAnimator activityLaunchAnimator, @NonNull Optional<AlternateUdfpsTouchProvider> alternateTouchProvider, @NonNull Optional<AlternateUdfpsTouchProvider> alternateTouchProvider, @NonNull @BiometricsBackground Executor biometricsExecutor, @NonNull @BiometricsBackground Executor biometricsExecutor, @NonNull BouncerInteractor bouncerInteractor) { @NonNull PrimaryBouncerInteractor primaryBouncerInteractor) { mContext = context; mContext = context; mExecution = execution; mExecution = execution; mVibrator = vibrator; mVibrator = vibrator; Loading Loading @@ -699,7 +699,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { false /* resetLockoutRequiresHardwareAuthToken */); false /* resetLockoutRequiresHardwareAuthToken */); mBiometricExecutor = biometricsExecutor; mBiometricExecutor = biometricsExecutor; mBouncerInteractor = bouncerInteractor; mPrimaryBouncerInteractor = primaryBouncerInteractor; mDumpManager.registerDumpable(TAG, this); mDumpManager.registerDumpable(TAG, this); Loading Loading @@ -791,8 +791,8 @@ public class UdfpsController implements DozeReceiver, Dumpable { onFingerUp(mOverlay.getRequestId(), oldView); onFingerUp(mOverlay.getRequestId(), oldView); } } final boolean removed = mOverlay.hide(); final boolean removed = mOverlay.hide(); if (mKeyguardViewManager.isShowingAlternateAuth()) { if (mKeyguardViewManager.isShowingAlternateBouncer()) { mKeyguardViewManager.resetAlternateAuth(true); mKeyguardViewManager.hideAlternateBouncer(true); } } Log.v(TAG, "hideUdfpsOverlay | removing window: " + removed); Log.v(TAG, "hideUdfpsOverlay | removing window: " + removed); } else { } else { Loading Loading @@ -832,7 +832,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { Log.v(TAG, "aod lock icon long-press rejected by the falsing manager."); Log.v(TAG, "aod lock icon long-press rejected by the falsing manager."); return; return; } } mKeyguardViewManager.showBouncer(true); mKeyguardViewManager.showPrimaryBouncer(true); // play the same haptic as the LockIconViewController longpress // play the same haptic as the LockIconViewController longpress mVibrator.vibrate( mVibrator.vibrate( Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +41 −36 Original line number Original line Diff line number Diff line Loading @@ -298,8 +298,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private boolean mCredentialAttempted; private boolean mCredentialAttempted; private boolean mKeyguardGoingAway; private boolean mKeyguardGoingAway; private boolean mGoingToSleep; private boolean mGoingToSleep; private boolean mBouncerFullyShown; private boolean mPrimaryBouncerFullyShown; private boolean mBouncerIsOrWillBeShowing; private boolean mPrimaryBouncerIsOrWillBeShowing; private boolean mUdfpsBouncerShowing; private boolean mUdfpsBouncerShowing; private boolean mAuthInterruptActive; private boolean mAuthInterruptActive; private boolean mNeedsSlowUnlockTransition; private boolean mNeedsSlowUnlockTransition; Loading Loading @@ -1648,8 +1648,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab public void onAuthenticationFailed() { public void onAuthenticationFailed() { String reason = String reason = mKeyguardBypassController.canBypass() ? "bypass" mKeyguardBypassController.canBypass() ? "bypass" : mUdfpsBouncerShowing ? "udfpsBouncer" : : mUdfpsBouncerShowing ? "udfpsBouncer" mBouncerFullyShown ? "bouncer" : "udfpsFpDown"; : mPrimaryBouncerFullyShown ? "bouncer" : "udfpsFpDown"; requestActiveUnlock( requestActiveUnlock( ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN.BIOMETRIC_FAIL, ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN.BIOMETRIC_FAIL, "faceFailure-" + reason); "faceFailure-" + reason); Loading Loading @@ -2041,7 +2042,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab handleKeyguardReset(); handleKeyguardReset(); break; break; case MSG_KEYGUARD_BOUNCER_CHANGED: case MSG_KEYGUARD_BOUNCER_CHANGED: handleKeyguardBouncerChanged(msg.arg1, msg.arg2); handlePrimaryBouncerChanged(msg.arg1, msg.arg2); break; break; case MSG_REPORT_EMERGENCY_CALL_ACTION: case MSG_REPORT_EMERGENCY_CALL_ACTION: handleReportEmergencyCallAction(); handleReportEmergencyCallAction(); Loading Loading @@ -2511,7 +2512,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab requestOrigin, requestOrigin, extraReason, canFaceBypass extraReason, canFaceBypass || mUdfpsBouncerShowing || mUdfpsBouncerShowing || mBouncerFullyShown || mPrimaryBouncerFullyShown || mAuthController.isUdfpsFingerDown()); || mAuthController.isUdfpsFingerDown()); } } Loading @@ -2532,7 +2533,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private boolean shouldTriggerActiveUnlock() { private boolean shouldTriggerActiveUnlock() { // Triggers: // Triggers: final boolean triggerActiveUnlockForAssistant = shouldTriggerActiveUnlockForAssistant(); final boolean triggerActiveUnlockForAssistant = shouldTriggerActiveUnlockForAssistant(); final boolean awakeKeyguard = mBouncerFullyShown || mUdfpsBouncerShowing final boolean awakeKeyguard = mPrimaryBouncerFullyShown || mUdfpsBouncerShowing || (isKeyguardVisible() && !mGoingToSleep || (isKeyguardVisible() && !mGoingToSleep && mStatusBarState != StatusBarState.SHADE_LOCKED); && mStatusBarState != StatusBarState.SHADE_LOCKED); Loading Loading @@ -2611,7 +2612,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab final boolean shouldListenKeyguardState = final boolean shouldListenKeyguardState = isKeyguardVisible() isKeyguardVisible() || !mDeviceInteractive || !mDeviceInteractive || (mBouncerIsOrWillBeShowing && !mKeyguardGoingAway) || (mPrimaryBouncerIsOrWillBeShowing && !mKeyguardGoingAway) || mGoingToSleep || mGoingToSleep || shouldListenForFingerprintAssistant || shouldListenForFingerprintAssistant || (mKeyguardOccluded && mIsDreaming) || (mKeyguardOccluded && mIsDreaming) Loading @@ -2630,8 +2631,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab && mIsPrimaryUser && mIsPrimaryUser && biometricEnabledForUser; && biometricEnabledForUser; final boolean shouldListenBouncerState = final boolean shouldListenBouncerState = !(mFingerprintLockedOut !(mFingerprintLockedOut && mBouncerIsOrWillBeShowing && mCredentialAttempted); && mPrimaryBouncerIsOrWillBeShowing && mCredentialAttempted); final boolean isEncryptedOrLockdownForUser = isEncryptedOrLockdown(user); final boolean isEncryptedOrLockdownForUser = isEncryptedOrLockdown(user); Loading @@ -2656,7 +2657,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab user, user, shouldListen, shouldListen, biometricEnabledForUser, biometricEnabledForUser, mBouncerIsOrWillBeShowing, mPrimaryBouncerIsOrWillBeShowing, userCanSkipBouncer, userCanSkipBouncer, mCredentialAttempted, mCredentialAttempted, mDeviceInteractive, mDeviceInteractive, Loading Loading @@ -2713,7 +2714,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab // Scan even when encrypted or timeout to show a preemptive bouncer when bypassing. // Scan even when encrypted or timeout to show a preemptive bouncer when bypassing. // Lock-down mode shouldn't scan, since it is more explicit. // Lock-down mode shouldn't scan, since it is more explicit. boolean strongAuthAllowsScanning = (!isEncryptedOrTimedOut || canBypass boolean strongAuthAllowsScanning = (!isEncryptedOrTimedOut || canBypass && !mBouncerFullyShown); && !mPrimaryBouncerFullyShown); // If the device supports face detection (without authentication) and bypass is enabled, // If the device supports face detection (without authentication) and bypass is enabled, // allow face scanning to happen if the device is in lockdown mode. // allow face scanning to happen if the device is in lockdown mode. Loading @@ -2734,7 +2735,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. final boolean shouldListen = final boolean shouldListen = (mBouncerFullyShown (mPrimaryBouncerFullyShown || mAuthInterruptActive || mAuthInterruptActive || mOccludingAppRequestingFace || mOccludingAppRequestingFace || awakeKeyguard || awakeKeyguard Loading @@ -2761,7 +2762,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mAuthInterruptActive, mAuthInterruptActive, becauseCannotSkipBouncer, becauseCannotSkipBouncer, biometricEnabledForUser, biometricEnabledForUser, mBouncerFullyShown, mPrimaryBouncerFullyShown, faceAuthenticated, faceAuthenticated, faceDisabledForUser, faceDisabledForUser, isFaceLockedOut(), isFaceLockedOut(), Loading Loading @@ -3291,17 +3292,19 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab /** /** * Handle {@link #MSG_KEYGUARD_BOUNCER_CHANGED} * Handle {@link #MSG_KEYGUARD_BOUNCER_CHANGED} * * * @see #sendKeyguardBouncerChanged(boolean, boolean) * @see #sendPrimaryBouncerChanged(boolean, boolean) */ */ private void handleKeyguardBouncerChanged(int bouncerIsOrWillBeShowing, int bouncerFullyShown) { private void handlePrimaryBouncerChanged(int primaryBouncerIsOrWillBeShowing, int primaryBouncerFullyShown) { Assert.isMainThread(); Assert.isMainThread(); final boolean wasBouncerIsOrWillBeShowing = mBouncerIsOrWillBeShowing; final boolean wasPrimaryBouncerIsOrWillBeShowing = mPrimaryBouncerIsOrWillBeShowing; final boolean wasBouncerFullyShown = mBouncerFullyShown; final boolean wasPrimaryBouncerFullyShown = mPrimaryBouncerFullyShown; mBouncerIsOrWillBeShowing = bouncerIsOrWillBeShowing == 1; mPrimaryBouncerIsOrWillBeShowing = primaryBouncerIsOrWillBeShowing == 1; mBouncerFullyShown = bouncerFullyShown == 1; mPrimaryBouncerFullyShown = primaryBouncerFullyShown == 1; mLogger.logKeyguardBouncerChanged(mBouncerIsOrWillBeShowing, mBouncerFullyShown); mLogger.logPrimaryKeyguardBouncerChanged(mPrimaryBouncerIsOrWillBeShowing, mPrimaryBouncerFullyShown); if (mBouncerFullyShown) { if (mPrimaryBouncerFullyShown) { // If the bouncer is shown, always clear this flag. This can happen in the following // If the bouncer is shown, always clear this flag. This can happen in the following // situations: 1) Default camera with SHOW_WHEN_LOCKED is not chosen yet. 2) Secure // situations: 1) Default camera with SHOW_WHEN_LOCKED is not chosen yet. 2) Secure // camera requests dismiss keyguard (tapping on photos for example). When these happen, // camera requests dismiss keyguard (tapping on photos for example). When these happen, Loading @@ -3311,18 +3314,18 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mCredentialAttempted = false; mCredentialAttempted = false; } } if (wasBouncerIsOrWillBeShowing != mBouncerIsOrWillBeShowing) { if (wasPrimaryBouncerIsOrWillBeShowing != mPrimaryBouncerIsOrWillBeShowing) { for (int i = 0; i < mCallbacks.size(); i++) { for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { if (cb != null) { cb.onKeyguardBouncerStateChanged(mBouncerIsOrWillBeShowing); cb.onKeyguardBouncerStateChanged(mPrimaryBouncerIsOrWillBeShowing); } } } } updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE); updateFingerprintListeningState(BIOMETRIC_ACTION_UPDATE); } } if (wasBouncerFullyShown != mBouncerFullyShown) { if (wasPrimaryBouncerFullyShown != mPrimaryBouncerFullyShown) { if (mBouncerFullyShown) { if (mPrimaryBouncerFullyShown) { requestActiveUnlock( requestActiveUnlock( ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN.UNLOCK_INTENT, ActiveUnlockConfig.ACTIVE_UNLOCK_REQUEST_ORIGIN.UNLOCK_INTENT, "bouncerFullyShown"); "bouncerFullyShown"); Loading @@ -3330,7 +3333,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab for (int i = 0; i < mCallbacks.size(); i++) { for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { if (cb != null) { cb.onKeyguardBouncerFullyShowingChanged(mBouncerFullyShown); cb.onKeyguardBouncerFullyShowingChanged(mPrimaryBouncerFullyShown); } } } } updateFaceListeningState(BIOMETRIC_ACTION_UPDATE, updateFaceListeningState(BIOMETRIC_ACTION_UPDATE, Loading Loading @@ -3481,14 +3484,15 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab } } /** /** * @see #handleKeyguardBouncerChanged(int, int) * @see #handlePrimaryBouncerChanged(int, int) */ */ public void sendKeyguardBouncerChanged(boolean bouncerIsOrWillBeShowing, public void sendPrimaryBouncerChanged(boolean primaryBouncerIsOrWillBeShowing, boolean bouncerFullyShown) { boolean primaryBouncerFullyShown) { mLogger.logSendKeyguardBouncerChanged(bouncerIsOrWillBeShowing, bouncerFullyShown); mLogger.logSendPrimaryBouncerChanged(primaryBouncerIsOrWillBeShowing, primaryBouncerFullyShown); Message message = mHandler.obtainMessage(MSG_KEYGUARD_BOUNCER_CHANGED); Message message = mHandler.obtainMessage(MSG_KEYGUARD_BOUNCER_CHANGED); message.arg1 = bouncerIsOrWillBeShowing ? 1 : 0; message.arg1 = primaryBouncerIsOrWillBeShowing ? 1 : 0; message.arg2 = bouncerFullyShown ? 1 : 0; message.arg2 = primaryBouncerFullyShown ? 1 : 0; message.sendToTarget(); message.sendToTarget(); } } Loading Loading @@ -3848,7 +3852,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab if (isUdfpsSupported()) { if (isUdfpsSupported()) { pw.println(" udfpsEnrolled=" + isUdfpsEnrolled()); pw.println(" udfpsEnrolled=" + isUdfpsEnrolled()); pw.println(" shouldListenForUdfps=" + shouldListenForFingerprint(true)); pw.println(" shouldListenForUdfps=" + shouldListenForFingerprint(true)); pw.println(" mBouncerIsOrWillBeShowing=" + mBouncerIsOrWillBeShowing); pw.println(" mPrimaryBouncerIsOrWillBeShowing=" + mPrimaryBouncerIsOrWillBeShowing); pw.println(" mStatusBarState=" + StatusBarState.toString(mStatusBarState)); pw.println(" mStatusBarState=" + StatusBarState.toString(mStatusBarState)); pw.println(" mUdfpsBouncerShowing=" + mUdfpsBouncerShowing); pw.println(" mUdfpsBouncerShowing=" + mUdfpsBouncerShowing); } else if (isSfpsSupported()) { } else if (isSfpsSupported()) { Loading Loading @@ -3880,7 +3885,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab pw.println(" mFaceLockedOutPermanent=" + mFaceLockedOutPermanent); pw.println(" mFaceLockedOutPermanent=" + mFaceLockedOutPermanent); pw.println(" enabledByUser=" + mBiometricEnabledForUser.get(userId)); pw.println(" enabledByUser=" + mBiometricEnabledForUser.get(userId)); pw.println(" mSecureCameraLaunched=" + mSecureCameraLaunched); pw.println(" mSecureCameraLaunched=" + mSecureCameraLaunched); pw.println(" mBouncerFullyShown=" + mBouncerFullyShown); pw.println(" mPrimaryBouncerFullyShown=" + mPrimaryBouncerFullyShown); pw.println(" mNeedsSlowUnlockTransition=" + mNeedsSlowUnlockTransition); pw.println(" mNeedsSlowUnlockTransition=" + mNeedsSlowUnlockTransition); } } mListenModels.print(pw); mListenModels.print(pw); Loading
packages/SystemUI/src/com/android/keyguard/KeyguardViewController.java +11 −12 Original line number Original line Diff line number Diff line Loading @@ -50,15 +50,10 @@ public interface KeyguardViewController { /** /** * Resets the state of Keyguard View. * Resets the state of Keyguard View. * @param hideBouncerWhenShowing * @param hideBouncerWhenShowing when true, hides the primary and alternate bouncers if showing. */ */ void reset(boolean hideBouncerWhenShowing); void reset(boolean hideBouncerWhenShowing); /** * Stop showing any alternate auth methods. */ void resetAlternateAuth(boolean forceUpdateScrim); /** /** * Called when the device started going to sleep. * Called when the device started going to sleep. */ */ Loading Loading @@ -156,20 +151,24 @@ public interface KeyguardViewController { void notifyKeyguardAuthenticated(boolean strongAuth); void notifyKeyguardAuthenticated(boolean strongAuth); /** /** * Shows the Bouncer. * Shows the primary bouncer. * */ void showPrimaryBouncer(boolean scrimmed); /** * When the primary bouncer is fully visible or is showing but animation didn't finish yet. */ */ void showBouncer(boolean scrimmed); boolean primaryBouncerIsOrWillBeShowing(); /** /** * Returns {@code true} when the bouncer is currently showing * Returns {@code true} when the primary bouncer or alternate bouncer is currently showing */ */ boolean isBouncerShowing(); boolean isBouncerShowing(); /** /** * When bouncer is fully visible or it is showing but animation didn't finish yet. * Stop showing the alternate bouncer, if showing. */ */ boolean bouncerIsOrWillBeShowing(); void hideAlternateBouncer(boolean forceUpdateScrim); // TODO: Deprecate registerStatusBar in KeyguardViewController interface. It is currently // TODO: Deprecate registerStatusBar in KeyguardViewController interface. It is currently // only used for testing purposes in StatusBarKeyguardViewManager, and it prevents us from // only used for testing purposes in StatusBarKeyguardViewManager, and it prevents us from Loading
packages/SystemUI/src/com/android/keyguard/LockIconViewController.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -701,7 +701,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme "lock-screen-lock-icon-longpress", "lock-screen-lock-icon-longpress", TOUCH_VIBRATION_ATTRIBUTES); TOUCH_VIBRATION_ATTRIBUTES); mKeyguardViewController.showBouncer(/* scrim */ true); mKeyguardViewController.showPrimaryBouncer(/* scrim */ true); } } Loading
packages/SystemUI/src/com/android/keyguard/logging/KeyguardUpdateMonitorLogger.kt +15 −12 Original line number Original line Diff line number Diff line Loading @@ -166,13 +166,16 @@ class KeyguardUpdateMonitorLogger @Inject constructor( { "Previously active sub id $int1 is now invalid, will remove" }) { "Previously active sub id $int1 is now invalid, will remove" }) } } fun logKeyguardBouncerChanged(bouncerIsOrWillBeShowing: Boolean, bouncerFullyShown: Boolean) { fun logPrimaryKeyguardBouncerChanged( primaryBouncerIsOrWillBeShowing: Boolean, primaryBouncerFullyShown: Boolean ) { logBuffer.log(TAG, DEBUG, { logBuffer.log(TAG, DEBUG, { bool1 = bouncerIsOrWillBeShowing bool1 = primaryBouncerIsOrWillBeShowing bool2 = bouncerFullyShown bool2 = primaryBouncerFullyShown }, { }, { "handleKeyguardBouncerChanged " + "handlePrimaryBouncerChanged " + "bouncerIsOrWillBeShowing=$bool1 bouncerFullyShowing=$bool2" "primaryBouncerIsOrWillBeShowing=$bool1 primaryBouncerFullyShown=$bool2" }) }) } } Loading Loading @@ -229,16 +232,16 @@ class KeyguardUpdateMonitorLogger @Inject constructor( { "Retrying fingerprint attempt: $int1" }) { "Retrying fingerprint attempt: $int1" }) } } fun logSendKeyguardBouncerChanged( fun logSendPrimaryBouncerChanged( bouncerIsOrWillBeShowing: Boolean, primaryBouncerIsOrWillBeShowing: Boolean, bouncerFullyShown: Boolean, primaryBouncerFullyShown: Boolean, ) { ) { logBuffer.log(TAG, DEBUG, { logBuffer.log(TAG, DEBUG, { bool1 = bouncerIsOrWillBeShowing bool1 = primaryBouncerIsOrWillBeShowing bool2 = bouncerFullyShown bool2 = primaryBouncerFullyShown }, { }, { "sendKeyguardBouncerChanged bouncerIsOrWillBeShowing=$bool1 " + "sendPrimaryBouncerChanged primaryBouncerIsOrWillBeShowing=$bool1 " + "bouncerFullyShown=$bool2" "primaryBouncerFullyShown=$bool2" }) }) } } Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +10 −10 Original line number Original line Diff line number Diff line Loading @@ -69,7 +69,7 @@ import com.android.systemui.dump.DumpManager; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.flags.Flags; import com.android.systemui.flags.Flags; import com.android.systemui.keyguard.ScreenLifecycle; import com.android.systemui.keyguard.ScreenLifecycle; import com.android.systemui.keyguard.domain.interactor.BouncerInteractor; import com.android.systemui.keyguard.domain.interactor.PrimaryBouncerInteractor; import com.android.systemui.plugins.FalsingManager; import com.android.systemui.plugins.FalsingManager; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.shade.ShadeExpansionStateManager; import com.android.systemui.shade.ShadeExpansionStateManager; Loading Loading @@ -142,7 +142,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { @NonNull private final LatencyTracker mLatencyTracker; @NonNull private final LatencyTracker mLatencyTracker; @VisibleForTesting @NonNull final BiometricDisplayListener mOrientationListener; @VisibleForTesting @NonNull final BiometricDisplayListener mOrientationListener; @NonNull private final ActivityLaunchAnimator mActivityLaunchAnimator; @NonNull private final ActivityLaunchAnimator mActivityLaunchAnimator; @NonNull private final BouncerInteractor mBouncerInteractor; @NonNull private final PrimaryBouncerInteractor mPrimaryBouncerInteractor; // Currently the UdfpsController supports a single UDFPS sensor. If devices have multiple // Currently the UdfpsController supports a single UDFPS sensor. If devices have multiple // sensors, this, in addition to a lot of the code here, will be updated. // sensors, this, in addition to a lot of the code here, will be updated. Loading Loading @@ -235,7 +235,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { mUdfpsDisplayMode, requestId, reason, callback, mUdfpsDisplayMode, requestId, reason, callback, (view, event, fromUdfpsView) -> onTouch(requestId, event, (view, event, fromUdfpsView) -> onTouch(requestId, event, fromUdfpsView), mActivityLaunchAnimator, mFeatureFlags, fromUdfpsView), mActivityLaunchAnimator, mFeatureFlags, mBouncerInteractor))); mPrimaryBouncerInteractor))); } } @Override @Override Loading Loading @@ -354,14 +354,14 @@ public class UdfpsController implements DozeReceiver, Dumpable { if (!mOverlayParams.equals(overlayParams)) { if (!mOverlayParams.equals(overlayParams)) { mOverlayParams = overlayParams; mOverlayParams = overlayParams; final boolean wasShowingAltAuth = mKeyguardViewManager.isShowingAlternateAuth(); final boolean wasShowingAltAuth = mKeyguardViewManager.isShowingAlternateBouncer(); // When the bounds change it's always necessary to re-create the overlay's window with // When the bounds change it's always necessary to re-create the overlay's window with // new LayoutParams. If the overlay needs to be shown, this will re-create and show the // new LayoutParams. If the overlay needs to be shown, this will re-create and show the // overlay with the updated LayoutParams. Otherwise, the overlay will remain hidden. // overlay with the updated LayoutParams. Otherwise, the overlay will remain hidden. redrawOverlay(); redrawOverlay(); if (wasShowingAltAuth) { if (wasShowingAltAuth) { mKeyguardViewManager.showGenericBouncer(true); mKeyguardViewManager.showBouncer(true); } } } } } } Loading Loading @@ -660,7 +660,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { @NonNull ActivityLaunchAnimator activityLaunchAnimator, @NonNull ActivityLaunchAnimator activityLaunchAnimator, @NonNull Optional<AlternateUdfpsTouchProvider> alternateTouchProvider, @NonNull Optional<AlternateUdfpsTouchProvider> alternateTouchProvider, @NonNull @BiometricsBackground Executor biometricsExecutor, @NonNull @BiometricsBackground Executor biometricsExecutor, @NonNull BouncerInteractor bouncerInteractor) { @NonNull PrimaryBouncerInteractor primaryBouncerInteractor) { mContext = context; mContext = context; mExecution = execution; mExecution = execution; mVibrator = vibrator; mVibrator = vibrator; Loading Loading @@ -699,7 +699,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { false /* resetLockoutRequiresHardwareAuthToken */); false /* resetLockoutRequiresHardwareAuthToken */); mBiometricExecutor = biometricsExecutor; mBiometricExecutor = biometricsExecutor; mBouncerInteractor = bouncerInteractor; mPrimaryBouncerInteractor = primaryBouncerInteractor; mDumpManager.registerDumpable(TAG, this); mDumpManager.registerDumpable(TAG, this); Loading Loading @@ -791,8 +791,8 @@ public class UdfpsController implements DozeReceiver, Dumpable { onFingerUp(mOverlay.getRequestId(), oldView); onFingerUp(mOverlay.getRequestId(), oldView); } } final boolean removed = mOverlay.hide(); final boolean removed = mOverlay.hide(); if (mKeyguardViewManager.isShowingAlternateAuth()) { if (mKeyguardViewManager.isShowingAlternateBouncer()) { mKeyguardViewManager.resetAlternateAuth(true); mKeyguardViewManager.hideAlternateBouncer(true); } } Log.v(TAG, "hideUdfpsOverlay | removing window: " + removed); Log.v(TAG, "hideUdfpsOverlay | removing window: " + removed); } else { } else { Loading Loading @@ -832,7 +832,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { Log.v(TAG, "aod lock icon long-press rejected by the falsing manager."); Log.v(TAG, "aod lock icon long-press rejected by the falsing manager."); return; return; } } mKeyguardViewManager.showBouncer(true); mKeyguardViewManager.showPrimaryBouncer(true); // play the same haptic as the LockIconViewController longpress // play the same haptic as the LockIconViewController longpress mVibrator.vibrate( mVibrator.vibrate( Loading