summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hawkwood Glazier <jglazier@google.com> 2025-02-19 16:59:41 +0000
committer Hawkwood Glazier <jglazier@google.com> 2025-02-19 17:02:16 +0000
commitca7e901e700c81c284dfe813c8896cc1d7c7f07a (patch)
treebcead22132dddea440f891ccaaed392b47e2d95c
parentc26379f212e327cbf9ee93b3f72fb08be07a1b82 (diff)
Remove requestLayout when setting interpolated view bounds
Bug: 394840414 Test: Manually checked perf; regresses functionality Flag: com.android.systemui.shared.clock_reactive_variants Change-Id: Ic4fff4217f3242a8fac356ee2dd8bdfa01f208dd
-rw-r--r--packages/SystemUI/customization/src/com/android/systemui/shared/clocks/view/SimpleDigitalClockTextView.kt13
1 files changed, 2 insertions, 11 deletions
diff --git a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/view/SimpleDigitalClockTextView.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/view/SimpleDigitalClockTextView.kt
index 8317aa39ef2b..54be4d81ea06 100644
--- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/view/SimpleDigitalClockTextView.kt
+++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/view/SimpleDigitalClockTextView.kt
@@ -215,12 +215,7 @@ open class SimpleDigitalClockTextView(
)
}
- setInterpolatedViewBounds(
- getInterpolatedTextBounds(),
- widthMeasureSpec,
- heightMeasureSpec,
- force = true,
- )
+ setInterpolatedViewBounds(getInterpolatedTextBounds(), widthMeasureSpec, heightMeasureSpec)
}
override fun onDraw(canvas: Canvas) {
@@ -388,7 +383,6 @@ open class SimpleDigitalClockTextView(
interpBounds: Rect,
widthMeasureSpec: Int = measuredWidthAndState,
heightMeasureSpec: Int = measuredHeightAndState,
- force: Boolean = false,
) {
val heightMode = MeasureSpec.getMode(heightMeasureSpec)
val widthMode = MeasureSpec.getMode(widthMeasureSpec)
@@ -415,10 +409,7 @@ open class SimpleDigitalClockTextView(
)
}
- if (force || widthSpec != measuredWidthAndState || heightSpec != measuredHeightAndState) {
- setMeasuredDimension(widthSpec, heightSpec)
- parent?.requestLayout()
- }
+ setMeasuredDimension(widthSpec, heightSpec)
}
private fun updateXTranslation(inPoint: Point, interpolatedTextBounds: Rect): Point {