From 6b0056f348e1f9ecf0f91b53b51d240961bc8313 Mon Sep 17 00:00:00 2001 From: Sarmad Hashmi Date: Wed, 17 Feb 2016 17:20:36 -0800 Subject: 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 --- src/com/android/dialer/calllog/CallLogFragment.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/com/android/dialer/calllog/CallLogFragment.java') diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java index 9cd1359c7..07299a2fb 100644 --- a/src/com/android/dialer/calllog/CallLogFragment.java +++ b/src/com/android/dialer/calllog/CallLogFragment.java @@ -300,13 +300,15 @@ public class CallLogFragment extends Fragment implements CallLogQueryHandler.Lis mEmptyListView.setImage(R.drawable.empty_call_log); mEmptyListView.setActionClickedListener(this); + int activityType = mIsCallLogActivity ? CallLogAdapter.ACTIVITY_TYPE_CALL_LOG : + CallLogAdapter.ACTIVITY_TYPE_DIALTACTS; String currentCountryIso = GeoUtil.getCurrentCountryIso(getActivity()); mAdapter = ObjectFactory.newCallLogAdapter( - getActivity(), - this, - new ContactInfoHelper(getActivity(), currentCountryIso), - voicemailPlaybackPresenter, - mIsCallLogActivity); + getActivity(), + this, + new ContactInfoHelper(getActivity(), currentCountryIso), + voicemailPlaybackPresenter, + activityType); mRecyclerView.setAdapter(mAdapter); fetchCalls(); } -- cgit v1.2.3