History log of /packages/apps/Dialer/src/com/android/dialer/calllog/GroupingListAdapter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6b0056f348e1f9ecf0f91b53b51d240961bc8313 18-Feb-2016 Sarmad Hashmi <mhashmi@google.com> Update call log adapter and related files for archived voicemails.

+ Populate CallLogAdapter items with different data depending on
whether it is in the voicemail archive activity or not
+ Added addVoicemailGroups method to CallLogGroupBuilder so that every
voicemail is put into an individual group
+ Voicemails grouped differently than regular calls, so added
changeCursorVoicemail in GroupingListAdapter
+Fix CallLogAdapter tests and add test for archive adapter

BUG=22797391

Change-Id: Ib8387c5b3ab8c5e39876cfaf20fde5a44295f152
/packages/apps/Dialer/src/com/android/dialer/calllog/GroupingListAdapter.java
ab90a18e2f05c7ae4158b770a9fbe9cbe4544597 02-Sep-2015 Andrew Lee <anwlee@google.com> Genericize promo card.

+ Make ViewHolder generic to generic to promo cards with customized
text or graphic layouts, as long as they implement two actions,
now designated the primary and secondary action views. This resuses
code which is logically similar between promo cards, and hopefully
doesn't bite us back in the future if there is a divergence in promo
card structure.

+ Make the GroupingListAdapter slightly "safer".

Bug: 23422274
Change-Id: I60bced4dbc61fec2e225a1cae9726ac40ed679a5
/packages/apps/Dialer/src/com/android/dialer/calllog/GroupingListAdapter.java
0599e880630892becf1a1991e6712e0e6d9df3c8 25-Aug-2015 Andrew Lee <anwlee@google.com> Rewrite grouping logic in Dialer.

- Remove expand/collapse and item type logic in GroupingListAdapter.
Losing some potential functionality, but it does not adversely
affect how we currently group, and makes grouping easier to
understanding.
+ Rewrite GroupingListAdapter to provide O(1) lookup for group size
and getItem. This requires maintaining a SparseIntArray of metadata
for each list item. Cut metadata storage from long to int, to help
adjust for the larger memory overhead.
+ Simplify the logic for building and maintaing the metadata in the
GroupingListAdapter, offloading much of it to the SparseIntArray.
+ Explictily add all groups, including groups with single items,
in the CallLogBroupBuilder.
+ Tidied up logic in CallLogGroupBuilder to make it more intuitive
what cases it's handling and what's happening.
+ Updated tests to work and pass with new tests.

Bug: 23422274
Change-Id: Ia7a00c4b580813cade87fdc054ffdd702f59c12c
/packages/apps/Dialer/src/com/android/dialer/calllog/GroupingListAdapter.java
427566a204903098de1b7866d25f711918bb28d9 09-Jun-2015 Andrew Lee <anwlee@google.com> Fix CallLogFragment UnitTests.

Run "changeCursor" on the main thread. I'm not precisely sure why
this fixes things, but it appeared before that the data I had on my
local device was being used instead of the test data.

Bug: 21471763
Change-Id: I6bece02e7c6828d54f76b5221ad10cf8f0052aa9
/packages/apps/Dialer/src/com/android/dialer/calllog/GroupingListAdapter.java
492cd7371c6d8fddc4de85887a4ed9a89d602767 08-Apr-2015 Andrew Lee <anwlee@google.com> Replace ListView with RecyclerView in call log.

Yay, finally!

+ Replace ListView with RecyclerView in layout and fragment files.
+ Change GroupingListAdapter to extend RecyclerView.Adapter instead
of BaseAdapter.
+ Change CallLogListItemViews to extend RecyclerView.ViewHolder.
+ Adapt onBindViewHolder and onCreateViewHolder methods in the
CallLogAdapter.
+ Update/rework tests for related classes.
+ Fix a bug in the GroupingListAdapter, where childCount was not
updated for standalone views, and the previously cached group size
was used instead. Set childCount to 1 for standalone views.
- Removed the idea of creating different views for standalone vs
group vs group headers from the adapters. This logic has not been
used for quite some time and all these functions funneled into
createView/bindView methods anyways, so there is no logical
difference. If we need to create custom views in the future, we can
leverage onCreateViewHolder's viewType parameter.

Bug: 19372817
Change-Id: I1b7289340600609669db22d8bc89265240d0b561
/packages/apps/Dialer/src/com/android/dialer/calllog/GroupingListAdapter.java
07a5e0a68e95bc7e8098bb018004910dc97fa608 07-Apr-2015 Andrew Lee <anwlee@google.com> Move copy of GroupingListAdapter to Dialer app.

+ Copied in from com.android.common.widget. This component is pretty
specific to phone number / call log grouping anyways.
+ Changed CallLogAdapter to reference this GroupingListAdapter
instead of the one in the framework library.
+ Changed CallLogGroupBuilder to reference this adapter too.
+ Copy in tests too.

Next step: change GroupingListAdapter to extend RecyclerView.Adapter.
This will preserve existing grouping logic, despite switching to the
new view.

Bug: 19372817
Change-Id: Ic0186ca5fad06a3ae398b9d8f8006210077149dc
/packages/apps/Dialer/src/com/android/dialer/calllog/GroupingListAdapter.java