Bug 720092 - java.lang.IndexOutOfBoundsException: getChars (0 ... 88168) ends beyond length 0. We do not know why this is happening yet. This patch catches the throw and logs what values we have for start and end. r=alexp

This commit is contained in:
Doug Turner 2012-01-31 09:24:31 -08:00
parent b1d8d3137e
commit dbc6457de2

View File

@ -206,8 +206,16 @@ public class GeckoInputConnection
extract.selectionEnd = b;
extract.startOffset = 0;
extract.text = content.toString();
try {
extract.text = content.toString();
} catch (IndexOutOfBoundsException iob) {
Log.d(LOGTAG,
"IndexOutOfBoundsException thrown from getExtractedText(). start: " +
Selection.getSelectionStart(content) +
" end: " + Selection.getSelectionEnd(content));
return null;
}
return extract;
}