diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-02-27 21:06:05 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-02-27 21:06:05 +0000 |
commit | 82393b8382b39fbbf94cb2fcc7fc61b1cb62588d (patch) | |
tree | 2f3dce168d8d53abaeddd2ee9f6a19ce2ba0f774 /java/com/android/dialer/searchfragment/cp2/SearchContactsCursorLoader.java | |
parent | 46cdf805e07c90ef54ead2a53e5b770e5a5928d1 (diff) | |
parent | a4a4df959c4163a99b43858c6f1cc50c403c644d (diff) |
Merge changes I09e8be0d,Ic94816e1
* changes:
Fix bug that soft keyboard pushes action bar out of window.
Added 2 null checks to fix top crashers.
Diffstat (limited to 'java/com/android/dialer/searchfragment/cp2/SearchContactsCursorLoader.java')
-rw-r--r-- | java/com/android/dialer/searchfragment/cp2/SearchContactsCursorLoader.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/com/android/dialer/searchfragment/cp2/SearchContactsCursorLoader.java b/java/com/android/dialer/searchfragment/cp2/SearchContactsCursorLoader.java index 57e253c7e..7caa314f3 100644 --- a/java/com/android/dialer/searchfragment/cp2/SearchContactsCursorLoader.java +++ b/java/com/android/dialer/searchfragment/cp2/SearchContactsCursorLoader.java @@ -103,7 +103,8 @@ public final class SearchContactsCursorLoader extends CursorLoader { static class SmartDialCursor extends MergeCursor implements SearchCursor { static SmartDialCursor newInstance(Context context, Cursor smartDialCursor) { - if (smartDialCursor.getCount() == 0) { + if (smartDialCursor == null || smartDialCursor.getCount() == 0) { + LogUtil.i("SmartDialCursor.newInstance", "Cursor was null or empty"); return new SmartDialCursor(new Cursor[] {new MatrixCursor(Projections.CP2_PROJECTION)}); } @@ -173,7 +174,8 @@ public final class SearchContactsCursorLoader extends CursorLoader { static class RegularSearchCursor extends MergeCursor implements SearchCursor { static RegularSearchCursor newInstance(Context context, Cursor regularSearchCursor) { - if (regularSearchCursor.getCount() == 0) { + if (regularSearchCursor == null || regularSearchCursor.getCount() == 0) { + LogUtil.i("RegularSearchCursor.newInstance", "Cursor was null or empty"); return new RegularSearchCursor(new Cursor[] {new MatrixCursor(Projections.CP2_PROJECTION)}); } |