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

Commit 96fe7f89 authored by Jeff DeCew's avatar Jeff DeCew Committed by Automerger Merge Worker
Browse files

Merge "Hide EmptyShadeView during OCCLUDED->AOD transition" into udc-qpr-dev...

Merge "Hide EmptyShadeView during OCCLUDED->AOD transition" into udc-qpr-dev am: 592c04ab am: fb2aaf9d

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



Change-Id: I8d25a657323f62510bb387e58892503f8a12651b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 8012b479 fb2aaf9d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1659,8 +1659,9 @@ public class NotificationStackScrollLayoutController {

    @VisibleForTesting
    void onKeyguardTransitionChanged(TransitionStep transitionStep) {
        boolean isTransitionToAod = transitionStep.getFrom().equals(KeyguardState.GONE)
                && transitionStep.getTo().equals(KeyguardState.AOD);
        boolean isTransitionToAod = transitionStep.getTo().equals(KeyguardState.AOD)
                && (transitionStep.getFrom().equals(KeyguardState.GONE)
                || transitionStep.getFrom().equals(KeyguardState.OCCLUDED));
        if (mIsInTransitionToAod != isTransitionToAod) {
            mIsInTransitionToAod = isTransitionToAod;
            updateShowEmptyShadeView();
+10 −0
Original line number Diff line number Diff line
@@ -628,6 +628,16 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase {
        verify(mNotificationStackScrollLayout).updateEmptyShadeView(eq(false), anyBoolean());
    }

    @Test
    public void updateEmptyShadeView_onKeyguardOccludedTransitionToAod_hidesView() {
        initController(/* viewIsAttached= */ true);
        mController.onKeyguardTransitionChanged(
                new TransitionStep(
                        /* from= */ KeyguardState.OCCLUDED,
                        /* to= */ KeyguardState.AOD));
        verify(mNotificationStackScrollLayout).updateEmptyShadeView(eq(false), anyBoolean());
    }

    private LogMaker logMatcher(int category, int type) {
        return argThat(new LogMatcher(category, type));
    }