aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 2ee5a3819..e07bba065 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -528,7 +528,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
resetContactsDictionary(oldContactsDictionary);
mUserHistoryDictionary
- = new UserHistoryDictionary(this, this, localeStr, Suggest.DIC_USER_HISTORY);
+ = new UserHistoryDictionary(this, localeStr, Suggest.DIC_USER_HISTORY);
mSuggest.setUserHistoryDictionary(mUserHistoryDictionary);
LocaleUtils.setSystemLocale(res, savedLocale);
@@ -2012,8 +2012,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
} else {
prevWord = null;
}
+ final String secondWord;
+ if (mWordComposer.isAutoCapitalized() && !mWordComposer.isMostlyCaps()) {
+ secondWord = suggestion.toString().toLowerCase(mSubtypeSwitcher.getInputLocale());
+ } else {
+ secondWord = suggestion.toString();
+ }
mUserHistoryDictionary.addToUserHistory(null == prevWord ? null : prevWord.toString(),
- suggestion.toString());
+ secondWord);
}
}
@@ -2254,10 +2260,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
mFeedbackManager.vibrate(mKeyboardSwitcher.getKeyboardView());
}
- public boolean isAutoCapitalized() {
- return mWordComposer.isAutoCapitalized();
- }
-
private void updateCorrectionMode() {
// TODO: cleanup messy flags
final boolean shouldAutoCorrect = mSettingsValues.mAutoCorrectEnabled