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:31:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-02-19 21:31:38 +0000
commit076f76cc124a98906e643147dc6867488bdbf491 (patch)
treeacd6a63f939477f87b954f633fbe2c42d256dcf7 /java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
parent0b03f13cabec84d2d841fde47ce9fec0d531b6a1 (diff)
parentedea47ff2e901d02b381bf88aa6cb35c4b5ee811 (diff)
downloadlatinime-076f76cc124a98906e643147dc6867488bdbf491.tar.gz
latinime-076f76cc124a98906e643147dc6867488bdbf491.tar.xz
latinime-076f76cc124a98906e643147dc6867488bdbf491.zip
Merge "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.