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

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

Change-Id: I4a52b3d28b84e1719ee2e0b14be4794db5bd18fd
This commit is contained in:
Lucas Dupin
2021-08-10 00:31:54 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 2 deletions

View File

@@ -178,7 +178,8 @@ class NotificationShadeDepthController @Inject constructor(
blurUtils.minBlurRadius, blurUtils.maxBlurRadius)
var combinedBlur = (shadeSpring.radius * INTERACTION_BLUR_FRACTION +
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))
var shadeRadius = max(combinedBlur, wakeAndUnlockBlurRadius).toFloat()

View File

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