diff options
author | Eric Fischer <enf@google.com> | 2009-08-31 15:14:35 -0700 |
---|---|---|
committer | Eric Fischer <enf@google.com> | 2009-09-01 10:28:11 -0700 |
commit | a82e99a89b7a12bd86d99d60d23a7a37624499b6 (patch) | |
tree | 1194c3c5c443720932e29eb0cbd6952110025098 /core/java/android/text | |
parent | 57f03f0b5d0228799111651aa6915f7d837d501e (diff) | |
download | frameworks_base-a82e99a89b7a12bd86d99d60d23a7a37624499b6.zip frameworks_base-a82e99a89b7a12bd86d99d60d23a7a37624499b6.tar.gz frameworks_base-a82e99a89b7a12bd86d99d60d23a7a37624499b6.tar.bz2 |
Fix an emoji-measuring bug that caused an exception when editing a contact.
It was measuring the text to try to determine the size that it needed to
scale the emoji character to. Unfortunately it was accidentally trying
to measure the character under the cursor instead of the emoji character
itself, which is wrong, but more seriously doesn't work at all when the
cursor is at the end of the line.
This was already fixed before in change 144474, but that change never got
merged over to donut. So this merges it now.
Bug 2087915
Change-Id: Ib4804d330a029a966207b3b07271f84e6b2652c0
Diffstat (limited to 'core/java/android/text')
-rw-r--r-- | core/java/android/text/Layout.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java index 29dc2ea..a92800d 100644 --- a/core/java/android/text/Layout.java +++ b/core/java/android/text/Layout.java @@ -1527,7 +1527,7 @@ public abstract class Layout { if (bm != null) { workPaint.set(paint); Styled.measureText(paint, workPaint, text, - offset, offset + 1, null); + j, j + 2, null); float wid = (float) bm.getWidth() * -workPaint.ascent() / bm.getHeight(); |