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

Commit 8f68487e authored by Seigo Nonaka's avatar Seigo Nonaka Committed by Android (Google) Code Review
Browse files

Merge "Fix BiDi Directions" into main

parents 6f6f0c78 43bef1fe
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -237,10 +237,13 @@ public class MeasuredParagraph {
            // Easy case: If the line instance only contains single directionality run, no need
            // to reorder visually.
            if (bidi.getRunCount() == 1) {
                if ((bidi.getParaLevel() & 0x01) == 1) {
                if (bidi.getRunLevel(0) == 1) {
                    return Layout.DIRS_ALL_RIGHT_TO_LEFT;
                } else {
                } else if (bidi.getRunLevel(0) == 0) {
                    return Layout.DIRS_ALL_LEFT_TO_RIGHT;
                } else {
                    return new Directions(new int[] {
                            0, bidi.getRunLevel(0) << Layout.RUN_LEVEL_SHIFT | (end - start)});
                }
            }