diff options
author | 2014-06-04 13:35:54 +0000 | |
---|---|---|
committer | 2014-06-04 13:35:54 +0000 | |
commit | 43e28b475a46e0611462d21ceac99e0f8c9f2c13 (patch) | |
tree | 194d38bbb31436b364a77b967dc407f5036158ce /java/src | |
parent | 77fb4247f236092304168b0ec5e5642907e32ac3 (diff) | |
parent | 9d4d61f9c1273cbe1761c5eccb18e6df9a7490bc (diff) | |
download | latinime-43e28b475a46e0611462d21ceac99e0f8c9f2c13.tar.gz latinime-43e28b475a46e0611462d21ceac99e0f8c9f2c13.tar.xz latinime-43e28b475a46e0611462d21ceac99e0f8c9f2c13.zip |
am 9d4d61f9: Merge "Allow multiple shortcuts for a personal dictionary word"
* commit '9d4d61f9c1273cbe1761c5eccb18e6df9a7490bc':
Allow multiple shortcuts for a personal dictionary word
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryAddWordContents.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryAddWordContents.java b/java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryAddWordContents.java index 80d4cc44f..eda81940f 100644 --- a/java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryAddWordContents.java +++ b/java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryAddWordContents.java @@ -167,7 +167,9 @@ public class UserDictionaryAddWordContents { // should not insert, because either A. the word exists with no shortcut, in which // case the exact same thing we want to insert is already there, or B. the word // exists with at least one shortcut, in which case it has priority on our word. - if (hasWord(newWord, context)) return CODE_ALREADY_PRESENT; + if (TextUtils.isEmpty(newShortcut) && hasWord(newWord, context)) { + return CODE_ALREADY_PRESENT; + } // Disallow duplicates. If the same word with no shortcut is defined, remove it; if // the same word with the same shortcut is defined, remove it; but we don't mind if |