diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-09-13 23:18:06 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-09-13 23:18:06 +0000 |
commit | 904eb21b49a54e034e42d16598f6751e42c82f8f (patch) | |
tree | 718835c63a669020ccc5546472111985f4410b4e /java/com/android/dialer/contactsfragment | |
parent | b21b9f9b2efbc358ee9806af87b7edc3f82af4da (diff) | |
parent | 7bea0364b6f8932f54cdb518de1014f408f0f3f3 (diff) |
Merge changes Ie58920b7,Iaaf84ab9
* changes:
Fixed crash in RemoteContactCusror.
Log swiping and clicking for switching tabs.
Diffstat (limited to 'java/com/android/dialer/contactsfragment')
-rw-r--r-- | java/com/android/dialer/contactsfragment/ContactsAdapter.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/java/com/android/dialer/contactsfragment/ContactsAdapter.java b/java/com/android/dialer/contactsfragment/ContactsAdapter.java index 13895313f..481574e0c 100644 --- a/java/com/android/dialer/contactsfragment/ContactsAdapter.java +++ b/java/com/android/dialer/contactsfragment/ContactsAdapter.java @@ -27,6 +27,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.android.dialer.common.Assert; +import com.android.dialer.common.LogUtil; import com.android.dialer.contactphoto.ContactPhotoManager; import com.android.dialer.contactsfragment.ContactsFragment.ClickAction; import com.android.dialer.contactsfragment.ContactsFragment.Header; @@ -66,6 +67,17 @@ final class ContactsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder this.clickAction = clickAction; headers = cursor.getExtras().getStringArray(Contacts.EXTRA_ADDRESS_BOOK_INDEX_TITLES); counts = cursor.getExtras().getIntArray(Contacts.EXTRA_ADDRESS_BOOK_INDEX_COUNTS); + if (counts != null) { + int sum = 0; + for (int count : counts) { + sum += count; + } + + if (sum != cursor.getCount()) { + LogUtil.e( + "ContactsAdapter", "Count sum (%d) != cursor count (%d).", sum, cursor.getCount()); + } + } } @Override |