Merge "Check lineHeight without cast" into udc-dev am: cd819a4aef
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23090895 Change-Id: Ib175018e1f4befc849ac099d99c11ec4a28e2890 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user