Loading java/src/com/android/inputmethod/latin/WordComposer.java +9 −16 Original line number Diff line number Diff line Loading @@ -165,14 +165,14 @@ public final class WordComposer { } /** * Add a new event for a key stroke, with the pressed key's code point with the touch point * coordinates. * Process an input event. * * All input events should be supported, including software/hardware events, characters as well * as deletions, multiple inputs and gestures. * * @param event the event to process. */ public void add(final Event event) { processEvent(event); } private void processEvent(final Event event) { public void processEvent(final Event event) { final int primaryCode = event.mCodePoint; final int keyX = event.mX; final int keyY = event.mY; Loading Loading @@ -223,13 +223,6 @@ public final class WordComposer { mAutoCorrection = null; } /** * Delete the last composing unit as a result of hitting backspace. */ public void deleteLast(final Event event) { processEvent(event); } public void setCursorPositionWithinWord(final int posWithinWord) { mCursorPositionWithinWord = posWithinWord; // TODO: compute where that puts us inside the events Loading Loading @@ -301,7 +294,7 @@ public final class WordComposer { final int codePoint = Character.codePointAt(word, i); // We don't want to override the batch input points that are held in mInputPointers // (See {@link #add(int,int,int)}). add(Event.createEventForCodePointFromUnknownSource(codePoint)); processEvent(Event.createEventForCodePointFromUnknownSource(codePoint)); } } Loading @@ -318,7 +311,7 @@ public final class WordComposer { reset(); final int length = codePoints.length; for (int i = 0; i < length; ++i) { add(Event.createEventForCodePointFromAlreadyTypedText(codePoints[i], processEvent(Event.createEventForCodePointFromAlreadyTypedText(codePoints[i], CoordinateUtils.xFromArray(coordinates, i), CoordinateUtils.yFromArray(coordinates, i))); } Loading java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +2 −2 Original line number Diff line number Diff line Loading @@ -727,7 +727,7 @@ public final class InputLogic { resetComposingState(false /* alsoResetLastComposedWord */); } if (isComposingWord) { mWordComposer.add(inputTransaction.mEvent); mWordComposer.processEvent(inputTransaction.mEvent); // If it's the first letter, make note of auto-caps state if (mWordComposer.isSingleLetter()) { // We pass 1 to getPreviousWordForSuggestion because we were not composing a word Loading Loading @@ -893,7 +893,7 @@ public final class InputLogic { mWordComposer.reset(); mWordComposer.setRejectedBatchModeSuggestion(rejectedSuggestion); } else { mWordComposer.deleteLast(inputTransaction.mEvent); mWordComposer.processEvent(inputTransaction.mEvent); } mConnection.setComposingText(getTextWithUnderline(mWordComposer.getTypedWord()), 1); inputTransaction.setRequiresUpdateSuggestions(); Loading Loading
java/src/com/android/inputmethod/latin/WordComposer.java +9 −16 Original line number Diff line number Diff line Loading @@ -165,14 +165,14 @@ public final class WordComposer { } /** * Add a new event for a key stroke, with the pressed key's code point with the touch point * coordinates. * Process an input event. * * All input events should be supported, including software/hardware events, characters as well * as deletions, multiple inputs and gestures. * * @param event the event to process. */ public void add(final Event event) { processEvent(event); } private void processEvent(final Event event) { public void processEvent(final Event event) { final int primaryCode = event.mCodePoint; final int keyX = event.mX; final int keyY = event.mY; Loading Loading @@ -223,13 +223,6 @@ public final class WordComposer { mAutoCorrection = null; } /** * Delete the last composing unit as a result of hitting backspace. */ public void deleteLast(final Event event) { processEvent(event); } public void setCursorPositionWithinWord(final int posWithinWord) { mCursorPositionWithinWord = posWithinWord; // TODO: compute where that puts us inside the events Loading Loading @@ -301,7 +294,7 @@ public final class WordComposer { final int codePoint = Character.codePointAt(word, i); // We don't want to override the batch input points that are held in mInputPointers // (See {@link #add(int,int,int)}). add(Event.createEventForCodePointFromUnknownSource(codePoint)); processEvent(Event.createEventForCodePointFromUnknownSource(codePoint)); } } Loading @@ -318,7 +311,7 @@ public final class WordComposer { reset(); final int length = codePoints.length; for (int i = 0; i < length; ++i) { add(Event.createEventForCodePointFromAlreadyTypedText(codePoints[i], processEvent(Event.createEventForCodePointFromAlreadyTypedText(codePoints[i], CoordinateUtils.xFromArray(coordinates, i), CoordinateUtils.yFromArray(coordinates, i))); } Loading
java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +2 −2 Original line number Diff line number Diff line Loading @@ -727,7 +727,7 @@ public final class InputLogic { resetComposingState(false /* alsoResetLastComposedWord */); } if (isComposingWord) { mWordComposer.add(inputTransaction.mEvent); mWordComposer.processEvent(inputTransaction.mEvent); // If it's the first letter, make note of auto-caps state if (mWordComposer.isSingleLetter()) { // We pass 1 to getPreviousWordForSuggestion because we were not composing a word Loading Loading @@ -893,7 +893,7 @@ public final class InputLogic { mWordComposer.reset(); mWordComposer.setRejectedBatchModeSuggestion(rejectedSuggestion); } else { mWordComposer.deleteLast(inputTransaction.mEvent); mWordComposer.processEvent(inputTransaction.mEvent); } mConnection.setComposingText(getTextWithUnderline(mWordComposer.getTypedWord()), 1); inputTransaction.setRequiresUpdateSuggestions(); Loading