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

Commit 5eb76b83 authored by William Leshner's avatar William Leshner Committed by Automerger Merge Worker
Browse files

Merge "Animate status bar alpha during dream<->lockscreen transitions." into...

Merge "Animate status bar alpha during dream<->lockscreen transitions." into udc-qpr-dev am: 2200a336 am: f0966e65

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



Change-Id: I6fb2ea647cae8d025acba9a708475e6f2426e6ae
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 494b1b13 f0966e65
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -1117,7 +1117,8 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        collectFlow(mView, mKeyguardTransitionInteractor.getDreamingToLockscreenTransition(),
                mDreamingToLockscreenTransition, mMainDispatcher);
        collectFlow(mView, mDreamingToLockscreenTransitionViewModel.getLockscreenAlpha(),
                setTransitionAlpha(mNotificationStackScrollLayoutController), mMainDispatcher);
                setDreamLockscreenTransitionAlpha(mNotificationStackScrollLayoutController),
                mMainDispatcher);
        collectFlow(mView, mDreamingToLockscreenTransitionViewModel.lockscreenTranslationY(
                mDreamingToLockscreenTransitionTranslationY),
                setTransitionY(mNotificationStackScrollLayoutController), mMainDispatcher);
@@ -1153,7 +1154,8 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        collectFlow(mView, mKeyguardTransitionInteractor.getLockscreenToDreamingTransition(),
                mLockscreenToDreamingTransition, mMainDispatcher);
        collectFlow(mView, mLockscreenToDreamingTransitionViewModel.getLockscreenAlpha(),
                setTransitionAlpha(mNotificationStackScrollLayoutController), mMainDispatcher);
                setDreamLockscreenTransitionAlpha(mNotificationStackScrollLayoutController),
                mMainDispatcher);
        collectFlow(mView, mLockscreenToDreamingTransitionViewModel.lockscreenTranslationY(
                mLockscreenToDreamingTransitionTranslationY),
                setTransitionY(mNotificationStackScrollLayoutController), mMainDispatcher);
@@ -4742,6 +4744,16 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
        mCurrentPanelState = state;
    }

    private Consumer<Float> setDreamLockscreenTransitionAlpha(
            NotificationStackScrollLayoutController stackScroller) {
        return (Float alpha) -> {
            // Also animate the status bar's alpha during transitions between the lockscreen and
            // dreams.
            mKeyguardStatusBarViewController.setAlpha(alpha);
            setTransitionAlpha(stackScroller).accept(alpha);
        };
    }

    private Consumer<Float> setTransitionAlpha(
            NotificationStackScrollLayoutController stackScroller) {
        return (Float alpha) -> {