Loading packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelTest.kt +8 −18 Original line number Diff line number Diff line Loading @@ -183,17 +183,6 @@ class KeyguardRootViewModelTest(flags: FlagsParameterization) : SysuiTestCase() assertThat(isVisible?.isAnimating).isFalse() } @Test fun iconContainer_isVisible_bypassEnabled() = testScope.runTest { val isVisible by collectLastValue(underTest.isNotifIconContainerVisible) runCurrent() deviceEntryRepository.setBypassEnabled(true) runCurrent() assertThat(isVisible?.value).isTrue() } @Test fun iconContainer_isNotVisible_pulseExpanding_notBypassing() = testScope.runTest { Loading Loading @@ -283,22 +272,23 @@ class KeyguardRootViewModelTest(flags: FlagsParameterization) : SysuiTestCase() } @Test fun iconContainer_isNotVisible_bypassDisabled_onLockscreen() = fun iconContainer_isNotVisible_notifsFullyHiddenThenVisible_bypassEnabled() = testScope.runTest { val isVisible by collectLastValue(underTest.isNotifIconContainerVisible) runCurrent() keyguardTransitionRepository.sendTransitionSteps( from = KeyguardState.AOD, to = KeyguardState.LOCKSCREEN, testScope, ) notificationsKeyguardInteractor.setPulseExpanding(false) deviceEntryRepository.setBypassEnabled(false) deviceEntryRepository.setBypassEnabled(true) whenever(dozeParameters.alwaysOn).thenReturn(true) whenever(dozeParameters.displayNeedsBlanking).thenReturn(false) notificationsKeyguardInteractor.setNotificationsFullyHidden(true) runCurrent() assertThat(isVisible?.value).isTrue() assertThat(isVisible?.isAnimating).isTrue() notificationsKeyguardInteractor.setNotificationsFullyHidden(false) runCurrent() assertThat(isVisible?.value).isFalse() assertThat(isVisible?.isAnimating).isTrue() } Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt +0 −4 Original line number Diff line number Diff line Loading @@ -347,12 +347,8 @@ constructor( when { // If there are no notification icons to show, then it can be hidden !hasAodIcons -> false // If we're bypassing, then we're visible isBypassEnabled -> true // If we are pulsing (and not bypassing), then we are hidden isPulseExpanding -> false // Besides bypass above, they should not be visible on lockscreen isOnLockscreen -> false // If notifs are fully gone, then we're visible areNotifsFullyHidden -> true // Otherwise, we're hidden Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +5 −0 Original line number Diff line number Diff line Loading @@ -2728,6 +2728,11 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } private int calculatePanelHeightShade() { // Bypass should always occupy the full height if (mBarState == KEYGUARD && mKeyguardBypassController.getBypassEnabled()) { return mNotificationStackScrollLayoutController.getHeight(); } int emptyBottomMargin = mNotificationStackScrollLayoutController.getEmptyBottomMargin(); int maxHeight = mNotificationStackScrollLayoutController.getHeight() - emptyBottomMargin; Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelTest.kt +8 −18 Original line number Diff line number Diff line Loading @@ -183,17 +183,6 @@ class KeyguardRootViewModelTest(flags: FlagsParameterization) : SysuiTestCase() assertThat(isVisible?.isAnimating).isFalse() } @Test fun iconContainer_isVisible_bypassEnabled() = testScope.runTest { val isVisible by collectLastValue(underTest.isNotifIconContainerVisible) runCurrent() deviceEntryRepository.setBypassEnabled(true) runCurrent() assertThat(isVisible?.value).isTrue() } @Test fun iconContainer_isNotVisible_pulseExpanding_notBypassing() = testScope.runTest { Loading Loading @@ -283,22 +272,23 @@ class KeyguardRootViewModelTest(flags: FlagsParameterization) : SysuiTestCase() } @Test fun iconContainer_isNotVisible_bypassDisabled_onLockscreen() = fun iconContainer_isNotVisible_notifsFullyHiddenThenVisible_bypassEnabled() = testScope.runTest { val isVisible by collectLastValue(underTest.isNotifIconContainerVisible) runCurrent() keyguardTransitionRepository.sendTransitionSteps( from = KeyguardState.AOD, to = KeyguardState.LOCKSCREEN, testScope, ) notificationsKeyguardInteractor.setPulseExpanding(false) deviceEntryRepository.setBypassEnabled(false) deviceEntryRepository.setBypassEnabled(true) whenever(dozeParameters.alwaysOn).thenReturn(true) whenever(dozeParameters.displayNeedsBlanking).thenReturn(false) notificationsKeyguardInteractor.setNotificationsFullyHidden(true) runCurrent() assertThat(isVisible?.value).isTrue() assertThat(isVisible?.isAnimating).isTrue() notificationsKeyguardInteractor.setNotificationsFullyHidden(false) runCurrent() assertThat(isVisible?.value).isFalse() assertThat(isVisible?.isAnimating).isTrue() } Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt +0 −4 Original line number Diff line number Diff line Loading @@ -347,12 +347,8 @@ constructor( when { // If there are no notification icons to show, then it can be hidden !hasAodIcons -> false // If we're bypassing, then we're visible isBypassEnabled -> true // If we are pulsing (and not bypassing), then we are hidden isPulseExpanding -> false // Besides bypass above, they should not be visible on lockscreen isOnLockscreen -> false // If notifs are fully gone, then we're visible areNotifsFullyHidden -> true // Otherwise, we're hidden Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +5 −0 Original line number Diff line number Diff line Loading @@ -2728,6 +2728,11 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } private int calculatePanelHeightShade() { // Bypass should always occupy the full height if (mBarState == KEYGUARD && mKeyguardBypassController.getBypassEnabled()) { return mNotificationStackScrollLayoutController.getHeight(); } int emptyBottomMargin = mNotificationStackScrollLayoutController.getEmptyBottomMargin(); int maxHeight = mNotificationStackScrollLayoutController.getHeight() - emptyBottomMargin; Loading