Bug 767791 - Selection ranges exclude end index, so write [a,b), not (a,b]. r=blassey

--HG--
extra : rebase_source : 21654ebe8bedb0c175518a1aa494134f4b622de6
This commit is contained in:
Chris Peterson 2012-06-26 17:06:26 -07:00
Родитель c74f6f6bd1
Коммит 88adede93d
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -308,8 +308,8 @@ public class GeckoInputConnection
Span selection = Span.clamp(currentStart, currentEnd, content);
if (selection.start != currentStart || selection.end != currentEnd) {
Log.e(LOGTAG, "CLAMPING BOGUS SELECTION (" + currentStart + ", " + currentEnd
+ "] -> (" + selection.start + ", " + selection.end + "]",
Log.e(LOGTAG, "CLAMPING BOGUS SELECTION [" + currentStart + ", " + currentEnd
+ ") -> [" + selection.start + ", " + selection.end + ")",
new AssertionError());
super.setSelection(selection.start, selection.end);
}
@ -505,7 +505,7 @@ public class GeckoInputConnection
if (start != a || end != b) {
if (DEBUG) {
Log.d(LOGTAG, String.format(
". . . notifySelectionChange: current editable selection: [%d, %d]",
". . . notifySelectionChange: current editable selection: [%d, %d)",
a, b));
}
@ -1134,8 +1134,8 @@ public class GeckoInputConnection
// Does the editable have a composing span?
if (start < 0 || end < 0) {
if (start != -1 || end != -1) {
throw new IndexOutOfBoundsException("Bad composing span (" + start + "," + end
+ "], contentLength=" + content.length());
throw new IndexOutOfBoundsException("Bad composing span [" + start + "," + end
+ "), contentLength=" + content.length());
}
return null;
}