Fix for IndexOutOfBounds in TextView getWordLimitsAt.
Bug http://b/issue?id=2948904 Change-Id: I10008374da92d5a98ec567cc76732383e66c4c5b
This commit is contained in:
@@ -7047,14 +7047,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
return -1;
|
||||
}
|
||||
|
||||
int end = offset;
|
||||
int len = mText.length();
|
||||
int end = Math.min(offset, len);
|
||||
|
||||
if (end < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int start = end;
|
||||
int len = mText.length();
|
||||
|
||||
for (; start > 0; start--) {
|
||||
char c = mTransformed.charAt(start - 1);
|
||||
|
||||
Reference in New Issue
Block a user