Follow-up to I36faf679 Cancel pending messages related to suggestion updates.

bug: 3058217
Change-Id: I54e29bf051b76ad27e6d653adbf14892083ad7eb
main
Ken Wakasa 2010-10-06 18:39:47 +09:00
parent 3425026d51
commit 6495bfc7a6
1 changed files with 8 additions and 0 deletions

View File

@ -727,6 +727,14 @@ public class LatinIME extends InputMethodService
if (mUserBigramDictionary != null) mUserBigramDictionary.flushPendingWrites(); if (mUserBigramDictionary != null) mUserBigramDictionary.flushPendingWrites();
} }
@Override
public void onFinishInputView(boolean finishingInput) {
super.onFinishInputView(finishingInput);
// Remove penging messages related to update suggestions
mHandler.removeMessages(MSG_UPDATE_SUGGESTIONS);
mHandler.removeMessages(MSG_UPDATE_OLD_SUGGESTIONS);
}
@Override @Override
public void onUpdateExtractedText(int token, ExtractedText text) { public void onUpdateExtractedText(int token, ExtractedText text) {
super.onUpdateExtractedText(token, text); super.onUpdateExtractedText(token, text);