summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAlan Lau <alanlau@google.com>2014-07-28 19:52:11 +0000
committerAlan Lau <alanlau@google.com>2014-07-28 19:52:11 +0000
commitcbeef01cce314e3a3977b042d8ec0744816c0df4 (patch)
tree3ab132ec0206a9c508f113f93671eb0941646106 /core
parenta28e4764994283c3595dd41f12e425cf7dc0d985 (diff)
downloadframeworks_base-cbeef01cce314e3a3977b042d8ec0744816c0df4.zip
frameworks_base-cbeef01cce314e3a3977b042d8ec0744816c0df4.tar.gz
frameworks_base-cbeef01cce314e3a3977b042d8ec0744816c0df4.tar.bz2
Revert "DO NOT MERGE Fix line breaking for clusters in narrow views"
This reverts commit a28e4764994283c3595dd41f12e425cf7dc0d985. Change-Id: I73fe7b3e6bdba327e55a58afd36a7f58f49945d0
Diffstat (limited to 'core')
-rw-r--r--core/java/android/text/StaticLayout.java19
1 files changed, 5 insertions, 14 deletions
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 457e04f..814326c 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -379,7 +379,7 @@ public class StaticLayout extends Layout {
okBottom = fitBottom;
}
} else {
- final boolean moreChars;
+ final boolean moreChars = (j + 1 < spanEnd);
int endPos;
int above, below, top, bottom;
float currentTextWidth;
@@ -391,7 +391,6 @@ public class StaticLayout extends Layout {
top = okTop;
bottom = okBottom;
currentTextWidth = okWidth;
- moreChars = (j + 1 < spanEnd);
} else if (fit != here) {
endPos = fit;
above = fitAscent;
@@ -399,21 +398,13 @@ public class StaticLayout extends Layout {
top = fitTop;
bottom = fitBottom;
currentTextWidth = fitWidth;
- moreChars = (j + 1 < spanEnd);
} else {
- // must make progress, so take next character
endPos = here + 1;
- // but to deal properly with clusters
- // take all zero width characters following that
- while (endPos < spanEnd && widths[endPos - paraStart] == 0) {
- endPos++;
- }
- above = fmAscent;
- below = fmDescent;
- top = fmTop;
- bottom = fmBottom;
+ above = fm.ascent;
+ below = fm.descent;
+ top = fm.top;
+ bottom = fm.bottom;
currentTextWidth = widths[here - paraStart];
- moreChars = (endPos < spanEnd);
}
v = out(source, here, endPos,