am a447eaca: Merge "Prevent a crash when maxLines is set to 0" into jb-dev
* commit 'a447eaca555e45ebbbc5e4de2762e19dbca12980': Prevent a crash when maxLines is set to 0
This commit is contained in:
@@ -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