From 92097fc4a49d2329aa7a7c69546e32835e8c65ac Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Tue, 2 Nov 2021 17:57:21 -0700 Subject: [PATCH] Correctly apply scrollY The previous calculation was not correct. Now we interpolate between the requested height, including the override, and the actual view bounds. Test: visual Bug: 199047412 Change-Id: I62104d04c9cee22d12ca63d55e4f834e44dde335 --- .../src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt index 69be332619957..2bd5c8f0fc203 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt @@ -242,12 +242,12 @@ open class QSTileViewImpl @JvmOverloads constructor( } private fun updateHeight() { - val actualHeight = (if (heightOverride != HeightOverrideable.NO_OVERRIDE) { + val actualHeight = if (heightOverride != HeightOverrideable.NO_OVERRIDE) { heightOverride } else { measuredHeight - } * squishinessFraction).toInt() - bottom = top + actualHeight + } + bottom = top + (actualHeight * squishinessFraction).toInt() scrollY = (actualHeight - height) / 2 }