fix(non linear font scaling)!: add ComplexDimensionUnit annotation to setLineHeight()
Bug: 273326061
Test: n/a
Change-Id: I28e489d4814a60507d43affa3517cf5a15d28ec0
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index d56a06f..67c9f8c 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -6232,7 +6232,10 @@
* @attr ref android.R.styleable#TextView_lineHeight
*/
@android.view.RemotableViewMethod
- public void setLineHeight(int unit, @FloatRange(from = 0) float lineHeight) {
+ public void setLineHeight(
+ @TypedValue.ComplexDimensionUnit int unit,
+ @FloatRange(from = 0) float lineHeight
+ ) {
setLineHeightPx(
TypedValue.applyDimension(unit, lineHeight, getDisplayMetricsOrSystem()));
}