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 Original line Diff line number Diff line
@@ -1662,8 +1662,9 @@ public class NotificationStackScrollLayoutController {


    @VisibleForTesting
    @VisibleForTesting
    void onKeyguardTransitionChanged(TransitionStep transitionStep) {
    void onKeyguardTransitionChanged(TransitionStep transitionStep) {
        boolean isTransitionToAod = transitionStep.getFrom().equals(KeyguardState.GONE)
        boolean isTransitionToAod = transitionStep.getTo().equals(KeyguardState.AOD)
                && transitionStep.getTo().equals(KeyguardState.AOD);
                && (transitionStep.getFrom().equals(KeyguardState.GONE)
                || transitionStep.getFrom().equals(KeyguardState.OCCLUDED));
        if (mIsInTransitionToAod != isTransitionToAod) {
        if (mIsInTransitionToAod != isTransitionToAod) {
            mIsInTransitionToAod = isTransitionToAod;
            mIsInTransitionToAod = isTransitionToAod;
            updateShowEmptyShadeView();
            updateShowEmptyShadeView();
+10 −0
Original line number Original line Diff line number Diff line
@@ -628,6 +628,16 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase {
        verify(mNotificationStackScrollLayout).updateEmptyShadeView(eq(false), anyBoolean());
        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) {
    private LogMaker logMatcher(int category, int type) {
        return argThat(new LogMatcher(category, type));
        return argThat(new LogMatcher(category, type));
    }
    }