Search in sources :

Example 1 with CallLogCache

use of com.android.dialer.app.calllog.calllogcache.CallLogCache in project android_packages_apps_Dialer by LineageOS.

the class CallLogFragment method setupData.

protected void setupData() {
    int activityType = mIsCallLogActivity ? CallLogAdapter.ACTIVITY_TYPE_CALL_LOG : CallLogAdapter.ACTIVITY_TYPE_DIALTACTS;
    String currentCountryIso = GeoUtil.getCurrentCountryIso(getActivity());
    mContactInfoCache = new ContactInfoCache(ExpirableCacheHeadlessFragment.attach((AppCompatActivity) getActivity()).getRetainedCache(), new ContactInfoHelper(getActivity(), currentCountryIso), mOnContactInfoChangedListener);
    mAdapter = Bindings.getLegacy(getActivity()).newCallLogAdapter(getActivity(), mRecyclerView, this, this, activityType == CallLogAdapter.ACTIVITY_TYPE_DIALTACTS ? (CallLogAdapter.OnActionModeStateChangedListener) getActivity() : null, new CallLogCache(getActivity()), mContactInfoCache, getVoicemailPlaybackPresenter(), new FilteredNumberAsyncQueryHandler(getActivity()), activityType);
    mRecyclerView.setAdapter(mAdapter);
    fetchCalls();
}
Also used : CallLogCache(com.android.dialer.app.calllog.calllogcache.CallLogCache) ContactInfoHelper(com.android.dialer.phonenumbercache.ContactInfoHelper) AppCompatActivity(android.support.v7.app.AppCompatActivity) FilteredNumberAsyncQueryHandler(com.android.dialer.blocking.FilteredNumberAsyncQueryHandler) ContactInfoCache(com.android.dialer.app.contactinfo.ContactInfoCache)

Example 2 with CallLogCache

use of com.android.dialer.app.calllog.calllogcache.CallLogCache in project android_packages_apps_Dialer by LineageOS.

the class CallLogListItemViewHolder method createForTest.

public static CallLogListItemViewHolder createForTest(Context context, View.OnClickListener expandCollapseListener, VoicemailPlaybackPresenter voicemailPlaybackPresenter) {
    Resources resources = context.getResources();
    CallLogCache callLogCache = new CallLogCache(context);
    PhoneCallDetailsHelper phoneCallDetailsHelper = new PhoneCallDetailsHelper(context, resources, callLogCache);
    CallLogListItemViewHolder viewHolder = new CallLogListItemViewHolder(context, null, expandCollapseListener, /* expandCollapseListener */
    null, null, callLogCache, new CallLogListItemHelper(phoneCallDetailsHelper, resources, callLogCache), voicemailPlaybackPresenter, LayoutInflater.from(context).inflate(R.layout.call_log_list_item, null), new DialerQuickContactBadge(context), new View(context), PhoneCallDetailsViews.createForTest(context), new CardView(context), new TextView(context), new ImageView(context));
    viewHolder.detailsButtonView = new TextView(context);
    viewHolder.actionsView = new View(context);
    viewHolder.voicemailPlaybackView = new VoicemailPlaybackLayout(context);
    viewHolder.workIconView = new ImageButton(context);
    viewHolder.checkBoxView = new ImageButton(context);
    return viewHolder;
}
Also used : CallLogCache(com.android.dialer.app.calllog.calllogcache.CallLogCache) ImageButton(android.widget.ImageButton) VoicemailPlaybackLayout(com.android.dialer.app.voicemail.VoicemailPlaybackLayout) CardView(android.support.v7.widget.CardView) TextView(android.widget.TextView) Resources(android.content.res.Resources) ImageView(android.widget.ImageView) ImageView(android.widget.ImageView) View(android.view.View) CardView(android.support.v7.widget.CardView) TextView(android.widget.TextView) RecyclerView(android.support.v7.widget.RecyclerView)

Aggregations

CallLogCache (com.android.dialer.app.calllog.calllogcache.CallLogCache)2 Resources (android.content.res.Resources)1 AppCompatActivity (android.support.v7.app.AppCompatActivity)1 CardView (android.support.v7.widget.CardView)1 RecyclerView (android.support.v7.widget.RecyclerView)1 View (android.view.View)1 ImageButton (android.widget.ImageButton)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 ContactInfoCache (com.android.dialer.app.contactinfo.ContactInfoCache)1 VoicemailPlaybackLayout (com.android.dialer.app.voicemail.VoicemailPlaybackLayout)1 FilteredNumberAsyncQueryHandler (com.android.dialer.blocking.FilteredNumberAsyncQueryHandler)1 ContactInfoHelper (com.android.dialer.phonenumbercache.ContactInfoHelper)1