diff options
author | 2012-02-01 03:28:06 -0800 | |
---|---|---|
committer | 2012-02-01 03:28:06 -0800 | |
commit | 2e5d8312f21151120a97aac7984d96175cf75beb (patch) | |
tree | 75a001822ebd69e251574c48a08a1df08872dd43 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | c5163f91b2841dd2e86c67da18567a910542d1ca (diff) | |
parent | ff858c7ff5e747c17ff6d9d1908e700ad30ded85 (diff) | |
download | latinime-2e5d8312f21151120a97aac7984d96175cf75beb.tar.gz latinime-2e5d8312f21151120a97aac7984d96175cf75beb.tar.xz latinime-2e5d8312f21151120a97aac7984d96175cf75beb.zip |
am ff858c7f: Use MoreKeySpecParser to parse puctuations strip resources
* commit 'ff858c7ff5e747c17ff6d9d1908e700ad30ded85':
Use MoreKeySpecParser to parse puctuations strip resources
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index ef8fd1379..19cd16ad2 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -59,7 +59,6 @@ import com.android.inputmethod.compat.SuggestionSpanUtils; import com.android.inputmethod.compat.VibratorCompatWrapper; import com.android.inputmethod.deprecated.LanguageSwitcherProxy; import com.android.inputmethod.deprecated.VoiceProxy; -import com.android.inputmethod.keyboard.Key; import com.android.inputmethod.keyboard.Keyboard; import com.android.inputmethod.keyboard.KeyboardActionListener; import com.android.inputmethod.keyboard.KeyboardId; @@ -1897,16 +1896,13 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // So, LatinImeLogger logs "" as a user's input. LatinImeLogger.logOnManualSuggestion( "", suggestion.toString(), index, suggestions.mWords); + final CharSequence outputText = mSettingsValues.mSuggestPuncOutputTextList + .getWord(index); + final int primaryCode = outputText.charAt(0); // Find out whether the previous character is a space. If it is, as a special case // for punctuation entered through the suggestion strip, it should be swapped // if it was a magic or a weak space. This is meant to help in case the user // pressed space on purpose of displaying the suggestion strip punctuation. - final int rawPrimaryCode = suggestion.charAt(0); - // Maybe apply the "bidi mirrored" conversions for parentheses - final Keyboard keyboard = mKeyboardSwitcher.getKeyboard(); - final boolean isRtl = keyboard != null && keyboard.mIsRtlKeyboard; - final int primaryCode = Key.getRtlParenthesisCode(rawPrimaryCode, isRtl); - insertPunctuationFromSuggestionStrip(ic, primaryCode); // TODO: the following endBatchEdit seems useless, check if (ic != null) { |