Loading packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractorTest.kt +3 −60 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.systemui.scene.domain.interactor import android.platform.test.annotations.DisableFlags import android.platform.test.annotations.EnableFlags import android.platform.test.flag.junit.FlagsParameterization import android.testing.TestableLooper import androidx.test.filters.SmallTest Loading Loading @@ -46,7 +44,6 @@ import com.android.systemui.statusbar.notification.data.repository.setActiveNoti import com.android.systemui.statusbar.notification.domain.interactor.activeNotificationsInteractor import com.android.systemui.statusbar.notification.headsup.HeadsUpManager import com.android.systemui.statusbar.notification.init.NotificationsController import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor import com.android.systemui.testKosmos import com.android.systemui.util.concurrency.FakeExecutor import com.android.systemui.util.mockito.any Loading Loading @@ -535,25 +532,7 @@ class WindowRootViewVisibilityInteractorTest(flags: FlagsParameterization) : Sys } @Test @DisableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun lockscreenShadeInteractive_hasHeadsUpAndNotifPresenterCollapsed_flagOff_notifCountOne() = kosmos.runTest { underTest.start() whenever(headsUpManager.hasPinnedHeadsUp()).thenReturn(true) whenever(notificationPresenter.isPresenterFullyCollapsed).thenReturn(true) whenever(notificationsController.getActiveNotificationsCount()).thenReturn(4) makeLockscreenShadeVisible() val notifCount = argumentCaptor<Int>() verify(iStatusBarService).onPanelRevealed(any(), notifCount.capture()) assertThat(notifCount.value).isEqualTo(1) } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun lockscreenShadeInteractive_hasHeadsUpAndNotifPresenterCollapsed_flagOn_notifCountOne() = fun lockscreenShadeInteractive_hasHeadsUpAndNotifPresenterCollapsed_notifCountOne() = kosmos.runTest { underTest.start() Loading Loading @@ -584,25 +563,7 @@ class WindowRootViewVisibilityInteractorTest(flags: FlagsParameterization) : Sys } @Test @DisableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun lockscreenShadeInteractive_noHeadsUp_flagOff_notifCountMatchesNotifController() = kosmos.runTest { underTest.start() whenever(notificationPresenter.isPresenterFullyCollapsed).thenReturn(true) whenever(headsUpManager.hasPinnedHeadsUp()).thenReturn(false) whenever(notificationsController.getActiveNotificationsCount()).thenReturn(9) makeLockscreenShadeVisible() val notifCount = argumentCaptor<Int>() verify(iStatusBarService).onPanelRevealed(any(), notifCount.capture()) assertThat(notifCount.value).isEqualTo(9) } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun lockscreenShadeInteractive_noHeadsUp_flagOn_notifCountMatchesNotifController() = fun lockscreenShadeInteractive_noHeadsUp_notifCountMatchesNotifController() = kosmos.runTest { underTest.start() whenever(notificationPresenter.isPresenterFullyCollapsed).thenReturn(true) Loading @@ -618,25 +579,7 @@ class WindowRootViewVisibilityInteractorTest(flags: FlagsParameterization) : Sys } @Test @DisableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun lockscreenShadeInteractive_notifPresenterNotCollapsed_flagOff_notifCountMatchesNotifController() = kosmos.runTest { underTest.start() whenever(headsUpManager.hasPinnedHeadsUp()).thenReturn(true) whenever(notificationPresenter.isPresenterFullyCollapsed).thenReturn(false) whenever(notificationsController.getActiveNotificationsCount()).thenReturn(8) makeLockscreenShadeVisible() val notifCount = argumentCaptor<Int>() verify(iStatusBarService).onPanelRevealed(any(), notifCount.capture()) assertThat(notifCount.value).isEqualTo(8) } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun lockscreenShadeInteractive_notifPresenterNotCollapsed_flagOn_notifCountMatchesNotifController() = fun lockscreenShadeInteractive_notifPresenterNotCollapsed_notifCountMatchesNotifController() = kosmos.runTest { underTest.start() whenever(headsUpManager.hasPinnedHeadsUp()).thenReturn(true) Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/NotificationStatsLoggerCoordinatorTest.kt +0 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.systemui.statusbar.notification.collection.coordinator import android.platform.test.annotations.EnableFlags import android.service.notification.NotificationListenerService.REASON_CANCEL import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest Loading @@ -24,7 +23,6 @@ import com.android.systemui.SysuiTestCase import com.android.systemui.statusbar.notification.collection.NotifPipeline import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor import com.android.systemui.statusbar.notification.stack.ui.view.NotificationStatsLogger import com.android.systemui.util.mockito.mock import com.android.systemui.util.mockito.whenever Loading @@ -37,7 +35,6 @@ import org.mockito.Mockito.verify @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) @android.platform.test.annotations.EnabledOnRavenwood class NotificationStatsLoggerCoordinatorTest : SysuiTestCase() { Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/LegacyLightsOutNotifControllerTest.java +2 −3 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import static junit.framework.Assert.assertTrue; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.platform.test.annotations.DisableFlags; import android.testing.TestableLooper.RunWithLooper; import android.view.Display; import android.view.View; Loading @@ -41,9 +40,9 @@ import com.android.systemui.SysuiTestCase; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.notification.collection.NotifLiveData; import com.android.systemui.statusbar.notification.collection.NotifLiveDataStore; import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; Loading @@ -56,7 +55,7 @@ import java.util.Objects; @SmallTest @RunWith(AndroidJUnit4.class) @RunWithLooper @DisableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) @Ignore("b/424001722") // remove this test when LegacyLightsOutNotifController is gone public class LegacyLightsOutNotifControllerTest extends SysuiTestCase { private static final int LIGHTS_ON = 0; private static final int LIGHTS_OUT = APPEARANCE_LOW_PROFILE_BARS; Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/HomeStatusBarViewModelImplTest.kt +0 −17 Original line number Diff line number Diff line Loading @@ -56,7 +56,6 @@ import com.android.systemui.kosmos.runTest import com.android.systemui.kosmos.testScope import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.lifecycle.activateIn import com.android.systemui.log.assertLogsWtf import com.android.systemui.mediaprojection.data.model.MediaProjectionState import com.android.systemui.mediaprojection.data.repository.fakeMediaProjectionRepository import com.android.systemui.plugins.DarkIconDispatcher Loading Loading @@ -94,7 +93,6 @@ import com.android.systemui.statusbar.notification.data.repository.activeNotific import com.android.systemui.statusbar.notification.headsup.PinnedStatus import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi import com.android.systemui.statusbar.notification.shared.ActiveNotificationModel import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor import com.android.systemui.statusbar.notification.stack.data.repository.headsUpNotificationRepository import com.android.systemui.statusbar.phone.SysuiDarkIconDispatcher import com.android.systemui.statusbar.phone.data.repository.fakeDarkIconRepository Loading Loading @@ -433,7 +431,6 @@ class HomeStatusBarViewModelImplTest(flags: FlagsParameterization) : SysuiTestCa } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun areNotificationsLightsOut_lowProfileWithNotifications_true() = kosmos.runTest { fakeStatusBarModeRepository.defaultDisplay.statusBarMode.value = Loading @@ -447,7 +444,6 @@ class HomeStatusBarViewModelImplTest(flags: FlagsParameterization) : SysuiTestCa } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun areNotificationsLightsOut_lowProfileWithoutNotifications_false() = kosmos.runTest { fakeStatusBarModeRepository.defaultDisplay.statusBarMode.value = Loading @@ -461,7 +457,6 @@ class HomeStatusBarViewModelImplTest(flags: FlagsParameterization) : SysuiTestCa } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun areNotificationsLightsOut_defaultStatusBarModeWithoutNotifications_false() = kosmos.runTest { fakeStatusBarModeRepository.defaultDisplay.statusBarMode.value = Loading @@ -475,7 +470,6 @@ class HomeStatusBarViewModelImplTest(flags: FlagsParameterization) : SysuiTestCa } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun areNotificationsLightsOut_defaultStatusBarModeWithNotifications_false() = kosmos.runTest { fakeStatusBarModeRepository.defaultDisplay.statusBarMode.value = Loading @@ -488,17 +482,6 @@ class HomeStatusBarViewModelImplTest(flags: FlagsParameterization) : SysuiTestCa assertThat(actual).isFalse() } @Test @DisableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun areNotificationsLightsOut_requiresFlagEnabled() = kosmos.runTest { assertLogsWtf { val latest by collectLastValue(underTest.areNotificationsLightsOut) // Nothing is emitted assertThat(latest).isNull() } } @Test fun primaryOngoingActivityChip_matchesViewModel() = kosmos.runTest { Loading packages/SystemUI/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractor.kt +1 −6 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.domain.interactor.ActiveNotificationsInteractor import com.android.systemui.statusbar.notification.headsup.HeadsUpManager import com.android.systemui.statusbar.notification.init.NotificationsController import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor import javax.inject.Inject import javax.inject.Provider import kotlinx.coroutines.CoroutineScope Loading Loading @@ -170,10 +169,6 @@ constructor( } private fun getActiveNotificationsCount(): Int { return if (NotificationsLiveDataStoreRefactor.isEnabled) { activeNotificationsInteractor.allNotificationsCountValue } else { notificationsController?.getActiveNotificationsCount() ?: 0 } return activeNotificationsInteractor.allNotificationsCountValue } } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractorTest.kt +3 −60 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.systemui.scene.domain.interactor import android.platform.test.annotations.DisableFlags import android.platform.test.annotations.EnableFlags import android.platform.test.flag.junit.FlagsParameterization import android.testing.TestableLooper import androidx.test.filters.SmallTest Loading Loading @@ -46,7 +44,6 @@ import com.android.systemui.statusbar.notification.data.repository.setActiveNoti import com.android.systemui.statusbar.notification.domain.interactor.activeNotificationsInteractor import com.android.systemui.statusbar.notification.headsup.HeadsUpManager import com.android.systemui.statusbar.notification.init.NotificationsController import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor import com.android.systemui.testKosmos import com.android.systemui.util.concurrency.FakeExecutor import com.android.systemui.util.mockito.any Loading Loading @@ -535,25 +532,7 @@ class WindowRootViewVisibilityInteractorTest(flags: FlagsParameterization) : Sys } @Test @DisableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun lockscreenShadeInteractive_hasHeadsUpAndNotifPresenterCollapsed_flagOff_notifCountOne() = kosmos.runTest { underTest.start() whenever(headsUpManager.hasPinnedHeadsUp()).thenReturn(true) whenever(notificationPresenter.isPresenterFullyCollapsed).thenReturn(true) whenever(notificationsController.getActiveNotificationsCount()).thenReturn(4) makeLockscreenShadeVisible() val notifCount = argumentCaptor<Int>() verify(iStatusBarService).onPanelRevealed(any(), notifCount.capture()) assertThat(notifCount.value).isEqualTo(1) } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun lockscreenShadeInteractive_hasHeadsUpAndNotifPresenterCollapsed_flagOn_notifCountOne() = fun lockscreenShadeInteractive_hasHeadsUpAndNotifPresenterCollapsed_notifCountOne() = kosmos.runTest { underTest.start() Loading Loading @@ -584,25 +563,7 @@ class WindowRootViewVisibilityInteractorTest(flags: FlagsParameterization) : Sys } @Test @DisableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun lockscreenShadeInteractive_noHeadsUp_flagOff_notifCountMatchesNotifController() = kosmos.runTest { underTest.start() whenever(notificationPresenter.isPresenterFullyCollapsed).thenReturn(true) whenever(headsUpManager.hasPinnedHeadsUp()).thenReturn(false) whenever(notificationsController.getActiveNotificationsCount()).thenReturn(9) makeLockscreenShadeVisible() val notifCount = argumentCaptor<Int>() verify(iStatusBarService).onPanelRevealed(any(), notifCount.capture()) assertThat(notifCount.value).isEqualTo(9) } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun lockscreenShadeInteractive_noHeadsUp_flagOn_notifCountMatchesNotifController() = fun lockscreenShadeInteractive_noHeadsUp_notifCountMatchesNotifController() = kosmos.runTest { underTest.start() whenever(notificationPresenter.isPresenterFullyCollapsed).thenReturn(true) Loading @@ -618,25 +579,7 @@ class WindowRootViewVisibilityInteractorTest(flags: FlagsParameterization) : Sys } @Test @DisableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun lockscreenShadeInteractive_notifPresenterNotCollapsed_flagOff_notifCountMatchesNotifController() = kosmos.runTest { underTest.start() whenever(headsUpManager.hasPinnedHeadsUp()).thenReturn(true) whenever(notificationPresenter.isPresenterFullyCollapsed).thenReturn(false) whenever(notificationsController.getActiveNotificationsCount()).thenReturn(8) makeLockscreenShadeVisible() val notifCount = argumentCaptor<Int>() verify(iStatusBarService).onPanelRevealed(any(), notifCount.capture()) assertThat(notifCount.value).isEqualTo(8) } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun lockscreenShadeInteractive_notifPresenterNotCollapsed_flagOn_notifCountMatchesNotifController() = fun lockscreenShadeInteractive_notifPresenterNotCollapsed_notifCountMatchesNotifController() = kosmos.runTest { underTest.start() whenever(headsUpManager.hasPinnedHeadsUp()).thenReturn(true) Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/NotificationStatsLoggerCoordinatorTest.kt +0 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.systemui.statusbar.notification.collection.coordinator import android.platform.test.annotations.EnableFlags import android.service.notification.NotificationListenerService.REASON_CANCEL import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest Loading @@ -24,7 +23,6 @@ import com.android.systemui.SysuiTestCase import com.android.systemui.statusbar.notification.collection.NotifPipeline import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor import com.android.systemui.statusbar.notification.stack.ui.view.NotificationStatsLogger import com.android.systemui.util.mockito.mock import com.android.systemui.util.mockito.whenever Loading @@ -37,7 +35,6 @@ import org.mockito.Mockito.verify @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) @android.platform.test.annotations.EnabledOnRavenwood class NotificationStatsLoggerCoordinatorTest : SysuiTestCase() { Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/LegacyLightsOutNotifControllerTest.java +2 −3 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import static junit.framework.Assert.assertTrue; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.platform.test.annotations.DisableFlags; import android.testing.TestableLooper.RunWithLooper; import android.view.Display; import android.view.View; Loading @@ -41,9 +40,9 @@ import com.android.systemui.SysuiTestCase; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.notification.collection.NotifLiveData; import com.android.systemui.statusbar.notification.collection.NotifLiveDataStore; import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; Loading @@ -56,7 +55,7 @@ import java.util.Objects; @SmallTest @RunWith(AndroidJUnit4.class) @RunWithLooper @DisableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) @Ignore("b/424001722") // remove this test when LegacyLightsOutNotifController is gone public class LegacyLightsOutNotifControllerTest extends SysuiTestCase { private static final int LIGHTS_ON = 0; private static final int LIGHTS_OUT = APPEARANCE_LOW_PROFILE_BARS; Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/HomeStatusBarViewModelImplTest.kt +0 −17 Original line number Diff line number Diff line Loading @@ -56,7 +56,6 @@ import com.android.systemui.kosmos.runTest import com.android.systemui.kosmos.testScope import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.lifecycle.activateIn import com.android.systemui.log.assertLogsWtf import com.android.systemui.mediaprojection.data.model.MediaProjectionState import com.android.systemui.mediaprojection.data.repository.fakeMediaProjectionRepository import com.android.systemui.plugins.DarkIconDispatcher Loading Loading @@ -94,7 +93,6 @@ import com.android.systemui.statusbar.notification.data.repository.activeNotific import com.android.systemui.statusbar.notification.headsup.PinnedStatus import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi import com.android.systemui.statusbar.notification.shared.ActiveNotificationModel import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor import com.android.systemui.statusbar.notification.stack.data.repository.headsUpNotificationRepository import com.android.systemui.statusbar.phone.SysuiDarkIconDispatcher import com.android.systemui.statusbar.phone.data.repository.fakeDarkIconRepository Loading Loading @@ -433,7 +431,6 @@ class HomeStatusBarViewModelImplTest(flags: FlagsParameterization) : SysuiTestCa } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun areNotificationsLightsOut_lowProfileWithNotifications_true() = kosmos.runTest { fakeStatusBarModeRepository.defaultDisplay.statusBarMode.value = Loading @@ -447,7 +444,6 @@ class HomeStatusBarViewModelImplTest(flags: FlagsParameterization) : SysuiTestCa } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun areNotificationsLightsOut_lowProfileWithoutNotifications_false() = kosmos.runTest { fakeStatusBarModeRepository.defaultDisplay.statusBarMode.value = Loading @@ -461,7 +457,6 @@ class HomeStatusBarViewModelImplTest(flags: FlagsParameterization) : SysuiTestCa } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun areNotificationsLightsOut_defaultStatusBarModeWithoutNotifications_false() = kosmos.runTest { fakeStatusBarModeRepository.defaultDisplay.statusBarMode.value = Loading @@ -475,7 +470,6 @@ class HomeStatusBarViewModelImplTest(flags: FlagsParameterization) : SysuiTestCa } @Test @EnableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun areNotificationsLightsOut_defaultStatusBarModeWithNotifications_false() = kosmos.runTest { fakeStatusBarModeRepository.defaultDisplay.statusBarMode.value = Loading @@ -488,17 +482,6 @@ class HomeStatusBarViewModelImplTest(flags: FlagsParameterization) : SysuiTestCa assertThat(actual).isFalse() } @Test @DisableFlags(NotificationsLiveDataStoreRefactor.FLAG_NAME) fun areNotificationsLightsOut_requiresFlagEnabled() = kosmos.runTest { assertLogsWtf { val latest by collectLastValue(underTest.areNotificationsLightsOut) // Nothing is emitted assertThat(latest).isNull() } } @Test fun primaryOngoingActivityChip_matchesViewModel() = kosmos.runTest { Loading
packages/SystemUI/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractor.kt +1 −6 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.domain.interactor.ActiveNotificationsInteractor import com.android.systemui.statusbar.notification.headsup.HeadsUpManager import com.android.systemui.statusbar.notification.init.NotificationsController import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor import javax.inject.Inject import javax.inject.Provider import kotlinx.coroutines.CoroutineScope Loading Loading @@ -170,10 +169,6 @@ constructor( } private fun getActiveNotificationsCount(): Int { return if (NotificationsLiveDataStoreRefactor.isEnabled) { activeNotificationsInteractor.allNotificationsCountValue } else { notificationsController?.getActiveNotificationsCount() ?: 0 } return activeNotificationsInteractor.allNotificationsCountValue } }