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

Commit 37d61119 authored by Raph Levien's avatar Raph Levien Committed by Android (Google) Code Review
Browse files

Merge "Fix Layout.isRtlCharAt" into lmp-dev

parents 680e4255 87506205
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -727,10 +727,9 @@ public abstract class Layout {
        int[] runs = dirs.mDirections;
        int lineStart = getLineStart(line);
        for (int i = 0; i < runs.length; i += 2) {
            int start = lineStart + (runs[i] & RUN_LENGTH_MASK);
            // No need to test the end as an offset after the last run should return the value
            // corresponding of the last run
            if (offset >= start) {
            int start = lineStart + runs[i];
            int limit = start + (runs[i+1] & RUN_LENGTH_MASK);
            if (offset >= start && offset < limit) {
                int level = (runs[i+1] >>> RUN_LEVEL_SHIFT) & RUN_LEVEL_MASK;
                return ((level & 1) != 0);
            }