Fix an NPE
Bug: 8620678 Change-Id: Ia91761f33518a010b2844d34523cadece261c67e
This commit is contained in:
parent
033958330d
commit
2b42ad0eaa
1 changed files with 1 additions and 0 deletions
|
@ -2413,6 +2413,7 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
|
|||
if (!mConnection.isCursorTouchingWord(mSettings.getCurrent())) return;
|
||||
final Range range = mConnection.getWordRangeAtCursor(mSettings.getWordSeparators(),
|
||||
0 /* additionalPrecedingWordsCount */);
|
||||
if (null == range) return; // Happens if we don't have an input connection at all
|
||||
final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList();
|
||||
final String typedWord = range.mWord.toString();
|
||||
if (range.mWord instanceof SpannableString) {
|
||||
|
|
Loading…
Reference in a new issue