Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt +8 −1 Original line number Original line Diff line number Diff line Loading @@ -44,7 +44,13 @@ constructor( shadeInteractor: ShadeInteractor, shadeInteractor: ShadeInteractor, ) { ) { private val statesForConstrainedNotifications = private val statesForConstrainedNotifications = setOf(KeyguardState.LOCKSCREEN, KeyguardState.AOD, KeyguardState.DOZING) setOf( KeyguardState.LOCKSCREEN, KeyguardState.AOD, KeyguardState.DOZING, KeyguardState.ALTERNATE_BOUNCER, KeyguardState.PRIMARY_BOUNCER ) val configurationBasedDimensions: Flow<ConfigurationBasedDimensions> = val configurationBasedDimensions: Flow<ConfigurationBasedDimensions> = interactor.configurationBasedDimensions interactor.configurationBasedDimensions Loading Loading @@ -126,6 +132,7 @@ constructor( /** /** * When on keyguard, there is limited space to display notifications so calculate how many could * When on keyguard, there is limited space to display notifications so calculate how many could * be shown. Otherwise, there is no limit since the vertical space will be scrollable. * be shown. Otherwise, there is no limit since the vertical space will be scrollable. * * TODO: b/296606746 - Need to rerun logic when notifs change * TODO: b/296606746 - Need to rerun logic when notifs change */ */ val maxNotifications: Flow<Int> = val maxNotifications: Flow<Int> = Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt +8 −0 Original line number Original line Diff line number Diff line Loading @@ -220,6 +220,14 @@ class SharedNotificationContainerViewModelTest : SysuiTestCase() { ) ) ) ) assertThat(isOnLockscreen).isTrue() assertThat(isOnLockscreen).isTrue() keyguardTransitionRepository.sendTransitionStep( TransitionStep( to = KeyguardState.PRIMARY_BOUNCER, transitionState = TransitionState.FINISHED ) ) assertThat(isOnLockscreen).isTrue() } } @Test @Test Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt +8 −1 Original line number Original line Diff line number Diff line Loading @@ -44,7 +44,13 @@ constructor( shadeInteractor: ShadeInteractor, shadeInteractor: ShadeInteractor, ) { ) { private val statesForConstrainedNotifications = private val statesForConstrainedNotifications = setOf(KeyguardState.LOCKSCREEN, KeyguardState.AOD, KeyguardState.DOZING) setOf( KeyguardState.LOCKSCREEN, KeyguardState.AOD, KeyguardState.DOZING, KeyguardState.ALTERNATE_BOUNCER, KeyguardState.PRIMARY_BOUNCER ) val configurationBasedDimensions: Flow<ConfigurationBasedDimensions> = val configurationBasedDimensions: Flow<ConfigurationBasedDimensions> = interactor.configurationBasedDimensions interactor.configurationBasedDimensions Loading Loading @@ -126,6 +132,7 @@ constructor( /** /** * When on keyguard, there is limited space to display notifications so calculate how many could * When on keyguard, there is limited space to display notifications so calculate how many could * be shown. Otherwise, there is no limit since the vertical space will be scrollable. * be shown. Otherwise, there is no limit since the vertical space will be scrollable. * * TODO: b/296606746 - Need to rerun logic when notifs change * TODO: b/296606746 - Need to rerun logic when notifs change */ */ val maxNotifications: Flow<Int> = val maxNotifications: Flow<Int> = Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt +8 −0 Original line number Original line Diff line number Diff line Loading @@ -220,6 +220,14 @@ class SharedNotificationContainerViewModelTest : SysuiTestCase() { ) ) ) ) assertThat(isOnLockscreen).isTrue() assertThat(isOnLockscreen).isTrue() keyguardTransitionRepository.sendTransitionStep( TransitionStep( to = KeyguardState.PRIMARY_BOUNCER, transitionState = TransitionState.FINISHED ) ) assertThat(isOnLockscreen).isTrue() } } @Test @Test Loading