diff options
| author | Raph Levien <raph@google.com> | 2012-10-22 15:56:01 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-22 15:56:01 -0700 |
| commit | 74437532fe2a3e9ebd15c61327fd3f2b68c299b3 (patch) | |
| tree | 1b3cee05d3503c651dbc6329e69aa9848dbed11b | |
| parent | 74261d847f64ccfeba0a7f08f6c59473a3b6647d (diff) | |
| parent | 42ef515d185d4fc038d602172789cc264f1d9960 (diff) | |
| download | frameworks_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
| -rw-r--r-- | core/java/android/text/TextLine.java | 33 |
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); } } |
