}
/**
+ * Successful authentication with fingerprint, face, or iris when the lockscreen fades away
+ */
+ public boolean isUnlockFading() {
+ return mMode == MODE_UNLOCK_FADING;
+ }
+
+ /**
* Translates biometric source type for logging purpose.
*/
private int toSubtype(BiometricSourceType biometricSourceType) {
pw.print(" qSExpanded: "); pw.println(qSExpanded)
pw.print(" bouncerShowing: "); pw.println(bouncerShowing)
}
+
+ companion object {
+ const val BYPASS_PANEL_FADE_DURATION = 67
+ }
}
}
}
+ public void setUnlockIsFading(boolean unlockFading) {
+ for (ScrimState state : ScrimState.values()) {
+ state.setUnlockIsFading(unlockFading);
+ }
+ }
+
public void setLaunchingAffordanceWithPreview(boolean launchingAffordanceWithPreview) {
for (ScrimState state : ScrimState.values()) {
state.setLaunchingAffordanceWithPreview(launchingAffordanceWithPreview);
public void prepare(ScrimState previousState) {
mCurrentBehindAlpha = 0;
mCurrentInFrontAlpha = 0;
- mAnimationDuration = StatusBar.FADE_KEYGUARD_DURATION;
+ mAnimationDuration = mUnlockIsFading
+ ? KeyguardBypassController.BYPASS_PANEL_FADE_DURATION
+ : StatusBar.FADE_KEYGUARD_DURATION;
mAnimateChange = !mLaunchingAffordanceWithPreview;
if (previousState == ScrimState.AOD) {
boolean mHasBackdrop;
boolean mLaunchingAffordanceWithPreview;
boolean mWakeLockScreenSensorActive;
+ boolean mUnlockIsFading;
ScrimState(int index) {
mIndex = index;
public void setWakeLockScreenSensorActive(boolean active) {
mWakeLockScreenSensorActive = active;
}
+
+ public void setUnlockIsFading(boolean unlockIsFading) {
+ mUnlockIsFading = unlockIsFading;
+ }
}
\ No newline at end of file
public void notifyBiometricAuthModeChanged() {
updateDozing();
+ mScrimController.setUnlockIsFading(mBiometricUnlockController.isUnlockFading());
updateScrimController();
mStatusBarWindow.onBiometricAuthModeChanged(mBiometricUnlockController.isWakeAndUnlock(),
mBiometricUnlockController.isBiometricUnlock());
// We don't want to end up in KEYGUARD state when we're unlocking with
// fingerprint from doze. We should cross fade directly from black.
- boolean wakeAndUnlocking = mBiometricUnlockController.isWakeAndUnlock();
+ boolean unlocking = mBiometricUnlockController.isWakeAndUnlock()
+ || mKeyguardMonitor.isKeyguardFadingAway();
// Do not animate the scrim expansion when triggered by the fingerprint sensor.
mScrimController.setExpansionAffectsAlpha(
} else if (isPulsing()) {
mScrimController.transitionTo(ScrimState.PULSING,
mDozeScrimController.getScrimCallback());
- } else if (mDozing && !wakeAndUnlocking) {
+ } else if (mDozing && !unlocking) {
mScrimController.transitionTo(ScrimState.AOD);
- } else if (mIsKeyguard && !wakeAndUnlocking) {
+ } else if (mIsKeyguard && !unlocking) {
mScrimController.transitionTo(ScrimState.KEYGUARD);
} else if (mBubbleController.isStackExpanded()) {
mScrimController.transitionTo(ScrimState.BUBBLE_EXPANDED);
// make everything a bit slower to bridge a gap until the user is unlocked and home screen has
// dranw its first frame.
private static final long KEYGUARD_DISMISS_DURATION_LOCKED = 2000;
- private static final long BYPASS_PANEL_FADE_DURATION = 67;
private static String TAG = "StatusBarKeyguardViewManager";
boolean keyguardWithoutQs = mStatusBarStateController.getState() == StatusBarState.KEYGUARD
&& !mNotificationPanelView.isQsExpanded();
boolean lockVisible = (mBouncer.isShowing() || keyguardWithoutQs)
- && !mBouncer.isAnimatingAway();
+ && !mBouncer.isAnimatingAway() && !mKeyguardMonitor.isKeyguardFadingAway();
if (mLastLockVisible != lockVisible) {
mLastLockVisible = lockVisible;
AppearAnimationUtils.DEFAULT_APPEAR_DURATION /* duration */,
0 /* delay */);
} else {
+ final long duration;
+ if (needsBypassFading()) {
+ duration = KeyguardBypassController.BYPASS_PANEL_FADE_DURATION;
+ } else {
+ duration = AppearAnimationUtils.DEFAULT_APPEAR_DURATION / 2;
+ }
CrossFadeHelper.fadeOut(mLockIconContainer,
- AppearAnimationUtils.DEFAULT_APPEAR_DURATION / 2 /* duration */,
+ duration /* duration */,
0 /* delay */, null /* runnable */);
}
}
if (needsBypassFading()) {
ViewGroupFadeHelper.fadeOutAllChildrenExcept(mNotificationPanelView,
mNotificationContainer,
- BYPASS_PANEL_FADE_DURATION,
+ KeyguardBypassController.BYPASS_PANEL_FADE_DURATION,
() -> {
mStatusBar.hideKeyguard();
onKeyguardFadedAway();
if (needsBypassFading()) {
ViewGroupFadeHelper.fadeOutAllChildrenExcept(mNotificationPanelView,
mNotificationContainer,
- BYPASS_PANEL_FADE_DURATION,
+ KeyguardBypassController.BYPASS_PANEL_FADE_DURATION,
() -> {
mStatusBar.hideKeyguard();
});
mBiometricUnlockController.finishKeyguardFadingAway();
}
}
+ updateLockIcon();
updateStates();
mStatusBarWindowController.setKeyguardShowing(false);
mViewMediatorCallback.keyguardGone();