summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2015-07-09 19:56:18 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-09 19:56:20 +0000
commit968f9fdf8b2042b4d7b408f4b2a9db5008eaca6e (patch)
tree3c3905169e6d5572d70c6d4a3ded5ebfaebb3f1a /core
parent3cc5c24b83edaab66c97b161e25ff0bd93b3e1b4 (diff)
parenta0419de2a99a61f399da5400bdc229998edce6c2 (diff)
downloadframeworks_base-968f9fdf8b2042b4d7b408f4b2a9db5008eaca6e.zip
frameworks_base-968f9fdf8b2042b4d7b408f4b2a9db5008eaca6e.tar.gz
frameworks_base-968f9fdf8b2042b4d7b408f4b2a9db5008eaca6e.tar.bz2
Merge "Slightly more precise RTL check in BoringLayout.isBoring()" into mnc-dev
Diffstat (limited to 'core')
-rw-r--r--core/java/android/text/BoringLayout.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/text/BoringLayout.java b/core/java/android/text/BoringLayout.java
index e78cf8f..aa8b71c 100644
--- a/core/java/android/text/BoringLayout.java
+++ b/core/java/android/text/BoringLayout.java
@@ -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;
}