diff options
author | Eric Fischer <enf@google.com> | 2010-03-10 17:59:48 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-03-10 17:59:48 -0800 |
commit | 26779e7e82cd27c4404a3ea01bee21699505276a (patch) | |
tree | ce45d92e2d937dd7ffb3bc283de199a2915bf66b /core/java/android/text | |
parent | 94d4b034adff90f681b0937bde8f7657b855929b (diff) | |
parent | de61f78340ae23384e16ad675aefdd01ddf07c76 (diff) | |
download | frameworks_base-26779e7e82cd27c4404a3ea01bee21699505276a.zip frameworks_base-26779e7e82cd27c4404a3ea01bee21699505276a.tar.gz frameworks_base-26779e7e82cd27c4404a3ea01bee21699505276a.tar.bz2 |
Merge "Don't break lines in the middle of a smiley or other graphic replacement."
Diffstat (limited to 'core/java/android/text')
-rw-r--r-- | core/java/android/text/StaticLayout.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java index 600ec7e..f02ad2a 100644 --- a/core/java/android/text/StaticLayout.java +++ b/core/java/android/text/StaticLayout.java @@ -233,25 +233,25 @@ extends Layout } } - if (!easy) { - // Ensure that none of the underlying characters are treated - // as viable breakpoints, and that the entire run gets the - // same bidi direction. + // Ensure that none of the underlying characters are treated + // as viable breakpoints, and that the entire run gets the + // same bidi direction. - if (source instanceof Spanned) { - Spanned sp = (Spanned) source; - ReplacementSpan[] spans = sp.getSpans(start, end, ReplacementSpan.class); + if (source instanceof Spanned) { + Spanned sp = (Spanned) source; + ReplacementSpan[] spans = sp.getSpans(start, end, ReplacementSpan.class); - for (int y = 0; y < spans.length; y++) { - int a = sp.getSpanStart(spans[y]); - int b = sp.getSpanEnd(spans[y]); + for (int y = 0; y < spans.length; y++) { + int a = sp.getSpanStart(spans[y]); + int b = sp.getSpanEnd(spans[y]); - for (int x = a; x < b; x++) { - chs[x - start] = '\uFFFC'; - } + for (int x = a; x < b; x++) { + chs[x - start] = '\uFFFC'; } } + } + if (!easy) { // XXX put override flags, etc. into chdirs dir = bidi(dir, chs, chdirs, n, false); |