diff options
| author | Jeff Hamilton <jham@android.com> | 2009-08-18 11:53:22 -0500 |
|---|---|---|
| committer | Jeff Hamilton <jham@android.com> | 2009-08-18 11:53:22 -0500 |
| commit | 10f1a4d39ca6ef7a869b513a9756d5170eee3b53 (patch) | |
| tree | ade9d2f82aac6f37a5f70ac75406db993cfc1c1f | |
| parent | 9a66cd81e7d97fc9a066118606fdf00af35b62c0 (diff) | |
| download | android_packages_inputmethods_LatinIME-10f1a4d39ca6ef7a869b513a9756d5170eee3b53.tar.gz android_packages_inputmethods_LatinIME-10f1a4d39ca6ef7a869b513a9756d5170eee3b53.tar.bz2 android_packages_inputmethods_LatinIME-10f1a4d39ca6ef7a869b513a9756d5170eee3b53.zip | |
Don't crash if the contacts provider returns a null Cursor.
| -rw-r--r-- | src/com/android/inputmethod/latin/ContactsDictionary.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/inputmethod/latin/ContactsDictionary.java b/src/com/android/inputmethod/latin/ContactsDictionary.java index 09cbd43e9..cfa1f1d7d 100644 --- a/src/com/android/inputmethod/latin/ContactsDictionary.java +++ b/src/com/android/inputmethod/latin/ContactsDictionary.java @@ -67,7 +67,9 @@ public class ContactsDictionary extends ExpandableDictionary { private synchronized void loadDictionary() { Cursor cursor = getContext().getContentResolver() .query(People.CONTENT_URI, PROJECTION, null, null, null); - addWords(cursor); + if (cursor != null) { + addWords(cursor); + } mRequiresReload = false; } |
