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:
Gilles Debunne
2012-06-12 12:45:27 -07:00
committed by Android Git Automerger

View File

@@ -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));
}