Merge "if requery returns false, throw exception"

This commit is contained in:
Vasu Nori
2010-08-05 12:16:31 -07:00
committed by Android (Google) Code Review

View File

@@ -251,7 +251,9 @@ public class UserDictionarySettings extends ListActivity {
// TODO: present UI for picking whether to add word to all locales, or current.
UserDictionary.Words.addWord(this, word.toString(),
250, UserDictionary.Words.LOCALE_TYPE_ALL);
mCursor.requery();
if (!mCursor.requery()) {
throw new IllegalStateException("can't requery on already-closed cursor.");
}
mAddedWordAlready = true;
}