Fix StaticLayout left/right indent

Because of a min/max issue, while processing each paragraph StaticLayout
would trim the left/right indent arrays incorrectly. 

Bug: 28090810
Change-Id: Ib2b9b48963861e0952bd45a079179e3cca86ffcf
This commit is contained in:
Siyamed Sinir
2016-04-12 19:30:44 -07:00
parent 1ee2dd2f5f
commit f9a0886da0

View File

@@ -683,7 +683,7 @@ public class StaticLayout extends Layout {
// interface.
int leftLen = mLeftIndents == null ? 0 : mLeftIndents.length;
int rightLen = mRightIndents == null ? 0 : mRightIndents.length;
int indentsLen = Math.max(1, Math.min(leftLen, rightLen) - mLineCount);
int indentsLen = Math.max(1, Math.max(leftLen, rightLen) - mLineCount);
int[] indents = new int[indentsLen];
for (int i = 0; i < indentsLen; i++) {
int leftMargin = mLeftIndents == null ? 0 :