Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa12acb8 authored by Jean Chalard's avatar Jean Chalard
Browse files

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
parent 870a1ab1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;