Change a dangerous ID

The message id 0 is used intrinsically by the framework
for all messages without a specific ID. Using 0 here
we can't reliably use the post(Runnable) method on our
handler, because these would in *some* respects be taken
for update_suggestion messages, but not all.
For example, they'd be removed on removeMessage() but
they would not trigger the actual process. This would
lead to utter confusion.

Change-Id: I5d9b01d38e2ff090cd0d80c27421dc8a41c317b8
This commit is contained in:
Jean Chalard 2012-03-01 19:05:51 +09:00
parent 870a1ab156
commit fa12acb8b7

View file

@ -242,7 +242,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
public final UIHandler mHandler = new UIHandler(this);
public static class UIHandler extends StaticInnerHandlerWrapper<LatinIME> {
private static final int MSG_UPDATE_SUGGESTIONS = 0;
private static final int MSG_UPDATE_SHIFT_STATE = 1;
private static final int MSG_VOICE_RESULTS = 2;
private static final int MSG_FADEOUT_LANGUAGE_ON_SPACEBAR = 3;
@ -250,6 +249,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
private static final int MSG_SPACE_TYPED = 5;
private static final int MSG_SET_BIGRAM_PREDICTIONS = 6;
private static final int MSG_PENDING_IMS_CALLBACK = 7;
private static final int MSG_UPDATE_SUGGESTIONS = 8;
private int mDelayBeforeFadeoutLanguageOnSpacebar;
private int mDelayUpdateSuggestions;