Loading java/src/com/android/inputmethod/latin/UserDictionary.java +8 −2 Original line number Diff line number Diff line Loading @@ -89,13 +89,19 @@ public class UserDictionary extends ExpandableDictionary { super.addWord(word, frequency); // Update the user dictionary provider ContentValues values = new ContentValues(5); final ContentValues values = new ContentValues(5); values.put(Words.WORD, word); values.put(Words.FREQUENCY, frequency); values.put(Words.LOCALE, mLocale); values.put(Words.APP_ID, 0); getContext().getContentResolver().insert(Words.CONTENT_URI, values); final ContentResolver contentResolver = getContext().getContentResolver(); new Thread("addWord") { public void run() { contentResolver.insert(Words.CONTENT_URI, values); } }.start(); // In case the above does a synchronous callback of the change observer setRequiresReload(false); } Loading Loading
java/src/com/android/inputmethod/latin/UserDictionary.java +8 −2 Original line number Diff line number Diff line Loading @@ -89,13 +89,19 @@ public class UserDictionary extends ExpandableDictionary { super.addWord(word, frequency); // Update the user dictionary provider ContentValues values = new ContentValues(5); final ContentValues values = new ContentValues(5); values.put(Words.WORD, word); values.put(Words.FREQUENCY, frequency); values.put(Words.LOCALE, mLocale); values.put(Words.APP_ID, 0); getContext().getContentResolver().insert(Words.CONTENT_URI, values); final ContentResolver contentResolver = getContext().getContentResolver(); new Thread("addWord") { public void run() { contentResolver.insert(Words.CONTENT_URI, values); } }.start(); // In case the above does a synchronous callback of the change observer setRequiresReload(false); } Loading