summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2012-10-22 15:56:01 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-22 15:56:01 -0700
commit74437532fe2a3e9ebd15c61327fd3f2b68c299b3 (patch)
tree1b3cee05d3503c651dbc6329e69aa9848dbed11b /core
parent74261d847f64ccfeba0a7f08f6c59473a3b6647d (diff)
parent42ef515d185d4fc038d602172789cc264f1d9960 (diff)
downloadframeworks_base-74437532fe2a3e9ebd15c61327fd3f2b68c299b3.zip
frameworks_base-74437532fe2a3e9ebd15c61327fd3f2b68c299b3.tar.gz
frameworks_base-74437532fe2a3e9ebd15c61327fd3f2b68c299b3.tar.bz2
Merge "Fix for bug: Gmail (and other places): cursor placed on top of letter" into jb-mr1-dev
Diffstat (limited to 'core')
-rw-r--r--core/java/android/text/TextLine.java33
1 files changed, 14 insertions, 19 deletions
diff --git a/core/java/android/text/TextLine.java b/core/java/android/text/TextLine.java
index 0d2835a..1fecf81 100644
--- a/core/java/android/text/TextLine.java
+++ b/core/java/android/text/TextLine.java
@@ -939,27 +939,22 @@ class TextLine {
continue;
}
- if (c == null) {
- x += handleText(wp, i, mlimit, i, inext, runIsRtl, c, x, top,
- y, bottom, fmi, needWidth || mlimit < measureLimit);
- } else {
- for (int j = i, jnext; j < mlimit; j = jnext) {
- jnext = mCharacterStyleSpanSet.getNextTransition(mStart + j, mStart + mlimit) -
- mStart;
-
- wp.set(mPaint);
- for (int k = 0; k < mCharacterStyleSpanSet.numberOfSpans; k++) {
- // Intentionally using >= and <= as explained above
- if ((mCharacterStyleSpanSet.spanStarts[k] >= mStart + jnext) ||
- (mCharacterStyleSpanSet.spanEnds[k] <= mStart + j)) continue;
-
- CharacterStyle span = mCharacterStyleSpanSet.spans[k];
- span.updateDrawState(wp);
- }
+ for (int j = i, jnext; j < mlimit; j = jnext) {
+ jnext = mCharacterStyleSpanSet.getNextTransition(mStart + j, mStart + mlimit) -
+ mStart;
+
+ wp.set(mPaint);
+ for (int k = 0; k < mCharacterStyleSpanSet.numberOfSpans; k++) {
+ // Intentionally using >= and <= as explained above
+ if ((mCharacterStyleSpanSet.spanStarts[k] >= mStart + jnext) ||
+ (mCharacterStyleSpanSet.spanEnds[k] <= mStart + j)) continue;
- x += handleText(wp, j, jnext, i, inext, runIsRtl, c, x,
- top, y, bottom, fmi, needWidth || jnext < measureLimit);
+ CharacterStyle span = mCharacterStyleSpanSet.spans[k];
+ span.updateDrawState(wp);
}
+
+ x += handleText(wp, j, jnext, i, inext, runIsRtl, c, x,
+ top, y, bottom, fmi, needWidth || jnext < measureLimit);
}
}