aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/UserDictionary.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-02-16 19:19:05 -0800
committerJean Chalard <jchalard@google.com>2012-02-16 19:19:05 -0800
commit8e4b3bbf9f891b9fdfa92fb72c12d00ee6739357 (patch)
treef0e94d04eb67573b142799cb20e93037021c696a /java/src/com/android/inputmethod/latin/UserDictionary.java
parentb98c25d9654b3add4fcf3107d17bd02ad20dd2e0 (diff)
downloadlatinime-8e4b3bbf9f891b9fdfa92fb72c12d00ee6739357.tar.gz
latinime-8e4b3bbf9f891b9fdfa92fb72c12d00ee6739357.tar.xz
latinime-8e4b3bbf9f891b9fdfa92fb72c12d00ee6739357.zip
Don't assume a word has been added to the user dict
The user may now cancel or edit a word upon adding to the user dictionary. We can no longer assume the word has been added as is and for the current locale. We should just rely on standard mechanisms that inform us of new insertions. Bug: 6015347 Change-Id: I069b19c0c844ca29d6de4c4d162306f9413adea8
Diffstat (limited to 'java/src/com/android/inputmethod/latin/UserDictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/UserDictionary.java5
1 files changed, 0 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/UserDictionary.java b/java/src/com/android/inputmethod/latin/UserDictionary.java
index 6d6296e10..51b993343 100644
--- a/java/src/com/android/inputmethod/latin/UserDictionary.java
+++ b/java/src/com/android/inputmethod/latin/UserDictionary.java
@@ -165,17 +165,12 @@ public class UserDictionary extends ExpandableDictionary {
// Safeguard against adding long words. Can cause stack overflow.
if (word.length() >= getMaxWordLength()) return;
- super.addWord(word, frequency);
-
// TODO: Add an argument to the intent to specify the frequency.
Intent intent = new Intent(ACTION_USER_DICTIONARY_INSERT);
intent.putExtra(Words.WORD, word);
intent.putExtra(Words.LOCALE, mLocale);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getContext().startActivity(intent);
-
- // In case the above does a synchronous callback of the change observer
- setRequiresReload(false);
}
@Override