commit | e87886ebb31545bdedd464d8271c22f9ad898c91 | [log] [tgz] |
---|---|---|
author | Jay Shrauner <shrauner@google.com> | Thu Jan 30 14:02:18 2014 -0800 |
committer | Jay Shrauner <shrauner@google.com> | Sat Mar 01 20:19:11 2014 +0000 |
tree | adb0550d67ff93d9db5437d566f815c8db8e3039 | |
parent | 2ebea8a04142a9ed338fbb8e98eb27a869c0f223 [diff] |
Fix NPE if contactsCursor is null Don't crash if the CP2 call failed and we were unable to load the contacts cursor. Bug:12822702 Change-Id: Ib6b3cf5a9519d61c82924f29babb146888f7453a (cherry picked from commit 1f44ffc294764250cb1e02290fabdc439126dc19)
diff --git a/src/com/android/contacts/common/list/ProfileAndContactsLoader.java b/src/com/android/contacts/common/list/ProfileAndContactsLoader.java index 9d2bbbb..76c73e3 100644 --- a/src/com/android/contacts/common/list/ProfileAndContactsLoader.java +++ b/src/com/android/contacts/common/list/ProfileAndContactsLoader.java
@@ -62,7 +62,7 @@ @Override public Bundle getExtras() { // Need to get the extras from the contacts cursor. - return contactsCursor.getExtras(); + return contactsCursor == null ? new Bundle() : contactsCursor.getExtras(); } }; }