Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca2a0897 authored by Lucas Dupin's avatar Lucas Dupin Committed by Automerger Merge Worker
Browse files

Merge "Consider shade expansion when blurring because QS" into sc-dev am: 65c43136 am: 5c05429e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15503404

Change-Id: I100f3542652235656b00728d0dfc1029f23f771b
parents 5b84b29d 5c05429e
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -178,7 +178,8 @@ class NotificationShadeDepthController @Inject constructor(
                blurUtils.minBlurRadius, blurUtils.maxBlurRadius)
                blurUtils.minBlurRadius, blurUtils.maxBlurRadius)
        var combinedBlur = (shadeSpring.radius * INTERACTION_BLUR_FRACTION +
        var combinedBlur = (shadeSpring.radius * INTERACTION_BLUR_FRACTION +
                normalizedBlurRadius * ANIMATION_BLUR_FRACTION).toInt()
                normalizedBlurRadius * ANIMATION_BLUR_FRACTION).toInt()
        combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(qsPanelExpansion))
        val qsExpandedRatio = qsPanelExpansion * shadeExpansion
        combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(qsExpandedRatio))
        combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(transitionToFullShadeProgress))
        combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(transitionToFullShadeProgress))
        var shadeRadius = max(combinedBlur, wakeAndUnlockBlurRadius).toFloat()
        var shadeRadius = max(combinedBlur, wakeAndUnlockBlurRadius).toFloat()


+2 −1
Original line number Original line Diff line number Diff line
@@ -184,8 +184,9 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() {
    @Test
    @Test
    fun setQsPanelExpansion_appliesBlur() {
    fun setQsPanelExpansion_appliesBlur() {
        notificationShadeDepthController.qsPanelExpansion = 1f
        notificationShadeDepthController.qsPanelExpansion = 1f
        notificationShadeDepthController.onPanelExpansionChanged(0.5f, tracking = false)
        notificationShadeDepthController.updateBlurCallback.doFrame(0)
        notificationShadeDepthController.updateBlurCallback.doFrame(0)
        verify(blurUtils).applyBlur(any(), eq(maxBlur), eq(false))
        verify(blurUtils).applyBlur(any(), eq(maxBlur / 2), eq(false))
    }
    }


    @Test
    @Test