aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-02-01 03:28:06 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-02-01 03:28:06 -0800
commit2e5d8312f21151120a97aac7984d96175cf75beb (patch)
tree75a001822ebd69e251574c48a08a1df08872dd43 /java/src/com/android/inputmethod/latin/LatinIME.java
parentc5163f91b2841dd2e86c67da18567a910542d1ca (diff)
parentff858c7ff5e747c17ff6d9d1908e700ad30ded85 (diff)
downloadlatinime-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.java10
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) {