aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-09-12 09:15:18 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-12 09:15:18 -0700
commita1efc18927b0d91b0c6bfacd31817f92083bde04 (patch)
tree529ef8b625ec9dd14c57a662a8f81775ff5ddd1d /java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
parent5b6ec109ce5a0ba0b86959717d29c65334d70031 (diff)
parent3508eb14c083a2d3e0f1671b926ebb4ec9302130 (diff)
downloadlatinime-a1efc18927b0d91b0c6bfacd31817f92083bde04.tar.gz
latinime-a1efc18927b0d91b0c6bfacd31817f92083bde04.tar.xz
latinime-a1efc18927b0d91b0c6bfacd31817f92083bde04.zip
am 3508eb14: Merge "Remove changing a word when added to the dictionary"
* commit '3508eb14c083a2d3e0f1671b926ebb4ec9302130': Remove changing a word when added to the dictionary
Diffstat (limited to 'java/src/com/android/inputmethod/latin/UserBinaryDictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/UserBinaryDictionary.java21
1 files changed, 0 insertions, 21 deletions
diff --git a/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java b/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
index b2bb61596..a241b5505 100644
--- a/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
@@ -103,14 +103,6 @@ public class UserBinaryDictionary extends ExpandableBinaryDictionary {
@Override
public void onChange(final boolean self, final Uri uri) {
setRequiresReload(true);
- // We want to report back to Latin IME in case the user just entered the word.
- // If the user changed the word in the dialog box, then we want to replace
- // what was entered in the text field.
- if (null == uri || !(context instanceof LatinIME)) return;
- final long changedRowId = ContentUris.parseId(uri);
- if (-1 == changedRowId) return; // Unknown content... Not sure why we're here
- final String changedWord = getChangedWordForUri(uri);
- ((LatinIME)context).onWordAddedToUserDictionary(changedWord);
}
};
cres.registerContentObserver(Words.CONTENT_URI, true, mObserver);
@@ -118,19 +110,6 @@ public class UserBinaryDictionary extends ExpandableBinaryDictionary {
loadDictionary();
}
- private String getChangedWordForUri(final Uri uri) {
- final Cursor cursor = mContext.getContentResolver().query(uri,
- PROJECTION_QUERY, null, null, null);
- if (cursor == null) return null;
- try {
- if (!cursor.moveToFirst()) return null;
- final int indexWord = cursor.getColumnIndex(Words.WORD);
- return cursor.getString(indexWord);
- } finally {
- cursor.close();
- }
- }
-
@Override
public synchronized void close() {
if (mObserver != null) {