summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Dupin <dupin@google.com>2021-08-10 00:59:37 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-08-10 00:59:37 +0000
commitca2a0897ad405ca267d3aa727b97397aa6ee253c (patch)
tree30ac22e9e55c12c390ec7499155d8f276188a93a
parent5b84b29d81ad5c7f05470b26eb6ee29c9f44452a (diff)
parent5c05429e6eb6e44b6c4a24af379fa0fd58887e33 (diff)
Merge "Consider shade expansion when blurring because QS" into sc-dev am: 65c4313694 am: 5c05429e6e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15503404 Change-Id: I100f3542652235656b00728d0dfc1029f23f771b
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt3
2 files changed, 4 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
index db553e4b093b..002c9c7d2544 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt
@@ -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()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt
index d23a9ce26def..7c045c1f2894 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt
@@ -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