Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9a0886d authored by Siyamed Sinir's avatar Siyamed Sinir
Browse files

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
parent 1ee2dd2f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 :