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

Commit 592c04ab authored by Jeff DeCew's avatar Jeff DeCew Committed by Android (Google) Code Review
Browse files

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

parents 35fbd3d9 33c2ef5f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1662,8 +1662,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));
    }