aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/UserHistoryDictionary.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/UserHistoryDictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/UserHistoryDictionary.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/UserHistoryDictionary.java b/java/src/com/android/inputmethod/latin/UserHistoryDictionary.java
index e13602e50..efafacc8a 100644
--- a/java/src/com/android/inputmethod/latin/UserHistoryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/UserHistoryDictionary.java
@@ -202,6 +202,15 @@ public class UserHistoryDictionary extends ExpandableDictionary {
return freq;
}
+ public boolean cancelAddingUserHistory(String word1, String word2) {
+ final Bigram bi = new Bigram(word1, word2, 0);
+ if (mPendingWrites.contains(bi)) {
+ mPendingWrites.remove(bi);
+ return super.removeBigram(word1, word2);
+ }
+ return false;
+ }
+
/**
* Schedules a background thread to write any pending words to the database.
*/