aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
diff options
context:
space:
mode:
authorTom Ouyang <ouyang@google.com>2015-02-18 17:50:33 -0800
committerTom Ouyang <ouyang@google.com>2015-02-19 12:03:42 -0800
commitedea47ff2e901d02b381bf88aa6cb35c4b5ee811 (patch)
treebe0b468ea580c97689cd02e221b3224ff85bf035 /java/src/com/android/inputmethod/latin/DictionaryFacilitatorImpl.java
parent95711bfcee07d848883316cf07439408f5b332a1 (diff)
downloadlatinime-edea47ff2e901d02b381bf88aa6cb35c4b5ee811.tar.gz
latinime-edea47ff2e901d02b381bf88aa6cb35c4b5ee811.tar.xz
latinime-edea47ff2e901d02b381bf88aa6cb35c4b5ee811.zip
Add more options for calling removeWordFromPersonalizedDicts.
Bug: 19441205 Change-Id: I41aff536a64271d2dc9489a20df33d64170756cc
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 3d76751ce..ba70114e7 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.