Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd819a4a authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Check lineHeight without cast" into udc-dev

parents 386848cb 6f968fe7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -6228,7 +6228,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
    }
    private void setLineHeightPx(@Px @FloatRange(from = 0) float lineHeight) {
        Preconditions.checkArgumentNonnegative((int) lineHeight);
        Preconditions.checkArgumentNonNegative(lineHeight,
                "Expecting non-negative lineHeight while the input is " + lineHeight);
        final int fontHeight = getPaint().getFontMetricsInt(null);
        // Make sure we don't setLineSpacing if it's not needed to avoid unnecessary redraw.