aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/AutoDictionary.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-12-10 15:24:28 +0900
committerTadashi G. Takaoka <takaoka@google.com>2010-12-10 18:24:00 +0900
commite26ef1bccddc942fdaeada3409c8e8ff18a35008 (patch)
treef697a67c0c82dc4e097e46fbf983ba77b98b44fd /java/src/com/android/inputmethod/latin/AutoDictionary.java
parent20cdb37bd062ae6cb6d42ad6229a19733476cd55 (diff)
downloadlatinime-e26ef1bccddc942fdaeada3409c8e8ff18a35008.tar.gz
latinime-e26ef1bccddc942fdaeada3409c8e8ff18a35008.tar.xz
latinime-e26ef1bccddc942fdaeada3409c8e8ff18a35008.zip
Remove Tutorial class and unused debug feature
This change also cleanups compiler warnings. Bug: 2897373 Change-Id: If972cf45c1eb40436adbddbf71969e5409f4c9c5
Diffstat (limited to 'java/src/com/android/inputmethod/latin/AutoDictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/AutoDictionary.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/AutoDictionary.java b/java/src/com/android/inputmethod/latin/AutoDictionary.java
index a3bf25642..307b81d43 100644
--- a/java/src/com/android/inputmethod/latin/AutoDictionary.java
+++ b/java/src/com/android/inputmethod/latin/AutoDictionary.java
@@ -98,7 +98,7 @@ public class AutoDictionary extends ExpandableDictionary {
}
@Override
- public boolean isValidWord(CharSequence word) {
+ public synchronized boolean isValidWord(CharSequence word) {
final int frequency = getWordFrequency(word);
return frequency >= VALIDITY_THRESHOLD;
}
@@ -138,7 +138,8 @@ public class AutoDictionary extends ExpandableDictionary {
}
@Override
- public void addWord(String word, int addFrequency) {
+ public void addWord(String newWord, int addFrequency) {
+ String word = newWord;
final int length = word.length();
// Don't add very short or very long words.
if (length < 2 || length > getMaxWordLength()) return;
@@ -224,7 +225,7 @@ public class AutoDictionary extends ExpandableDictionary {
private final DatabaseHelper mDbHelper;
private final String mLocale;
- public UpdateDbTask(Context context, DatabaseHelper openHelper,
+ public UpdateDbTask(@SuppressWarnings("unused") Context context, DatabaseHelper openHelper,
HashMap<String, Integer> pendingWrites, String locale) {
mMap = pendingWrites;
mLocale = locale;