Home | History | Annotate | Download | only in calllog

Lines Matching refs:details

74   /** Fills the call details views with content. */
75 public void setPhoneCallDetails(PhoneCallDetailsViews views, PhoneCallDetails details) {
78 int count = details.callTypes.length;
81 views.callTypeIcons.add(details.callTypes[index]);
83 isVoicemail = details.callTypes[index] == Calls.VOICEMAIL_TYPE;
89 (details.features & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO);
91 MotorolaUtils.shouldShowHdIconInCallLog(mContext, details.features));
93 MotorolaUtils.shouldShowWifiIconInCallLog(mContext, details.features));
106 setDetailText(views, callCount, details);
109 String accountLabel = mCallLogCache.getAccountLabel(details.accountHandle);
110 if (!TextUtils.isEmpty(details.viaNumber)) {
114 R.string.call_log_via_number_phone_account, accountLabel, details.viaNumber);
116 accountLabel = mResources.getString(R.string.call_log_via_number, details.viaNumber);
122 int color = mCallLogCache.getAccountColor(details.accountHandle);
134 final CharSequence displayNumber = details.displayNumber;
135 if (TextUtils.isEmpty(details.getPreferredName())) {
140 nameText = details.getPreferredName();
149 TextUtils.isEmpty(details.transcription) ? null : details.transcription);
153 Typeface typeface = details.isRead ? Typeface.SANS_SERIF : Typeface.DEFAULT_BOLD;
160 details.isRead ? R.color.call_log_detail_color : R.color.call_log_unread_text_color));
167 * @param details The call details.
170 public CharSequence getCallLocationAndDate(PhoneCallDetails details) {
173 if (details.callTypes[0] != Calls.VOICEMAIL_TYPE) {
175 CharSequence callTypeOrLocation = getCallTypeOrLocation(details);
185 mDescriptionItems.add(getCallDate(details));
196 * @param details Call details to use.
199 public CharSequence getCallTypeOrLocation(PhoneCallDetails details) {
200 if (details.isSpam) {
202 } else if (details.isBlocked) {
208 if (!TextUtils.isEmpty(details.number)
209 && !PhoneNumberHelper.isUriNumber(details.number.toString())
210 && !mCallLogCache.isVoicemailNumber(details.accountHandle, details.number)) {
212 if (shouldShowLocation(details)) {
213 numberFormattedLabel = details.geocode;
214 } else if (!(details.numberType == Phone.TYPE_CUSTOM
215 && TextUtils.isEmpty(details.numberLabel))) {
220 : Phone.getTypeLabel(mResources, details.numberType, details.numberLabel);
224 if (!TextUtils.isEmpty(details.namePrimary) && TextUtils.isEmpty(numberFormattedLabel)) {
225 numberFormattedLabel = details.displayNumber;
231 private static boolean shouldShowLocation(PhoneCallDetails details) {
232 if (TextUtils.isEmpty(details.geocode)) {
236 if (details.sourceType == ContactSource.Type.SOURCE_TYPE_CEQUINT_CALLER_ID) {
240 if (!TextUtils.isEmpty(details.namePrimary)) {
254 * @param details Call details to use.
257 public CharSequence getCallDate(PhoneCallDetails details) {
258 if (details.callTypes[0] == Calls.VOICEMAIL_TYPE) {
259 return getGranularDateTime(details);
263 details.date,
278 * @param details Call details to use
281 public CharSequence getGranularDateTime(PhoneCallDetails details) {
284 getGranularDate(details.date),
285 DateUtils.formatDateTime(mContext, details.date, DateUtils.FORMAT_SHOW_TIME));
315 /** Sets the text of the header view for the details page of a phone call. */
316 public void setCallDetailsHeader(TextView nameView, PhoneCallDetails details) {
318 if (!TextUtils.isEmpty(details.namePrimary)) {
319 nameText = details.namePrimary;
320 } else if (!TextUtils.isEmpty(details.displayNumber)) {
321 nameText = details.displayNumber;
348 PhoneCallDetailsViews views, Integer callCount, PhoneCallDetails details) {
350 CharSequence dateText = details.callLocationAndDate;
358 if (details.callTypes[0] == Calls.VOICEMAIL_TYPE && details.duration > 0) {
363 getVoicemailDuration(details)));
369 private String getVoicemailDuration(PhoneCallDetails details) {
370 long minutes = TimeUnit.SECONDS.toMinutes(details.duration);
371 long seconds = details.duration - TimeUnit.MINUTES.toSeconds(minutes);