aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-09-12 15:02:24 +0900
committerJean Chalard <jchalard@google.com>2013-09-12 15:10:10 +0900
commit87472f00382c36f475dcaa1932af70b482adf1c3 (patch)
tree10bceb46350b0e9e4f8910b215fa4d3d23cb86dc /java/src/com/android/inputmethod/latin/UserBinaryDictionary.java
parent76e431b315abb4fdf92f0843bad7bdb548ab68a8 (diff)
downloadlatinime-87472f00382c36f475dcaa1932af70b482adf1c3.tar.gz
latinime-87472f00382c36f475dcaa1932af70b482adf1c3.tar.xz
latinime-87472f00382c36f475dcaa1932af70b482adf1c3.zip
Remove changing a word when added to the dictionary
This code is now useless. I thought it affected 9902905, but it seems it actually does not. Still, it's dead code. Bug: 9902905 Change-Id: Id9c90fbf88f015af47b2368b90d173c481647093
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) {