am 6e98c280: Merge "Fix for IndexOutOfBounds in setComposingRegion." into gingerbread
Merge commit '6e98c280f792932d60bf9374c8979d9eadce2d9c' into gingerbread-plus-aosp * commit '6e98c280f792932d60bf9374c8979d9eadce2d9c': Fix for IndexOutOfBounds in setComposingRegion.
This commit is contained in:
@@ -428,8 +428,12 @@ public class BaseInputConnection implements InputConnection {
|
||||
a = b;
|
||||
b = tmp;
|
||||
}
|
||||
// Clip the end points to be within the content bounds.
|
||||
final int length = content.length();
|
||||
if (a < 0) a = 0;
|
||||
if (b > content.length()) b = content.length();
|
||||
if (b < 0) b = 0;
|
||||
if (a > length) a = length;
|
||||
if (b > length) b = length;
|
||||
|
||||
ensureDefaultComposingSpans();
|
||||
if (mDefaultComposingSpans != null) {
|
||||
|
||||
Reference in New Issue
Block a user