am 8adf5e8a: Have the "add to dictionary" hint display the right word

* commit '8adf5e8a70a9153094d1e51587c91a96d7c5888f':
  Have the "add to dictionary" hint display the right word
main
Jean Chalard 2014-08-18 12:00:41 +00:00 committed by Android Git Automerger
commit 47c80605e6
1 changed files with 8 additions and 8 deletions

View File

@ -1213,13 +1213,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Probably never supposed to happen, but just in case. // Probably never supposed to happen, but just in case.
return; return;
} }
final String wordToEdit; mDictionaryFacilitator.addWordToUserDictionary(this /* context */, word);
if (CapsModeUtils.isAutoCapsMode(mInputLogic.mLastComposedWord.mCapitalizedMode)) {
wordToEdit = word.toLowerCase(getCurrentSubtypeLocale());
} else {
wordToEdit = word;
}
mDictionaryFacilitator.addWordToUserDictionary(this /* context */, wordToEdit);
} }
// Callback for the {@link SuggestionStripView}, to call when the important notice strip is // 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()) { if (!hasSuggestionStripView()) {
return; 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 // This will show either an empty suggestion strip (if prediction is enabled) or