aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-08-18 20:43:40 +0900
committerJean Chalard <jchalard@google.com>2014-08-18 20:43:40 +0900
commit8adf5e8a70a9153094d1e51587c91a96d7c5888f (patch)
tree7157a76f982dfecdb5feee75b69c397a6cde294d /java/src
parent2f34f0d1a8fea3517fa5656f88593885fa51d362 (diff)
downloadlatinime-8adf5e8a70a9153094d1e51587c91a96d7c5888f.tar.gz
latinime-8adf5e8a70a9153094d1e51587c91a96d7c5888f.tar.xz
latinime-8adf5e8a70a9153094d1e51587c91a96d7c5888f.zip
Have the "add to dictionary" hint display the right word
Before this, we display the word we have committed instead of the word we will actually insert into the personal dictionary. There is a difference when the word was typed with auto-caps. Bug: 17071785 Change-Id: I2bfec0402b1307934590a78ab5c25104d92b75ca
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 258f21f7c..8768e126e 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1213,13 +1213,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Probably never supposed to happen, but just in case.
return;
}
- final String wordToEdit;
- if (CapsModeUtils.isAutoCapsMode(mInputLogic.mLastComposedWord.mCapitalizedMode)) {
- wordToEdit = word.toLowerCase(getCurrentSubtypeLocale());
- } else {
- wordToEdit = word;
- }
- mDictionaryFacilitator.addWordToUserDictionary(this /* context */, wordToEdit);
+ mDictionaryFacilitator.addWordToUserDictionary(this /* context */, word);
}
// Callback for the {@link SuggestionStripView}, to call when the important notice strip is
@@ -1499,7 +1493,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (!hasSuggestionStripView()) {
return;
}
- mSuggestionStripView.showAddToDictionaryHint(word);
+ final String wordToShow;
+ if (CapsModeUtils.isAutoCapsMode(mInputLogic.mLastComposedWord.mCapitalizedMode)) {
+ wordToShow = word.toLowerCase(getCurrentSubtypeLocale());
+ } else {
+ wordToShow = word;
+ }
+ mSuggestionStripView.showAddToDictionaryHint(wordToShow);
}
// This will show either an empty suggestion strip (if prediction is enabled) or