diff options
author | 2014-03-31 09:32:00 +0000 | |
---|---|---|
committer | 2014-03-31 09:32:00 +0000 | |
commit | 1dc354bed1d42551e02631d69a958e615e3dcdd7 (patch) | |
tree | d8bd4026ed33d0ed95c9f40cf15cab5a268a14b2 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | dbadee96b6bc385b18377bd8b943e79097853849 (diff) | |
parent | 6bd3723e733308a8b6d88830335bb5f786235369 (diff) | |
download | latinime-1dc354bed1d42551e02631d69a958e615e3dcdd7.tar.gz latinime-1dc354bed1d42551e02631d69a958e615e3dcdd7.tar.xz latinime-1dc354bed1d42551e02631d69a958e615e3dcdd7.zip |
Merge "[IL128] Remove passing some handlers."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 0c0be82df..53e6232b6 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -38,7 +38,6 @@ import android.net.ConnectivityManager; import android.os.Debug; import android.os.IBinder; import android.os.Message; -import android.os.SystemClock; import android.preference.PreferenceManager; import android.text.InputType; import android.text.TextUtils; @@ -1230,7 +1229,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen final InputTransaction completeInputTransaction = mInputLogic.onCodeInput(mSettings.getCurrent(), event, mKeyboardSwitcher.getKeyboardShiftMode(), mHandler); - updateShiftModeAfterInputTransaction(completeInputTransaction.getRequiredShiftUpdate()); + updateStateAfterInputTransaction(completeInputTransaction); mKeyboardSwitcher.onCodeInput(codePoint); } @@ -1450,7 +1449,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen final InputTransaction completeInputTransaction = mInputLogic.onPickSuggestionManually( mSettings.getCurrent(), index, suggestionInfo, mKeyboardSwitcher.getKeyboardShiftMode(), mHandler); - updateShiftModeAfterInputTransaction(completeInputTransaction.getRequiredShiftUpdate()); + updateStateAfterInputTransaction(completeInputTransaction); } @Override @@ -1488,8 +1487,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } - private void updateShiftModeAfterInputTransaction(final int requiredShiftUpdate) { - switch (requiredShiftUpdate) { + /** + * After an input transaction has been executed, some state must be updated. This includes + * the shift state of the keyboard and suggestions. This method looks at the finished + * inputTransaction to find out what is necessary and updates the state accordingly. + * @param inputTransaction The transaction that has been executed. + */ + private void updateStateAfterInputTransaction(final InputTransaction inputTransaction) { + switch (inputTransaction.getRequiredShiftUpdate()) { case InputTransaction.SHIFT_UPDATE_LATER: mHandler.postUpdateShiftState(); break; @@ -1498,6 +1503,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen break; default: // SHIFT_NO_UPDATE } + if (inputTransaction.requiresUpdateSuggestions()) { + mHandler.postUpdateSuggestionStrip(); + } } private void hapticAndAudioFeedback(final int code, final int repeatCount) { |