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

Commit 0cbbd69f authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Notify ScrimController when unlock finishes, so we can update relevant...

Merge "Notify ScrimController when unlock finishes, so we can update relevant conditions." into udc-qpr-dev am: 9fb045d6

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



Change-Id: I843bb69e51431b9f39167e5ec11d39f1b029a9db
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f91bd5dd 9fb045d6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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(
+5 −0
Original line number Diff line number Diff line
@@ -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
+9 −0
Original line number Diff line number Diff line
@@ -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();