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

* commit '968f9fdf8b2042b4d7b408f4b2a9db5008eaca6e':
  Slightly more precise RTL check in BoringLayout.isBoring()
This commit is contained in:
Raph Levien
2015-07-09 20:10:17 +00:00
committed by Android Git Automerger

View File

@@ -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;
}