Null check at BackToAcceptedDefault

Change-Id: Ib232475520f822bf8613258afb9638e1be50d7f7
main
satok 2010-07-02 06:36:02 +09:00
parent c700ffcddf
commit ac108d5b34
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: