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

Commit a70b1528 authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

Fix test failures when footer flag is enabled.

Bug: 293167744
Test: atest SystemUITests with the flag enabled
Flag: ACONFIG com.systemui.notifications_footer_view_refactor DEVELOPMENT
Change-Id: Ic85c83acf31f3bb8d7496685e2c39c12f4cb20ba
parent e1dd3e3f
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -4455,10 +4455,14 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable


        mSectionsManager.setHeaderForegroundColors(onSurface, onSurfaceVariant);
        mSectionsManager.setHeaderForegroundColors(onSurface, onSurfaceVariant);


        if (mFooterView != null) {
            mFooterView.updateColors();
            mFooterView.updateColors();
        }


        if (mEmptyShadeView != null) {
            mEmptyShadeView.setTextColors(onSurface, onSurfaceVariant);
            mEmptyShadeView.setTextColors(onSurface, onSurfaceVariant);
        }
        }
    }


    void goToFullShade(long delay) {
    void goToFullShade(long delay) {
        mGoToFullShadeNeedsAnimation = true;
        mGoToFullShadeNeedsAnimation = true;
+3 −3
Original line number Original line Diff line number Diff line
@@ -23,8 +23,6 @@ import static com.android.systemui.dump.LogBufferHelperKt.logcatLogBuffer;


import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertThat;


import static kotlinx.coroutines.flow.FlowKt.emptyFlow;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyFloat;
import static org.mockito.ArgumentMatchers.anyFloat;
@@ -39,6 +37,8 @@ import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.when;


import static kotlinx.coroutines.flow.FlowKt.emptyFlow;

import android.annotation.IdRes;
import android.annotation.IdRes;
import android.content.ContentResolver;
import android.content.ContentResolver;
import android.content.res.Configuration;
import android.content.res.Configuration;
@@ -341,7 +341,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
    @Mock private JavaAdapter mJavaAdapter;
    @Mock private JavaAdapter mJavaAdapter;
    @Mock private CastController mCastController;
    @Mock private CastController mCastController;
    @Mock private SharedNotificationContainerInteractor mSharedNotificationContainerInteractor;
    @Mock private SharedNotificationContainerInteractor mSharedNotificationContainerInteractor;
    @Mock private ActiveNotificationsInteractor mActiveNotificationsInteractor;
    @Mock protected ActiveNotificationsInteractor mActiveNotificationsInteractor;
    @Mock private KeyguardClockPositionAlgorithm mKeyguardClockPositionAlgorithm;
    @Mock private KeyguardClockPositionAlgorithm mKeyguardClockPositionAlgorithm;
    @Mock private NaturalScrollingSettingObserver mNaturalScrollingSettingObserver;
    @Mock private NaturalScrollingSettingObserver mNaturalScrollingSettingObserver;


+26 −0
Original line number Original line Diff line number Diff line
@@ -456,11 +456,13 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);


        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        mNotificationPanelViewController.updateResources();
        mNotificationPanelViewController.updateResources();
        assertThat(getConstraintSetLayout(R.id.keyguard_status_view).endToEnd)
        assertThat(getConstraintSetLayout(R.id.keyguard_status_view).endToEnd)
                .isEqualTo(R.id.qs_edge_guideline);
                .isEqualTo(R.id.qs_edge_guideline);


        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(false);
        mNotificationPanelViewController.updateResources();
        mNotificationPanelViewController.updateResources();
        assertThat(getConstraintSetLayout(R.id.keyguard_status_view).endToEnd)
        assertThat(getConstraintSetLayout(R.id.keyguard_status_view).endToEnd)
                .isEqualTo(ConstraintSet.PARENT_ID);
                .isEqualTo(ConstraintSet.PARENT_ID);
@@ -469,6 +471,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    @Test
    @Test
    public void keyguardStatusView_splitShade_dozing_alwaysDozingOn_isCentered() {
    public void keyguardStatusView_splitShade_dozing_alwaysDozingOn_isCentered() {
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        mStatusBarStateController.setState(KEYGUARD);
        mStatusBarStateController.setState(KEYGUARD);
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);


@@ -480,6 +483,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    @Test
    @Test
    public void keyguardStatusView_splitShade_dozing_alwaysDozingOff_isNotCentered() {
    public void keyguardStatusView_splitShade_dozing_alwaysDozingOff_isNotCentered() {
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        mStatusBarStateController.setState(KEYGUARD);
        mStatusBarStateController.setState(KEYGUARD);
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);


@@ -491,6 +495,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    @Test
    @Test
    public void keyguardStatusView_splitShade_notDozing_alwaysDozingOn_isNotCentered() {
    public void keyguardStatusView_splitShade_notDozing_alwaysDozingOn_isNotCentered() {
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        mStatusBarStateController.setState(KEYGUARD);
        mStatusBarStateController.setState(KEYGUARD);
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);


@@ -502,6 +507,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    @Test
    @Test
    public void keyguardStatusView_splitShade_pulsing_isNotCentered() {
    public void keyguardStatusView_splitShade_pulsing_isNotCentered() {
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        when(mNotificationListContainer.hasPulsingNotifications()).thenReturn(true);
        when(mNotificationListContainer.hasPulsingNotifications()).thenReturn(true);
        mStatusBarStateController.setState(KEYGUARD);
        mStatusBarStateController.setState(KEYGUARD);
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);
@@ -514,6 +520,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    @Test
    @Test
    public void keyguardStatusView_splitShade_notPulsing_isNotCentered() {
    public void keyguardStatusView_splitShade_notPulsing_isNotCentered() {
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        when(mNotificationListContainer.hasPulsingNotifications()).thenReturn(false);
        when(mNotificationListContainer.hasPulsingNotifications()).thenReturn(false);
        mStatusBarStateController.setState(KEYGUARD);
        mStatusBarStateController.setState(KEYGUARD);
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);
@@ -529,6 +536,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
        // The conditions below would make the clock NOT be centered on split shade.
        // The conditions below would make the clock NOT be centered on split shade.
        // On single shade it should always be centered though.
        // On single shade it should always be centered though.
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        when(mNotificationListContainer.hasPulsingNotifications()).thenReturn(false);
        when(mNotificationListContainer.hasPulsingNotifications()).thenReturn(false);
        mStatusBarStateController.setState(KEYGUARD);
        mStatusBarStateController.setState(KEYGUARD);
        setDozing(/* dozing= */ false, /* dozingAlwaysOn= */ false);
        setDozing(/* dozing= */ false, /* dozingAlwaysOn= */ false);
@@ -539,6 +547,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    @Test
    @Test
    public void keyguardStatusView_willPlayDelayedDoze_isCentered_thenNot() {
    public void keyguardStatusView_willPlayDelayedDoze_isCentered_thenNot() {
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        mStatusBarStateController.setState(KEYGUARD);
        mStatusBarStateController.setState(KEYGUARD);
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);


@@ -553,6 +562,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    @Test
    @Test
    public void keyguardStatusView_willPlayDelayedDoze_notifiesKeyguardMediaController() {
    public void keyguardStatusView_willPlayDelayedDoze_notifiesKeyguardMediaController() {
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        mStatusBarStateController.setState(KEYGUARD);
        mStatusBarStateController.setState(KEYGUARD);
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);


@@ -564,6 +574,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    @Test
    @Test
    public void keyguardStatusView_willPlayDelayedDoze_isCentered_thenStillCenteredIfNoNotifs() {
    public void keyguardStatusView_willPlayDelayedDoze_isCentered_thenStillCenteredIfNoNotifs() {
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(false);
        mStatusBarStateController.setState(KEYGUARD);
        mStatusBarStateController.setState(KEYGUARD);
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);


@@ -700,10 +711,12 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
        mStatusBarStateController.setState(KEYGUARD);
        mStatusBarStateController.setState(KEYGUARD);


        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(false);
        triggerPositionClockAndNotifications();
        triggerPositionClockAndNotifications();
        verify(mKeyguardStatusViewController).displayClock(LARGE, /* animate */ true);
        verify(mKeyguardStatusViewController).displayClock(LARGE, /* animate */ true);


        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(1);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(1);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        triggerPositionClockAndNotifications();
        triggerPositionClockAndNotifications();
        verify(mKeyguardStatusViewController).displayClock(SMALL, /* animate */ true);
        verify(mKeyguardStatusViewController).displayClock(SMALL, /* animate */ true);
    }
    }
@@ -715,10 +728,12 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
        clearInvocations(mKeyguardStatusViewController);
        clearInvocations(mKeyguardStatusViewController);


        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(false);
        triggerPositionClockAndNotifications();
        triggerPositionClockAndNotifications();
        verify(mKeyguardStatusViewController).displayClock(LARGE, /* animate */ true);
        verify(mKeyguardStatusViewController).displayClock(LARGE, /* animate */ true);


        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(1);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(1);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        triggerPositionClockAndNotifications();
        triggerPositionClockAndNotifications();
        verify(mKeyguardStatusViewController, times(2))
        verify(mKeyguardStatusViewController, times(2))
                .displayClock(LARGE, /* animate */ true);
                .displayClock(LARGE, /* animate */ true);
@@ -730,6 +745,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    public void testHasNotifications_switchesToLargeClockWhenEnteringSplitShade() {
    public void testHasNotifications_switchesToLargeClockWhenEnteringSplitShade() {
        mStatusBarStateController.setState(KEYGUARD);
        mStatusBarStateController.setState(KEYGUARD);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(1);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(1);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);


        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);


@@ -740,6 +756,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
    public void testNoNotifications_switchesToLargeClockWhenEnteringSplitShade() {
    public void testNoNotifications_switchesToLargeClockWhenEnteringSplitShade() {
        mStatusBarStateController.setState(KEYGUARD);
        mStatusBarStateController.setState(KEYGUARD);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(false);


        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);


@@ -752,6 +769,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);
        clearInvocations(mKeyguardStatusViewController);
        clearInvocations(mKeyguardStatusViewController);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(1);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(1);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);


        enableSplitShade(/* enabled= */ false);
        enableSplitShade(/* enabled= */ false);


@@ -764,6 +782,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);
        clearInvocations(mKeyguardStatusViewController);
        clearInvocations(mKeyguardStatusViewController);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(false);


        enableSplitShade(/* enabled= */ false);
        enableSplitShade(/* enabled= */ false);


@@ -777,6 +796,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);
        when(mMediaDataManager.hasActiveMediaOrRecommendation()).thenReturn(true);
        when(mMediaDataManager.hasActiveMediaOrRecommendation()).thenReturn(true);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        clearInvocations(mKeyguardStatusViewController);
        clearInvocations(mKeyguardStatusViewController);


        mNotificationPanelViewController.setDozing(/* dozing= */ true, /* animate= */ false);
        mNotificationPanelViewController.setDozing(/* dozing= */ true, /* animate= */ false);
@@ -791,6 +811,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);
        when(mMediaDataManager.hasActiveMediaOrRecommendation()).thenReturn(true);
        when(mMediaDataManager.hasActiveMediaOrRecommendation()).thenReturn(true);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        clearInvocations(mKeyguardStatusViewController);
        clearInvocations(mKeyguardStatusViewController);


        mNotificationPanelViewController.setDozing(/* dozing= */ true, /* animate= */ false);
        mNotificationPanelViewController.setDozing(/* dozing= */ true, /* animate= */ false);
@@ -847,6 +868,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
        clearInvocations(mKeyguardStatusViewController);
        clearInvocations(mKeyguardStatusViewController);
        when(mMediaDataManager.hasActiveMedia()).thenReturn(true);
        when(mMediaDataManager.hasActiveMedia()).thenReturn(true);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);


        mNotificationPanelViewController.setDozing(true, false);
        mNotificationPanelViewController.setDozing(true, false);


@@ -863,6 +885,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
        when(mResources.getBoolean(R.bool.force_small_clock_on_lockscreen)).thenReturn(true);
        when(mResources.getBoolean(R.bool.force_small_clock_on_lockscreen)).thenReturn(true);
        when(mMediaDataManager.hasActiveMedia()).thenReturn(false);
        when(mMediaDataManager.hasActiveMedia()).thenReturn(false);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(false);
        clearInvocations(mKeyguardStatusViewController);
        clearInvocations(mKeyguardStatusViewController);


        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);
@@ -881,6 +904,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
        when(mResources.getBoolean(R.bool.force_small_clock_on_lockscreen)).thenReturn(true);
        when(mResources.getBoolean(R.bool.force_small_clock_on_lockscreen)).thenReturn(true);
        when(mMediaDataManager.hasActiveMedia()).thenReturn(false);
        when(mMediaDataManager.hasActiveMedia()).thenReturn(false);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(false);
        clearInvocations(mKeyguardStatusViewController);
        clearInvocations(mKeyguardStatusViewController);


        enableSplitShade(/* enabled= */ true);
        enableSplitShade(/* enabled= */ true);
@@ -898,11 +922,13 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo


        // one notification + media player visible
        // one notification + media player visible
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(1);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(1);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
        triggerPositionClockAndNotifications();
        triggerPositionClockAndNotifications();
        verify(mKeyguardStatusViewController).displayClock(SMALL, /* animate */ true);
        verify(mKeyguardStatusViewController).displayClock(SMALL, /* animate */ true);


        // only media player visible
        // only media player visible
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
        when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(false);
        triggerPositionClockAndNotifications();
        triggerPositionClockAndNotifications();
        verify(mKeyguardStatusViewController, times(2)).displayClock(SMALL, true);
        verify(mKeyguardStatusViewController, times(2)).displayClock(SMALL, true);
        verify(mKeyguardStatusViewController, never()).displayClock(LARGE, /* animate */ true);
        verify(mKeyguardStatusViewController, never()).displayClock(LARGE, /* animate */ true);
+2 −1
Original line number Original line Diff line number Diff line
@@ -31,6 +31,7 @@ import com.android.systemui.statusbar.notification.collection.render.NotifStackC
import com.android.systemui.statusbar.notification.collection.render.NotifStats
import com.android.systemui.statusbar.notification.collection.render.NotifStats
import com.android.systemui.statusbar.notification.domain.interactor.ActiveNotificationsInteractor
import com.android.systemui.statusbar.notification.domain.interactor.ActiveNotificationsInteractor
import com.android.systemui.statusbar.notification.domain.interactor.RenderNotificationListInteractor
import com.android.systemui.statusbar.notification.domain.interactor.RenderNotificationListInteractor
import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefactor
import com.android.systemui.statusbar.notification.shared.NotificationIconContainerRefactor
import com.android.systemui.statusbar.notification.shared.NotificationIconContainerRefactor
import com.android.systemui.statusbar.notification.stack.BUCKET_ALERTING
import com.android.systemui.statusbar.notification.stack.BUCKET_ALERTING
import com.android.systemui.statusbar.notification.stack.BUCKET_SILENT
import com.android.systemui.statusbar.notification.stack.BUCKET_SILENT
@@ -80,7 +81,7 @@ class StackCoordinatorTest : SysuiTestCase() {
    }
    }


    @Test
    @Test
    @DisableFlags(NotificationIconContainerRefactor.FLAG_NAME)
    @DisableFlags(NotificationIconContainerRefactor.FLAG_NAME, FooterViewRefactor.FLAG_NAME)
    fun testUpdateNotificationIcons() {
    fun testUpdateNotificationIcons() {
        afterRenderListListener.onAfterRenderList(listOf(entry), stackController)
        afterRenderListListener.onAfterRenderList(listOf(entry), stackController)
        verify(notificationIconAreaController).updateNotificationIcons(eq(listOf(entry)))
        verify(notificationIconAreaController).updateNotificationIcons(eq(listOf(entry)))