Separate updateSuggestionStrip from commitTyped
The commitTyped() called updateSuggestionStrip(), and that led to call Suggest.getSuggestedWordsForTypingInput() even after a batch input was started because WordComposer.commitWord() reset the batch input state. Bug: 6932442 Change-Id: If645b1ef0343aa1e21ca71a9275b40c6c3be13dfmain
parent
4e9e6cd154
commit
0a524de3df
|
@ -545,9 +545,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
commitTyped(LastComposedWord.NOT_A_SEPARATOR);
|
||||
mConnection.finishComposingText();
|
||||
mConnection.endBatchEdit();
|
||||
if (isShowingOptionDialog())
|
||||
if (isShowingOptionDialog()) {
|
||||
mOptionsDialog.dismiss();
|
||||
}
|
||||
}
|
||||
super.onConfigurationChanged(conf);
|
||||
}
|
||||
|
||||
|
@ -1046,7 +1047,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
LastComposedWord.COMMIT_TYPE_USER_TYPED_WORD, typedWord.toString(),
|
||||
separatorCode, prevWord);
|
||||
}
|
||||
updateSuggestionStrip();
|
||||
}
|
||||
|
||||
// Called from the KeyboardSwitcher which needs to know auto caps state to display
|
||||
|
@ -1330,10 +1330,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
|
||||
// Called from PointerTracker through the KeyboardActionListener interface
|
||||
@Override
|
||||
public void onTextInput(CharSequence text) {
|
||||
public void onTextInput(CharSequence rawText) {
|
||||
mConnection.beginBatchEdit();
|
||||
commitTyped(LastComposedWord.NOT_A_SEPARATOR);
|
||||
text = specificTldProcessingOnTextInput(text);
|
||||
mHandler.postUpdateSuggestionStrip();
|
||||
final CharSequence text = specificTldProcessingOnTextInput(rawText);
|
||||
if (SPACE_STATE_PHANTOM == mSpaceState) {
|
||||
sendKeyCodePoint(Keyboard.CODE_SPACE);
|
||||
}
|
||||
|
@ -1688,9 +1689,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
commitTyped(LastComposedWord.NOT_A_SEPARATOR);
|
||||
requestHideSelf(0);
|
||||
MainKeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
|
||||
if (inputView != null)
|
||||
if (inputView != null) {
|
||||
inputView.closing();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: make this private
|
||||
// Outside LatinIME, only used by the test suite.
|
||||
|
|
Loading…
Reference in New Issue