aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
diff options
context:
space:
mode:
authorTom Ouyang <ouyang@google.com>2015-02-19 21:37:37 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-19 21:37:37 +0000
commitc47894641b866ed996aa27fe7ef478826dd7037d (patch)
tree9370a7e7e497b5f488a3cd2a3d74929e64805918 /java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
parente3e7589f8570390184312d776d0b53a248d66e3d (diff)
parent076f76cc124a98906e643147dc6867488bdbf491 (diff)
downloadlatinime-c47894641b866ed996aa27fe7ef478826dd7037d.tar.gz
latinime-c47894641b866ed996aa27fe7ef478826dd7037d.tar.xz
latinime-c47894641b866ed996aa27fe7ef478826dd7037d.zip
am 076f76cc: Merge "Add more options for calling removeWordFromPersonalizedDicts."
* commit '076f76cc124a98906e643147dc6867488bdbf491': Add more options for calling removeWordFromPersonalizedDicts.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java')
-rw-r--r--java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java b/java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
index 31e9d0305..f67e3a938 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
@@ -654,8 +654,14 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
}
}
- public void removeWordFromPersonalizedDicts(final String word) {
- removeWord(Dictionary.TYPE_USER_HISTORY, word);
+ @Override
+ public void unlearnFromUserHistory(final String word,
+ @Nonnull final NgramContext ngramContext, final int timeStampInSeconds,
+ final int eventType) {
+ // TODO: Decide whether or not to remove the word on EVENT_BACKSPACE.
+ if (eventType != Constants.EVENT_BACKSPACE) {
+ removeWord(Dictionary.TYPE_USER_HISTORY, word);
+ }
}
// TODO: Revise the way to fusion suggestion results.