am d104a7aa: Merge "Fix a bug where words disappear on inserting separators"

* commit 'd104a7aac8b0791341c71deb013d4e6adfc57e8a':
  Fix a bug where words disappear on inserting separators
main
Jean Chalard 2012-01-16 23:23:46 -08:00 committed by Android Git Automerger
commit 0310c3f13d
1 changed files with 7 additions and 1 deletions

View File

@ -1414,7 +1414,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
if (mDeleteCount > DELETE_ACCELERATE_AT) {
ic.deleteSurroundingText(1, 0);
}
restartSuggestionsOnWordBeforeCursorIfAtEndOfWord(ic);
if (isSuggestionsRequested()) {
restartSuggestionsOnWordBeforeCursorIfAtEndOfWord(ic);
}
}
}
}
@ -1706,6 +1708,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// Check if we have a suggestion engine attached.
if ((mSuggest == null || !isSuggestionsRequested())
&& !mVoiceProxy.isVoiceInputHighlighted()) {
if (mWordComposer.isComposingWord()) {
Log.w(TAG, "Called updateSuggestions but suggestions were not requested!");
mWordComposer.setAutoCorrection(mWordComposer.getTypedWord());
}
return;
}