OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge "Fix bug #5233207 android.graphics.cts.PaintTest#testBreakText fails on IRK56F...
[android-x86/frameworks-base.git]
/
graphics
/
java
/
android
/
graphics
/
Paint.java
diff --git
a/graphics/java/android/graphics/Paint.java
b/graphics/java/android/graphics/Paint.java
index
b4d94f3
..
896f81e
100644
(file)
--- a/
graphics/java/android/graphics/Paint.java
+++ b/
graphics/java/android/graphics/Paint.java
@@
-1349,7
+1349,7
@@
public class Paint {
if (text == null) {
throw new IllegalArgumentException("text cannot be null");
}
- if (
(index | count) < 0 || index + count > text.length
) {
+ if (
index < 0 || text.length - index < Math.abs(count)
) {
throw new ArrayIndexOutOfBoundsException();
}