diff options
author | Zachary Heidepriem <zachh@google.com> | 2017-10-12 01:29:20 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-10-12 01:29:20 +0000 |
commit | 306bb488847ebd58c31e2144ba8c558544403048 (patch) | |
tree | d06792cffc3d7a377631796a2ca85a99ae7b43b6 /java/com/android/dialer/calllog/ui/NewCallLogAdapter.java | |
parent | 71064e2aa5b3c6b24e27095f0bc1a2d940d58d05 (diff) | |
parent | 2633778c274746a35e4a54266a3319c53fd1cded (diff) |
Merge "Added basic bottom sheet to new call log."
am: 2633778c27
Change-Id: Id6b9f75c0cf3c42b28a0c44d75c10d9c80853936
Diffstat (limited to 'java/com/android/dialer/calllog/ui/NewCallLogAdapter.java')
-rw-r--r-- | java/com/android/dialer/calllog/ui/NewCallLogAdapter.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/java/com/android/dialer/calllog/ui/NewCallLogAdapter.java b/java/com/android/dialer/calllog/ui/NewCallLogAdapter.java index b922a6e3b..d5cfb7e24 100644 --- a/java/com/android/dialer/calllog/ui/NewCallLogAdapter.java +++ b/java/com/android/dialer/calllog/ui/NewCallLogAdapter.java @@ -58,15 +58,14 @@ final class NewCallLogAdapter extends RecyclerView.Adapter<ViewHolder> { // Calculate header adapter positions by reading cursor. long currentTimeMillis = clock.currentTimeMillis(); if (cursor.moveToNext()) { - CoalescedAnnotatedCallLogCursorLoader.Row firstRow = - new CoalescedAnnotatedCallLogCursorLoader.Row(cursor); - if (CallLogDates.isSameDay(currentTimeMillis, firstRow.timestamp())) { + long firstTimestamp = CoalescedAnnotatedCallLogCursorLoader.getTimestamp(cursor); + if (CallLogDates.isSameDay(currentTimeMillis, firstTimestamp)) { this.todayHeaderPosition = 0; int adapterPosition = 2; // Accounted for "Today" header and first row. while (cursor.moveToNext()) { - CoalescedAnnotatedCallLogCursorLoader.Row row = - new CoalescedAnnotatedCallLogCursorLoader.Row(cursor); - if (CallLogDates.isSameDay(currentTimeMillis, row.timestamp())) { + long timestamp = CoalescedAnnotatedCallLogCursorLoader.getTimestamp(cursor); + + if (CallLogDates.isSameDay(currentTimeMillis, timestamp)) { adapterPosition++; } else { this.olderHeaderPosition = adapterPosition; |