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

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

Merge "Slightly more precise RTL check in BoringLayout.isBoring()" into mnc-dev

parents 3cc5c24b a0419de2
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -269,7 +269,15 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
            for (int a = 0; a < n; a++) {
                char c = temp[a];

                if (c == '\n' || c == '\t' || c >= FIRST_RIGHT_TO_LEFT) {
                if (c == '\n' || c == '\t' ||
                        (c >= 0x0590 && c <= 0x08FF) ||  // RTL scripts
                        c == 0x200F ||  // Bidi format character
                        (c >= 0x202A && c <= 0x202E) ||  // Bidi format characters
                        (c >= 0x2066 && c <= 0x2069) ||  // Bidi format characters
                        (c >= 0xD800 && c <= 0xDFFF) ||  // surrogate pairs
                        (c >= 0xFB1D && c <= 0xFDFF) ||  // Hebrew and Arabic presentation forms
                        (c >= 0xFE70 && c <= 0xFEFE) // Arabic presentation forms
                   ) {
                    boring = false;
                    break outer;
                }