diff options
3 files changed, 15 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java index 7c4b0427f1ba..014093de62bd 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java @@ -985,6 +985,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump // Make sure the clock is in the correct position after the unlock animation // so that it's not in the wrong place when we show the keyguard again. positionClockAndNotifications(true /* forceClockUpdate */); + mScrimController.onUnlockAnimationFinished(); } private void unlockAnimationStarted( diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java index fc661384146c..62a8cfde80da 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java @@ -709,6 +709,11 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump } } + public void onUnlockAnimationFinished() { + mAnimatingPanelExpansionOnUnlock = false; + applyAndDispatchState(); + } + /** * Set the amount of progress we are currently in if we're transitioning to the full shade. * 0.0f means we're not transitioning yet, while 1 means we're all the way in the full diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java index 0dc1d9a4b177..6b3bd22d5e62 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java @@ -1802,6 +1802,15 @@ public class ScrimControllerTest extends SysuiTestCase { assertFalse(ScrimState.UNLOCKED.mAnimateChange); } + @Test + public void testNotifScrimAlpha_1f_afterUnlockFinishedAndExpanded() { + mScrimController.transitionTo(ScrimState.KEYGUARD); + when(mKeyguardUnlockAnimationController.isPlayingCannedUnlockAnimation()).thenReturn(true); + mScrimController.transitionTo(ScrimState.UNLOCKED); + mScrimController.onUnlockAnimationFinished(); + assertAlphaAfterExpansion(mNotificationsScrim, 1f, 1f); + } + private void assertAlphaAfterExpansion(ScrimView scrim, float expectedAlpha, float expansion) { mScrimController.setRawPanelExpansionFraction(expansion); finishAnimationsImmediately(); |