Merge "Null check at BackToAcceptedDefault"

main
satok 2010-07-01 14:45:28 -07:00 committed by Gerrit Code Review
commit e8e153490d
2 changed files with 3 additions and 2 deletions

View File

@ -1288,7 +1288,7 @@ public class LatinIME extends InputMethodService
doubleSpace();
}
if (pickedDefault) {
TextEntryState.backToAcceptedDefault();
TextEntryState.backToAcceptedDefault(mWord.getTypedWord());
}
updateShiftKeyState(getCurrentInputEditorInfo());
if (ic != null) {

View File

@ -138,7 +138,8 @@ public class TextEntryState {
// STATE_ACCEPTED_DEFAULT will be changed to other sub-states
// (see "case STATE_ACCEPTED_DEFAULT" in typedCharacter() below),
// and should be restored back to STATE_ACCEPTED_DEFAULT after processing for each sub-state.
public static void backToAcceptedDefault() {
public static void backToAcceptedDefault(CharSequence typedWord) {
if (typedWord == null) return;
switch (sState) {
case STATE_SPACE_AFTER_ACCEPTED:
case STATE_PUNCTUATION_AFTER_ACCEPTED: