Prevent a crash when maxLines is set to 0

Bug 6642222

Using setMaxLines(0) and setMinHeight(30) causes a crash
because Layout#getLineRangeForDraw() returns a [0,0] interval
in that case.

Accessing the Direction in draw causes a NPE.

Change-Id: If50f9b554e3cdc598a721b623992e9196982838c
1 file changed