From 8cd9423bd04584acbcbf178bf6a1c1953debb8da Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Wed, 23 Jul 2014 14:05:31 -0700 Subject: Add voicemail transcriptions to Dialer * Display voicemail transcriptions in the call log and call details activity in the Dialer * Fix a bug in CallDetailActivity that would result in multiple instances of VoicemailPlaybackFragment being added on rotation. Now, reuse the same fragment if it is already present in the FragmentManager, to avoid creating new ones * Simplify some test and ctor logic in PhoneCallDetails to reduce the pain of adding new fields into PhoneCallDetails * Simplified playback_layout.xml to remove unnecessary parent LinearLayouts Bug: 16320164 Change-Id: Ie68acc9058aace49d8e64f44a0128de0b6a3f842 --- src/com/android/dialer/calllog/CallLogAdapter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/com/android/dialer/calllog/CallLogAdapter.java') diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 682dbd131..630cf3f33 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -651,6 +651,7 @@ public class CallLogAdapter extends GroupingListAdapter final Drawable accountIcon = PhoneAccountUtils.getAccountIcon(mContext, accountHandle); final String countryIso = c.getString(CallLogQuery.COUNTRY_ISO); + final long rowId = c.getLong(CallLogQuery.ID); views.rowId = rowId; @@ -755,6 +756,7 @@ public class CallLogAdapter extends GroupingListAdapter final String geocode = c.getString(CallLogQuery.GEOCODED_LOCATION); final int sourceType = info.sourceType; final int features = getCallFeatures(c, count); + final String transcription = c.getString(CallLogQuery.TRANSCRIPTION); Long dataUsage = null; if (!c.isNull(CallLogQuery.DATA_USAGE)) { dataUsage = c.getLong(CallLogQuery.DATA_USAGE); @@ -772,12 +774,12 @@ public class CallLogAdapter extends GroupingListAdapter if (TextUtils.isEmpty(name)) { details = new PhoneCallDetails(number, numberPresentation, formattedNumber, countryIso, geocode, callTypes, date, - duration, accountIcon, features, dataUsage); + duration, accountIcon, features, dataUsage, transcription); } else { details = new PhoneCallDetails(number, numberPresentation, formattedNumber, countryIso, geocode, callTypes, date, duration, name, ntype, label, lookupUri, photoUri, sourceType, - accountIcon, features, dataUsage); + accountIcon, features, dataUsage, transcription); } mCallLogViewsHelper.setPhoneCallDetails(views, details); -- cgit v1.2.3