aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/AutoDictionary.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-06-24 18:38:41 +0900
committersatok <satok@google.com>2011-06-24 18:38:41 +0900
commit80a9ce76d85ff521aeb5a51d759f5ba367ffc627 (patch)
tree239ff93af9a2b5bb0271968467a212c150608e03 /java/src/com/android/inputmethod/latin/AutoDictionary.java
parentdfd66f19edf1e1d97a0bf83dd20b99ee8bfae35e (diff)
parent52344a0788db20d12960b2481e99e990c3de1ea4 (diff)
downloadlatinime-80a9ce76d85ff521aeb5a51d759f5ba367ffc627.tar.gz
latinime-80a9ce76d85ff521aeb5a51d759f5ba367ffc627.tar.xz
latinime-80a9ce76d85ff521aeb5a51d759f5ba367ffc627.zip
Merge remote-tracking branch 'goog/master' into merge
Conflicts: java/res/xml/method.xml Change-Id: I7b5f2232753d7159b520e5e57a0e06c51935edbd
Diffstat (limited to 'java/src/com/android/inputmethod/latin/AutoDictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/AutoDictionary.java12
1 files changed, 1 insertions, 11 deletions
diff --git a/java/src/com/android/inputmethod/latin/AutoDictionary.java b/java/src/com/android/inputmethod/latin/AutoDictionary.java
index 307b81d43..460930f16 100644
--- a/java/src/com/android/inputmethod/latin/AutoDictionary.java
+++ b/java/src/com/android/inputmethod/latin/AutoDictionary.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Google Inc.
+ * Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
@@ -41,13 +41,8 @@ public class AutoDictionary extends ExpandableDictionary {
static final int FREQUENCY_FOR_PICKED = 3;
// Weight added to a user typing a new word that doesn't get corrected (or is reverted)
static final int FREQUENCY_FOR_TYPED = 1;
- // A word that is frequently typed and gets promoted to the user dictionary, uses this
- // frequency.
- static final int FREQUENCY_FOR_AUTO_ADD = 250;
// If the user touches a typed word 2 times or more, it will become valid.
private static final int VALIDITY_THRESHOLD = 2 * FREQUENCY_FOR_PICKED;
- // If the user touches a typed word 4 times or more, it will be added to the user dict.
- private static final int PROMOTION_THRESHOLD = 4 * FREQUENCY_FOR_PICKED;
private LatinIME mIme;
// Locale for which this auto dictionary is storing words
@@ -151,11 +146,6 @@ public class AutoDictionary extends ExpandableDictionary {
freq = freq < 0 ? addFrequency : freq + addFrequency;
super.addWord(word, freq);
- if (freq >= PROMOTION_THRESHOLD) {
- mIme.promoteToUserDictionary(word, FREQUENCY_FOR_AUTO_ADD);
- freq = 0;
- }
-
synchronized (mPendingWritesLock) {
// Write a null frequency if it is to be deleted from the db
mPendingWrites.put(word, freq == 0 ? null : new Integer(freq));