summaryrefslogtreecommitdiffstats
path: root/core/jni/android
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2012-10-04 23:15:12 -0700
committerRaph Levien <raph@google.com>2012-10-04 23:15:12 -0700
commit577b07197b1bf1b3903e0bc0f3d48fabfd927b2a (patch)
tree0751627bf12adee08327e00a6fd1b8d01a3c9297 /core/jni/android
parent82b946496e2a503b5b21af318af5be828a223a44 (diff)
downloadframeworks_base-577b07197b1bf1b3903e0bc0f3d48fabfd927b2a.zip
frameworks_base-577b07197b1bf1b3903e0bc0f3d48fabfd927b2a.tar.gz
frameworks_base-577b07197b1bf1b3903e0bc0f3d48fabfd927b2a.tar.bz2
Fix for 7281523 android.text.cts.SelectionTest#testMoveRight failures
The failures were caused by the implementation of doTextRunCursor passing a too-small value for contextCount into the underlying getTextRunAdvances call (it wasn't accounting for the start offset). Thus, when getTextRunAdvances made a copy of the text for its cache key, it was getting a partial copy. This patch fixes the size so the cache key always has a full copy of the text. Change-Id: I57e3ac6de7aef0e1f1c7000dc3d653f9b0d623d2
Diffstat (limited to 'core/jni/android')
-rw-r--r--core/jni/android/graphics/Paint.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp
index 1f70c66..150caf3 100644
--- a/core/jni/android/graphics/Paint.cpp
+++ b/core/jni/android/graphics/Paint.cpp
@@ -629,7 +629,7 @@ public:
jint count, jint flags, jint offset, jint opt) {
jfloat scalarArray[count];
- TextLayout::getTextRunAdvances(paint, text, start, count, count, flags,
+ TextLayout::getTextRunAdvances(paint, text, start, count, start + count, flags,
scalarArray, NULL /* dont need totalAdvance */);
jint pos = offset - start;