Merge "Prevent a crash when maxLines is set to 0" into jb-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a447eaca55
@@ -456,6 +456,7 @@ public abstract class Layout {
|
||||
final int top = Math.max(dtop, 0);
|
||||
final int bottom = Math.min(getLineTop(getLineCount()), dbottom);
|
||||
|
||||
if (top >= bottom) return TextUtils.packRangeInLong(0, -1);
|
||||
return TextUtils.packRangeInLong(getLineForVertical(top), getLineForVertical(bottom));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user