diff options
author | 2012-06-28 13:21:09 +0900 | |
---|---|---|
committer | 2012-06-28 19:10:32 +0900 | |
commit | 4c4e3a094908842905cde8eb381d55357c0bb555 (patch) | |
tree | ac749fb858ed83f857fc6de5f0ff8601fbc3ab80 /java/src | |
parent | 33b3805e79ab168500ac3bba2c349ef6ea0755f5 (diff) | |
download | latinime-4c4e3a094908842905cde8eb381d55357c0bb555.tar.gz latinime-4c4e3a094908842905cde8eb381d55357c0bb555.tar.xz latinime-4c4e3a094908842905cde8eb381d55357c0bb555.zip |
Transform the whitelist suggestion like the others (A4)
...instead of having a different code path
Change-Id: Icd177e2151e45d25300000d4b63d4fba1f52b6a8
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index a1f1ea4a5..5526e5d31 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -249,8 +249,8 @@ public class Suggest { transformedWordInfo.mSourceDict); } - final CharSequence whitelistedWord = capitalizeWord(isAllUpperCase, - isFirstCharCapitalized, mWhiteListDictionary.getWhitelistedWord(consideredWord)); + final CharSequence whitelistedWord = + mWhiteListDictionary.getWhitelistedWord(consideredWord); final boolean hasAutoCorrection; if (isCorrectionEnabled) { @@ -267,20 +267,11 @@ public class Suggest { if (whitelistedWord != null) { final SuggestedWordInfo whitelistSuggestion; - if (trailingSingleQuotesCount > 0) { - final StringBuilder sb = new StringBuilder(whitelistedWord); - for (int i = trailingSingleQuotesCount - 1; i >= 0; --i) { - sb.appendCodePoint(Keyboard.CODE_SINGLE_QUOTE); - } - whitelistSuggestion = new SuggestedWordInfo(sb.toString(), - SuggestedWordInfo.MAX_SCORE, SuggestedWordInfo.KIND_WHITELIST, - Dictionary.TYPE_WHITELIST); - } else { - whitelistSuggestion = new SuggestedWordInfo(whitelistedWord, - SuggestedWordInfo.MAX_SCORE, SuggestedWordInfo.KIND_WHITELIST, - Dictionary.TYPE_WHITELIST); - } - suggestionsContainer.add(0, whitelistSuggestion); + whitelistSuggestion = new SuggestedWordInfo(whitelistedWord, + SuggestedWordInfo.MAX_SCORE, SuggestedWordInfo.KIND_WHITELIST, + Dictionary.TYPE_WHITELIST); + suggestionsContainer.add(0, getTransformedSuggestedWordInfo(whitelistSuggestion, + mLocale, isAllUpperCase, isFirstCharCapitalized, trailingSingleQuotesCount)); } if (!isPrediction) { |