From 76fc4914b31a7a83da9d1b53d6db2d9c4e651293 Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Wed, 30 Jul 2014 00:31:57 +0000 Subject: [PATCH] Revert "[HW8] Pull up the processed event." This reverts commit ebdd641d585e7273bbce1e018d4632e3c3187762. Reverting due to a few critical bugs and unit test failures. Change-Id: Ie7958d749dc813c1752d03aec7f14f5586225ff7 --- .../inputmethod/latin/inputlogic/InputLogic.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index f2a6f3b2e..bb2d304a6 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -712,8 +712,7 @@ public final class InputLogic { */ private void handleNonSeparator(final SettingsValues settingsValues, final InputTransaction inputTransaction) { - final Event processedEvent = mWordComposer.processEvent(inputTransaction.mEvent); - final int codePoint = processedEvent.mCodePoint; + final int codePoint = inputTransaction.mEvent.mCodePoint; // TODO: refactor this method to stop flipping isComposingWord around all the time, and // make it shorter (possibly cut into several pieces). Also factor handleNonSpecialCharacter // which has the same name as other handle* methods but is not the same. @@ -763,6 +762,7 @@ public final class InputLogic { resetComposingState(false /* alsoResetLastComposedWord */); } if (isComposingWord) { + final Event processedEvent = mWordComposer.processEvent(inputTransaction.mEvent); mWordComposer.applyProcessedEvent(processedEvent); // If it's the first letter, make note of auto-caps state if (mWordComposer.isSingleLetter()) { @@ -772,7 +772,7 @@ public final class InputLogic { mWordComposer.getTypedWord()), 1); } else { final boolean swapWeakSpace = tryStripSpaceAndReturnWhetherShouldSwapInstead( - inputTransaction, processedEvent.isSuggestionStripPress()); + inputTransaction, inputTransaction.mEvent.isSuggestionStripPress()); if (swapWeakSpace && trySwapSwapperAndSpace(inputTransaction)) { mSpaceState = SpaceState.WEAK; @@ -903,7 +903,6 @@ public final class InputLogic { private void handleBackspace(final InputTransaction inputTransaction, // TODO: remove this argument, put it into settingsValues final int currentKeyboardScriptId) { - final Event processedEvent = mWordComposer.processEvent(inputTransaction.mEvent); mSpaceState = SpaceState.NONE; mDeleteCount++; @@ -915,7 +914,7 @@ public final class InputLogic { // Then again, even in the case of a key repeat, if the cursor is at start of text, it // can't go any further back, so we can update right away even if it's a key repeat. final int shiftUpdateKind = - processedEvent.isKeyRepeat() && mConnection.getExpectedSelectionStart() > 0 + inputTransaction.mEvent.isKeyRepeat() && mConnection.getExpectedSelectionStart() > 0 ? InputTransaction.SHIFT_UPDATE_LATER : InputTransaction.SHIFT_UPDATE_NOW; inputTransaction.requireShiftUpdate(shiftUpdateKind); @@ -935,6 +934,7 @@ public final class InputLogic { mDictionaryFacilitator.removeWordFromPersonalizedDicts(rejectedSuggestion); } } else { + final Event processedEvent = mWordComposer.processEvent(inputTransaction.mEvent); mWordComposer.applyProcessedEvent(processedEvent); } if (mWordComposer.isComposingWord()) {