Loading java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +4 −3 Original line number Diff line number Diff line Loading @@ -69,7 +69,8 @@ public final class InputLogic { // TODO : Remove this member when we can. private final LatinIME mLatinIME; private InputLogicHandler mInputLogicHandler; // Never null. private InputLogicHandler mInputLogicHandler = InputLogicHandler.NULL_HANDLER; // TODO : make all these fields private as soon as possible. // Current space state of the input method. This can be any of the above constants. Loading Loading @@ -105,7 +106,7 @@ public final class InputLogic { mWordComposer = new WordComposer(); mEventInterpreter = new EventInterpreter(latinIME); mConnection = new RichInputConnection(latinIME); mInputLogicHandler = null; mInputLogicHandler = InputLogicHandler.NULL_HANDLER; } /** Loading Loading @@ -145,7 +146,7 @@ public final class InputLogic { } resetComposingState(true /* alsoResetLastComposedWord */); mInputLogicHandler.destroy(); mInputLogicHandler = null; mInputLogicHandler = InputLogicHandler.NULL_HANDLER; } /** Loading java/src/com/android/inputmethod/latin/inputlogic/InputLogicHandler.java +27 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,33 @@ public class InputLogicHandler implements Handler.Callback { private static final int MSG_GET_SUGGESTED_WORDS = 1; // A handler that never does anything. This is used for cases where events come before anything // is initialized, though probably only the monkey can actually do this. public static final InputLogicHandler NULL_HANDLER = new InputLogicHandler() { @Override public void destroy() {} @Override public boolean handleMessage(final Message msg) { return true; } @Override public void onStartBatchInput() {} @Override public void onUpdateBatchInput(final InputPointers batchPointers, final int sequenceNumber) {} @Override public void onCancelBatchInput() {} @Override public void onEndBatchInput(final InputPointers batchPointers, final int sequenceNumber) {} @Override public void getSuggestedWords(final int sessionId, final int sequenceNumber, final OnGetSuggestedWordsCallback callback) {} }; private InputLogicHandler() { mNonUIThreadHandler = null; mLatinIME = null; mInputLogic = null; } public InputLogicHandler(final LatinIME latinIME, final InputLogic inputLogic) { final HandlerThread handlerThread = new HandlerThread( InputLogicHandler.class.getSimpleName()); Loading Loading
java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +4 −3 Original line number Diff line number Diff line Loading @@ -69,7 +69,8 @@ public final class InputLogic { // TODO : Remove this member when we can. private final LatinIME mLatinIME; private InputLogicHandler mInputLogicHandler; // Never null. private InputLogicHandler mInputLogicHandler = InputLogicHandler.NULL_HANDLER; // TODO : make all these fields private as soon as possible. // Current space state of the input method. This can be any of the above constants. Loading Loading @@ -105,7 +106,7 @@ public final class InputLogic { mWordComposer = new WordComposer(); mEventInterpreter = new EventInterpreter(latinIME); mConnection = new RichInputConnection(latinIME); mInputLogicHandler = null; mInputLogicHandler = InputLogicHandler.NULL_HANDLER; } /** Loading Loading @@ -145,7 +146,7 @@ public final class InputLogic { } resetComposingState(true /* alsoResetLastComposedWord */); mInputLogicHandler.destroy(); mInputLogicHandler = null; mInputLogicHandler = InputLogicHandler.NULL_HANDLER; } /** Loading
java/src/com/android/inputmethod/latin/inputlogic/InputLogicHandler.java +27 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,33 @@ public class InputLogicHandler implements Handler.Callback { private static final int MSG_GET_SUGGESTED_WORDS = 1; // A handler that never does anything. This is used for cases where events come before anything // is initialized, though probably only the monkey can actually do this. public static final InputLogicHandler NULL_HANDLER = new InputLogicHandler() { @Override public void destroy() {} @Override public boolean handleMessage(final Message msg) { return true; } @Override public void onStartBatchInput() {} @Override public void onUpdateBatchInput(final InputPointers batchPointers, final int sequenceNumber) {} @Override public void onCancelBatchInput() {} @Override public void onEndBatchInput(final InputPointers batchPointers, final int sequenceNumber) {} @Override public void getSuggestedWords(final int sessionId, final int sequenceNumber, final OnGetSuggestedWordsCallback callback) {} }; private InputLogicHandler() { mNonUIThreadHandler = null; mLatinIME = null; mInputLogic = null; } public InputLogicHandler(final LatinIME latinIME, final InputLogic inputLogic) { final HandlerThread handlerThread = new HandlerThread( InputLogicHandler.class.getSimpleName()); Loading