Loading packages/SystemUI/aconfig/systemui.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -2201,6 +2201,16 @@ flag { } } flag { name: "no_shade_blur_on_dream_start" namespace: "systemui" description: "Suppress shade blur when starting dream" bug: "440661063" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "qs_split_internet_tile" Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt +19 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,8 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { private val maxBlur = 150 private lateinit var notificationShadeDepthController: NotificationShadeDepthController private val dreamingFlow = MutableStateFlow(false) @Before fun setup() { // Constructs kosmos.windowRootViewBlurInteractor after test starts to avoid the error that Loading @@ -130,6 +132,7 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { `when`(blurUtils.maxBlurRadius).thenReturn(maxBlur.toFloat()) `when`(windowRootViewBlurInteractor.isBlurCurrentlySupported) .thenReturn(MutableStateFlow(true)) `when`(keyguardInteractor.isDreaming).thenReturn(dreamingFlow) notificationShadeDepthController = NotificationShadeDepthController( Loading Loading @@ -249,6 +252,22 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { verify(shadeAnimation).animateTo(eq(0)) } @Test @EnableFlags(Flags.FLAG_NO_SHADE_BLUR_ON_DREAM_START) fun onStateChanged_noBlurEvaluation_ifShadeAndDreaming() { onPanelExpansionChanged_apliesBlur_ifShade() clearInvocations(choreographer) statusBarState = StatusBarState.KEYGUARD statusBarStateListener.onStateChanged(statusBarState) verify(shadeAnimation).animateTo(eq(0)) clearInvocations(shadeAnimation) statusBarState = StatusBarState.SHADE dreamingFlow.value = true statusBarStateListener.onStateChanged(statusBarState) verify(shadeAnimation, never()).animateTo(anyInt()) } @Test fun setQsPanelExpansion_appliesBlur() { statusBarState = StatusBarState.KEYGUARD Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt +13 −1 Original line number Diff line number Diff line Loading @@ -137,6 +137,8 @@ constructor( // Shade expansion offset that happens when pulling down on a HUN. var panelPullDownMinFraction = 0f var existingStatusBarState: Int? = null var shadeAnimation = DepthAnimation() @VisibleForTesting var brightnessMirrorSpring = DepthAnimation() Loading Loading @@ -416,6 +418,16 @@ constructor( private val statusBarStateCallback = object : StatusBarStateController.StateListener { override fun onStateChanged(newState: Int) { if (Flags.noShadeBlurOnDreamStart()) { if (existingStatusBarState == StatusBarState.KEYGUARD && newState == StatusBarState.SHADE && keyguardInteractor.isDreaming.value) { return } } existingStatusBarState = newState updateShadeAnimationBlur( shadeExpansion, prevTracking, Loading Loading @@ -653,7 +665,7 @@ constructor( // Do not blur or zoom out the wallpaper if the blurred wallpaper is not supported. if (!windowRootViewBlurInteractor.isBlurredWallpaperSupported) { return; return } if (Flags.bouncerUiRevamp() || Flags.glanceableHubBlurredBackground()) { Loading Loading
packages/SystemUI/aconfig/systemui.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -2201,6 +2201,16 @@ flag { } } flag { name: "no_shade_blur_on_dream_start" namespace: "systemui" description: "Suppress shade blur when starting dream" bug: "440661063" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "qs_split_internet_tile" Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt +19 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,8 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { private val maxBlur = 150 private lateinit var notificationShadeDepthController: NotificationShadeDepthController private val dreamingFlow = MutableStateFlow(false) @Before fun setup() { // Constructs kosmos.windowRootViewBlurInteractor after test starts to avoid the error that Loading @@ -130,6 +132,7 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { `when`(blurUtils.maxBlurRadius).thenReturn(maxBlur.toFloat()) `when`(windowRootViewBlurInteractor.isBlurCurrentlySupported) .thenReturn(MutableStateFlow(true)) `when`(keyguardInteractor.isDreaming).thenReturn(dreamingFlow) notificationShadeDepthController = NotificationShadeDepthController( Loading Loading @@ -249,6 +252,22 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { verify(shadeAnimation).animateTo(eq(0)) } @Test @EnableFlags(Flags.FLAG_NO_SHADE_BLUR_ON_DREAM_START) fun onStateChanged_noBlurEvaluation_ifShadeAndDreaming() { onPanelExpansionChanged_apliesBlur_ifShade() clearInvocations(choreographer) statusBarState = StatusBarState.KEYGUARD statusBarStateListener.onStateChanged(statusBarState) verify(shadeAnimation).animateTo(eq(0)) clearInvocations(shadeAnimation) statusBarState = StatusBarState.SHADE dreamingFlow.value = true statusBarStateListener.onStateChanged(statusBarState) verify(shadeAnimation, never()).animateTo(anyInt()) } @Test fun setQsPanelExpansion_appliesBlur() { statusBarState = StatusBarState.KEYGUARD Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt +13 −1 Original line number Diff line number Diff line Loading @@ -137,6 +137,8 @@ constructor( // Shade expansion offset that happens when pulling down on a HUN. var panelPullDownMinFraction = 0f var existingStatusBarState: Int? = null var shadeAnimation = DepthAnimation() @VisibleForTesting var brightnessMirrorSpring = DepthAnimation() Loading Loading @@ -416,6 +418,16 @@ constructor( private val statusBarStateCallback = object : StatusBarStateController.StateListener { override fun onStateChanged(newState: Int) { if (Flags.noShadeBlurOnDreamStart()) { if (existingStatusBarState == StatusBarState.KEYGUARD && newState == StatusBarState.SHADE && keyguardInteractor.isDreaming.value) { return } } existingStatusBarState = newState updateShadeAnimationBlur( shadeExpansion, prevTracking, Loading Loading @@ -653,7 +665,7 @@ constructor( // Do not blur or zoom out the wallpaper if the blurred wallpaper is not supported. if (!windowRootViewBlurInteractor.isBlurredWallpaperSupported) { return; return } if (Flags.bouncerUiRevamp() || Flags.glanceableHubBlurredBackground()) { Loading