Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt +14 −0 Original line number Diff line number Diff line Loading @@ -938,6 +938,20 @@ abstract class MobileIconsInteractorTestBase : SysuiTestCase() { assertThat(latest).isFalse() } /** Regression test for b/431929674 */ @Test @EnableFlags(NewStatusBarIcons.FLAG_NAME, StatusBarRootModernization.FLAG_NAME) fun isStackable_removeAllSubscriptions() = kosmos.runTest { val latest by collectLastValue(underTest.isStackable) connectionsRepository.setSubscriptions(listOf(SUB_1, SUB_2)) assertThat(latest).isTrue() connectionsRepository.setSubscriptions(emptyList()) assertThat(latest).isFalse() } @Test @EnableFlags(NewStatusBarIcons.FLAG_NAME, StatusBarRootModernization.FLAG_NAME) fun isStackable_checksForTerrestrialConnections() = Loading packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractor.kt +11 −7 Original line number Diff line number Diff line Loading @@ -310,6 +310,9 @@ constructor( override val isStackable = if (NewStatusBarIcons.isEnabled && StatusBarRootModernization.isEnabled) { icons.flatMapLatest { icons -> if (icons.isEmpty()) { flowOf(false) } else { combine(icons.map { it.signalLevelIcon }) { signalLevelIcons -> // These are only stackable if: // - They are cellular Loading @@ -320,6 +323,7 @@ constructor( } } } } } else { flowOf(false) } Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt +14 −0 Original line number Diff line number Diff line Loading @@ -938,6 +938,20 @@ abstract class MobileIconsInteractorTestBase : SysuiTestCase() { assertThat(latest).isFalse() } /** Regression test for b/431929674 */ @Test @EnableFlags(NewStatusBarIcons.FLAG_NAME, StatusBarRootModernization.FLAG_NAME) fun isStackable_removeAllSubscriptions() = kosmos.runTest { val latest by collectLastValue(underTest.isStackable) connectionsRepository.setSubscriptions(listOf(SUB_1, SUB_2)) assertThat(latest).isTrue() connectionsRepository.setSubscriptions(emptyList()) assertThat(latest).isFalse() } @Test @EnableFlags(NewStatusBarIcons.FLAG_NAME, StatusBarRootModernization.FLAG_NAME) fun isStackable_checksForTerrestrialConnections() = Loading
packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractor.kt +11 −7 Original line number Diff line number Diff line Loading @@ -310,6 +310,9 @@ constructor( override val isStackable = if (NewStatusBarIcons.isEnabled && StatusBarRootModernization.isEnabled) { icons.flatMapLatest { icons -> if (icons.isEmpty()) { flowOf(false) } else { combine(icons.map { it.signalLevelIcon }) { signalLevelIcons -> // These are only stackable if: // - They are cellular Loading @@ -320,6 +323,7 @@ constructor( } } } } } else { flowOf(false) } Loading