use of com.android.dialer.phonenumbercache.ContactInfoHelper 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();
}
use of com.android.dialer.phonenumbercache.ContactInfoHelper in project android_packages_apps_Dialer by LineageOS.
the class ContactPhotoLoader method createLetterTileDrawable.
/**
* @return a {@link LetterTileDrawable} based on the ContactInfo.
*/
private Drawable createLetterTileDrawable() {
ContactInfoHelper helper = new ContactInfoHelper(mContext, GeoUtil.getCurrentCountryIso(mContext));
LetterTileDrawable drawable = new LetterTileDrawable(mContext.getResources());
drawable.setCanonicalDialerLetterTileDetails(mContactInfo.name, mContactInfo.lookupKey, LetterTileDrawable.SHAPE_CIRCLE, helper.isBusiness(mContactInfo.sourceType) ? LetterTileDrawable.TYPE_BUSINESS : LetterTileDrawable.TYPE_DEFAULT);
return drawable;
}
use of com.android.dialer.phonenumbercache.ContactInfoHelper in project android_packages_apps_Dialer by LineageOS.
the class CallLogNotificationsQueryHelper method getInstance.
/**
* Returns an instance of {@link CallLogNotificationsQueryHelper}.
*/
public static CallLogNotificationsQueryHelper getInstance(Context context) {
ContentResolver contentResolver = context.getContentResolver();
String countryIso = GeoUtil.getCurrentCountryIso(context);
return new CallLogNotificationsQueryHelper(context, createNewCallsQuery(context, contentResolver), new ContactInfoHelper(context, countryIso), countryIso);
}
Aggregations