Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +32 −3 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange private boolean mPulsing; private boolean mDozing; private boolean mDocked; private boolean mBlockUpdates; private int mIconColor; private float mDozeAmount; private boolean mBouncerShowingScrimmed; Loading @@ -107,8 +108,22 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange new KeyguardMonitor.Callback() { @Override public void onKeyguardShowingChanged() { boolean force = false; boolean wasShowing = mKeyguardShowing; mKeyguardShowing = mKeyguardMonitor.isShowing(); update(); if (!wasShowing && mKeyguardShowing && mBlockUpdates) { mBlockUpdates = false; force = true; } update(force); } @Override public void onKeyguardFadingAwayChanged() { if (!mKeyguardMonitor.isKeyguardFadingAway() && mBlockUpdates) { mBlockUpdates = false; update(true /* force */); } } }; private final DockManager.DockEventListener mDockEventListener = Loading Loading @@ -261,7 +276,11 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange mIsFaceUnlockState = state == STATE_SCANNING_FACE; mLastState = state; if (lastState != state || mForceUpdate) { boolean shouldUpdate = lastState != state || mForceUpdate; if (mBlockUpdates && canBlockUpdates()) { shouldUpdate = false; } if (shouldUpdate) { mForceUpdate = false; @LockAnimIndex final int lockAnimIndex = getAnimationIndexForTransition(lastState, state, mPulsing, mDozing); Loading Loading @@ -330,6 +349,10 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange return true; } private boolean canBlockUpdates() { return mKeyguardShowing || mKeyguardMonitor.isKeyguardFadingAway(); } private void updateClickability() { if (mAccessibilityController == null) { return; Loading Loading @@ -536,11 +559,17 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange /** * We need to hide the lock whenever there's a fingerprint unlock, otherwise you'll see the * icon on top of the black front scrim. * @param wakeAndUnlock are we wake and unlocking * @param isUnlock are we currently unlocking */ public void onBiometricAuthModeChanged(boolean wakeAndUnlock) { public void onBiometricAuthModeChanged(boolean wakeAndUnlock, boolean isUnlock) { if (wakeAndUnlock) { mWakeAndUnlockRunning = true; } if (isUnlock && mBypassController.getBypassEnabled() && canBlockUpdates()) { // We don't want the icon to change while we are unlocking mBlockUpdates = true; } update(); } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +2 −1 Original line number Diff line number Diff line Loading @@ -3834,7 +3834,8 @@ public class StatusBar extends SystemUI implements DemoMode, public void notifyBiometricAuthModeChanged() { updateDozing(); updateScrimController(); mStatusBarWindow.onBiometricAuthModeChanged(mBiometricUnlockController.isWakeAndUnlock()); mStatusBarWindow.onBiometricAuthModeChanged(mBiometricUnlockController.isWakeAndUnlock(), mBiometricUnlockController.isBiometricUnlock()); } @VisibleForTesting Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -814,7 +814,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb */ public boolean shouldSubtleWindowAnimationsForUnlock() { return mStatusBar.mKeyguardBypassController.getBypassEnabled() && mStatusBar.mState == StatusBarState.KEYGUARD; && mStatusBar.mState == StatusBarState.KEYGUARD && !mBouncer.isAnimatingAway(); } public boolean isGoingToNotificationShade() { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java +3 −2 Original line number Diff line number Diff line Loading @@ -272,10 +272,11 @@ public class StatusBarWindowView extends FrameLayout { /** * Called when the biometric authentication mode changes. * @param wakeAndUnlock If the type is {@link BiometricUnlockController#isWakeAndUnlock()} * @param isUnlock If the type is {@link BiometricUnlockController#isBiometricUnlock()} () */ public void onBiometricAuthModeChanged(boolean wakeAndUnlock) { public void onBiometricAuthModeChanged(boolean wakeAndUnlock, boolean isUnlock) { if (mLockIcon != null) { mLockIcon.onBiometricAuthModeChanged(wakeAndUnlock); mLockIcon.onBiometricAuthModeChanged(wakeAndUnlock, isUnlock); } } Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardMonitor.java +1 −0 Original line number Diff line number Diff line Loading @@ -50,5 +50,6 @@ public interface KeyguardMonitor extends CallbackController<Callback> { interface Callback { void onKeyguardShowingChanged(); default void onKeyguardFadingAwayChanged() {} } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +32 −3 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange private boolean mPulsing; private boolean mDozing; private boolean mDocked; private boolean mBlockUpdates; private int mIconColor; private float mDozeAmount; private boolean mBouncerShowingScrimmed; Loading @@ -107,8 +108,22 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange new KeyguardMonitor.Callback() { @Override public void onKeyguardShowingChanged() { boolean force = false; boolean wasShowing = mKeyguardShowing; mKeyguardShowing = mKeyguardMonitor.isShowing(); update(); if (!wasShowing && mKeyguardShowing && mBlockUpdates) { mBlockUpdates = false; force = true; } update(force); } @Override public void onKeyguardFadingAwayChanged() { if (!mKeyguardMonitor.isKeyguardFadingAway() && mBlockUpdates) { mBlockUpdates = false; update(true /* force */); } } }; private final DockManager.DockEventListener mDockEventListener = Loading Loading @@ -261,7 +276,11 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange mIsFaceUnlockState = state == STATE_SCANNING_FACE; mLastState = state; if (lastState != state || mForceUpdate) { boolean shouldUpdate = lastState != state || mForceUpdate; if (mBlockUpdates && canBlockUpdates()) { shouldUpdate = false; } if (shouldUpdate) { mForceUpdate = false; @LockAnimIndex final int lockAnimIndex = getAnimationIndexForTransition(lastState, state, mPulsing, mDozing); Loading Loading @@ -330,6 +349,10 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange return true; } private boolean canBlockUpdates() { return mKeyguardShowing || mKeyguardMonitor.isKeyguardFadingAway(); } private void updateClickability() { if (mAccessibilityController == null) { return; Loading Loading @@ -536,11 +559,17 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange /** * We need to hide the lock whenever there's a fingerprint unlock, otherwise you'll see the * icon on top of the black front scrim. * @param wakeAndUnlock are we wake and unlocking * @param isUnlock are we currently unlocking */ public void onBiometricAuthModeChanged(boolean wakeAndUnlock) { public void onBiometricAuthModeChanged(boolean wakeAndUnlock, boolean isUnlock) { if (wakeAndUnlock) { mWakeAndUnlockRunning = true; } if (isUnlock && mBypassController.getBypassEnabled() && canBlockUpdates()) { // We don't want the icon to change while we are unlocking mBlockUpdates = true; } update(); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +2 −1 Original line number Diff line number Diff line Loading @@ -3834,7 +3834,8 @@ public class StatusBar extends SystemUI implements DemoMode, public void notifyBiometricAuthModeChanged() { updateDozing(); updateScrimController(); mStatusBarWindow.onBiometricAuthModeChanged(mBiometricUnlockController.isWakeAndUnlock()); mStatusBarWindow.onBiometricAuthModeChanged(mBiometricUnlockController.isWakeAndUnlock(), mBiometricUnlockController.isBiometricUnlock()); } @VisibleForTesting Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -814,7 +814,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb */ public boolean shouldSubtleWindowAnimationsForUnlock() { return mStatusBar.mKeyguardBypassController.getBypassEnabled() && mStatusBar.mState == StatusBarState.KEYGUARD; && mStatusBar.mState == StatusBarState.KEYGUARD && !mBouncer.isAnimatingAway(); } public boolean isGoingToNotificationShade() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java +3 −2 Original line number Diff line number Diff line Loading @@ -272,10 +272,11 @@ public class StatusBarWindowView extends FrameLayout { /** * Called when the biometric authentication mode changes. * @param wakeAndUnlock If the type is {@link BiometricUnlockController#isWakeAndUnlock()} * @param isUnlock If the type is {@link BiometricUnlockController#isBiometricUnlock()} () */ public void onBiometricAuthModeChanged(boolean wakeAndUnlock) { public void onBiometricAuthModeChanged(boolean wakeAndUnlock, boolean isUnlock) { if (mLockIcon != null) { mLockIcon.onBiometricAuthModeChanged(wakeAndUnlock); mLockIcon.onBiometricAuthModeChanged(wakeAndUnlock, isUnlock); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyguardMonitor.java +1 −0 Original line number Diff line number Diff line Loading @@ -50,5 +50,6 @@ public interface KeyguardMonitor extends CallbackController<Callback> { interface Callback { void onKeyguardShowingChanged(); default void onKeyguardFadingAwayChanged() {} } }