Don't crash if the contacts provider returns a null Cursor.
parent
9a66cd81e7
commit
10f1a4d39c
|
@ -67,7 +67,9 @@ public class ContactsDictionary extends ExpandableDictionary {
|
||||||
private synchronized void loadDictionary() {
|
private synchronized void loadDictionary() {
|
||||||
Cursor cursor = getContext().getContentResolver()
|
Cursor cursor = getContext().getContentResolver()
|
||||||
.query(People.CONTENT_URI, PROJECTION, null, null, null);
|
.query(People.CONTENT_URI, PROJECTION, null, null, null);
|
||||||
|
if (cursor != null) {
|
||||||
addWords(cursor);
|
addWords(cursor);
|
||||||
|
}
|
||||||
mRequiresReload = false;
|
mRequiresReload = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue