if requery returns false, throw exception
bug:2894145 Change-Id: Iba36031fae90e53a6c71677e3ec23ba017234407
This commit is contained in:
@@ -251,7 +251,9 @@ public class UserDictionarySettings extends ListActivity {
|
|||||||
// TODO: present UI for picking whether to add word to all locales, or current.
|
// TODO: present UI for picking whether to add word to all locales, or current.
|
||||||
UserDictionary.Words.addWord(this, word.toString(),
|
UserDictionary.Words.addWord(this, word.toString(),
|
||||||
250, UserDictionary.Words.LOCALE_TYPE_ALL);
|
250, UserDictionary.Words.LOCALE_TYPE_ALL);
|
||||||
mCursor.requery();
|
if (!mCursor.requery()) {
|
||||||
|
throw new IllegalStateException("can't requery on already-closed cursor.");
|
||||||
|
}
|
||||||
mAddedWordAlready = true;
|
mAddedWordAlready = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user