summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/voicemail/listui
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/android/dialer/voicemail/listui')
-rw-r--r--java/com/android/dialer/voicemail/listui/NewVoicemailAdapter.java6
-rw-r--r--java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java8
-rw-r--r--java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java45
-rw-r--r--java/com/android/dialer/voicemail/listui/VoicemailCursorLoader.java59
-rw-r--r--java/com/android/dialer/voicemail/listui/VoicemailEntryText.java22
-rw-r--r--java/com/android/dialer/voicemail/listui/menu/Modules.java28
-rw-r--r--java/com/android/dialer/voicemail/listui/menu/PrimaryAction.java24
7 files changed, 107 insertions, 85 deletions
diff --git a/java/com/android/dialer/voicemail/listui/NewVoicemailAdapter.java b/java/com/android/dialer/voicemail/listui/NewVoicemailAdapter.java
index 5eeb0fb59..64f63d9bc 100644
--- a/java/com/android/dialer/voicemail/listui/NewVoicemailAdapter.java
+++ b/java/com/android/dialer/voicemail/listui/NewVoicemailAdapter.java
@@ -92,7 +92,7 @@ final class NewVoicemailAdapter extends RecyclerView.Adapter<ViewHolder>
private final FragmentManager fragmentManager;
/** A valid id for {@link VoicemailEntry} is greater than 0 */
- private int currentlyExpandedViewHolderId = -1;
+ private long currentlyExpandedViewHolderId = -1;
private VoicemailErrorMessage voicemailErrorMessage;
@@ -114,7 +114,7 @@ final class NewVoicemailAdapter extends RecyclerView.Adapter<ViewHolder>
* will always ensure there is only (up-to-date) view holder corresponding to a view holder id,
* unlike the newVoicemailViewHolderSet.
*/
- private final ArrayMap<Integer, NewVoicemailViewHolder> newVoicemailViewHolderArrayMap =
+ private final ArrayMap<Long, NewVoicemailViewHolder> newVoicemailViewHolderArrayMap =
new ArrayMap<>();
// A single instance of a media player re-used across the expanded view holders.
@@ -440,7 +440,7 @@ final class NewVoicemailAdapter extends RecyclerView.Adapter<ViewHolder>
if (!newVoicemailViewHolderArrayMap.isEmpty()) {
String ids = "";
- for (int id : newVoicemailViewHolderArrayMap.keySet()) {
+ for (long id : newVoicemailViewHolderArrayMap.keySet()) {
ids = ids + id + " ";
}
LogUtil.i("NewVoicemailAdapter.printArrayMap", "ids are " + ids);
diff --git a/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java b/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java
index 52f3d0a48..f821f4f8a 100644
--- a/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java
+++ b/java/com/android/dialer/voicemail/listui/NewVoicemailMediaPlayerView.java
@@ -154,11 +154,11 @@ public final class NewVoicemailMediaPlayerView extends LinearLayout {
NewVoicemailViewHolderListener listener) {
Assert.isNotNull(voicemailEntryFromAdapter);
- Uri uri = Uri.parse(voicemailEntryFromAdapter.voicemailUri());
+ Uri uri = Uri.parse(voicemailEntryFromAdapter.getVoicemailUri());
- numberVoicemailFrom = voicemailEntryFromAdapter.number().getNormalizedNumber();
- phoneAccountId = voicemailEntryFromAdapter.phoneAccountId();
- phoneAccountComponentName = voicemailEntryFromAdapter.phoneAccountComponentName();
+ numberVoicemailFrom = voicemailEntryFromAdapter.getNumber().getNormalizedNumber();
+ phoneAccountId = voicemailEntryFromAdapter.getPhoneAccountId();
+ phoneAccountComponentName = voicemailEntryFromAdapter.getPhoneAccountComponentName();
Assert.isNotNull(viewHolder);
Assert.isNotNull(uri);
diff --git a/java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java b/java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java
index 1f857840e..d42c255eb 100644
--- a/java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java
+++ b/java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java
@@ -45,7 +45,6 @@ import com.android.dialer.common.concurrent.DialerExecutor.Worker;
import com.android.dialer.common.concurrent.DialerExecutorComponent;
import com.android.dialer.compat.android.provider.VoicemailCompat;
import com.android.dialer.glidephotomanager.GlidePhotoManager;
-import com.android.dialer.glidephotomanager.PhotoInfo;
import com.android.dialer.time.Clock;
import com.android.dialer.voicemail.listui.menu.NewVoicemailMenu;
import com.android.dialer.voicemail.model.VoicemailEntry;
@@ -64,7 +63,7 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On
private final ImageView menuButton;
private final Clock clock;
private boolean isViewHolderExpanded;
- private int viewHolderId;
+ private long viewHolderId;
private VoicemailEntry voicemailEntryOfViewHolder;
@NonNull private Uri viewHolderVoicemailUri;
private final NewVoicemailViewHolderListener voicemailViewHolderListener;
@@ -117,7 +116,7 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On
FragmentManager fragmentManager,
NewVoicemailMediaPlayer mediaPlayer,
int position,
- int currentlyExpandedViewHolderId) {
+ long currentlyExpandedViewHolderId) {
LogUtil.i(
"NewVoicemailViewHolder.bindViewHolderValuesFromAdapter",
@@ -128,16 +127,16 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On
cursor.getCount());
voicemailEntryOfViewHolder = VoicemailCursorLoader.toVoicemailEntry(cursor);
- viewHolderId = voicemailEntryOfViewHolder.id();
+ viewHolderId = voicemailEntryOfViewHolder.getId();
LogUtil.i(
"NewVoicemailViewHolder.bindViewHolderValuesFromAdapter", "viewholderId:%d", viewHolderId);
- viewHolderVoicemailUri = Uri.parse(voicemailEntryOfViewHolder.voicemailUri());
+ viewHolderVoicemailUri = Uri.parse(voicemailEntryOfViewHolder.getVoicemailUri());
primaryTextView.setText(
VoicemailEntryText.buildPrimaryVoicemailText(context, voicemailEntryOfViewHolder));
secondaryTextView.setText(
VoicemailEntryText.buildSecondaryVoicemailText(context, clock, voicemailEntryOfViewHolder));
- String voicemailTranscription = voicemailEntryOfViewHolder.transcription();
+ String voicemailTranscription = voicemailEntryOfViewHolder.getTranscription();
if (TextUtils.isEmpty(voicemailTranscription)) {
transcriptionTextView.setVisibility(GONE);
@@ -204,10 +203,10 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On
LogUtil.v(
"NewVoicemailViewHolder.boldViewHolderIfUnread",
"id:%d, isRead:%d",
- voicemailEntryOfViewHolder.id(),
- voicemailEntryOfViewHolder.isRead());
+ voicemailEntryOfViewHolder.getId(),
+ voicemailEntryOfViewHolder.getIsRead());
- if (voicemailEntryOfViewHolder.isRead() == 0) {
+ if (voicemailEntryOfViewHolder.getIsRead() == 0) {
primaryTextView.setTypeface(Typeface.DEFAULT, Typeface.BOLD);
secondaryTextView.setTypeface(Typeface.DEFAULT, Typeface.BOLD);
transcriptionTextView.setTypeface(Typeface.DEFAULT, Typeface.BOLD);
@@ -215,13 +214,11 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On
}
private void setPhoto(VoicemailEntry voicemailEntry) {
- PhotoInfo.Builder photoInfoBuilder =
- NumberAttributesConverter.toPhotoInfoBuilder(voicemailEntry.numberAttributes());
- if (!TextUtils.isEmpty(voicemailEntry.formattedNumber())) {
- photoInfoBuilder.setFormattedNumber(voicemailEntry.formattedNumber());
- }
-
- glidePhotoManager.loadQuickContactBadge(quickContactBadge, photoInfoBuilder.build());
+ glidePhotoManager.loadQuickContactBadge(
+ quickContactBadge,
+ NumberAttributesConverter.toPhotoInfoBuilder(voicemailEntry.getNumberAttributes())
+ .setFormattedNumber(voicemailEntry.getFormattedNumber())
+ .build());
}
void collapseViewHolder() {
@@ -293,9 +290,9 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On
Assert.isNotNull(voicemailViewHolderListener);
Assert.checkArgument(
- voicemailEntry.id() == viewHolderId, "ensure that the adapter binding has taken place");
+ voicemailEntry.getId() == viewHolderId, "ensure that the adapter binding has taken place");
Assert.checkArgument(
- Uri.parse(voicemailEntry.voicemailUri()).equals(viewHolderVoicemailUri),
+ Uri.parse(voicemailEntry.getVoicemailUri()).equals(viewHolderVoicemailUri),
"ensure that the adapter binding has taken place");
LogUtil.i(
"NewVoicemailViewHolder.expandAndBindViewHolderAndMediaPlayerViewWithAdapterValues",
@@ -305,15 +302,15 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On
isViewHolderExpanded,
String.valueOf(viewHolderVoicemailUri),
String.valueOf(mediaPlayerView.getVoicemailUri()),
- voicemailEntry.isRead());
+ voicemailEntry.getIsRead());
- if (voicemailEntry.isRead() == 0) {
+ if (voicemailEntry.getIsRead() == 0) {
// update as read.
primaryTextView.setTypeface(Typeface.DEFAULT, Typeface.NORMAL);
secondaryTextView.setTypeface(Typeface.DEFAULT, Typeface.NORMAL);
transcriptionTextView.setTypeface(Typeface.DEFAULT, Typeface.NORMAL);
- Uri uri = Uri.parse(voicemailEntry.voicemailUri());
+ Uri uri = Uri.parse(voicemailEntry.getVoicemailUri());
Worker<Pair<Context, Uri>, Integer> markVoicemailRead = this::markVoicemailAsRead;
SuccessListener<Integer> markedAsReadVoicemailCallBack = this::onVoicemailMarkedAsRead;
@@ -344,8 +341,8 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On
}
private void updateBrandingText(VoicemailEntry voicemailEntry) {
- if (voicemailEntry.transcriptionState() == VoicemailCompat.TRANSCRIPTION_AVAILABLE
- && !TextUtils.isEmpty(voicemailEntry.transcription())) {
+ if (voicemailEntry.getTranscriptionState() == VoicemailCompat.TRANSCRIPTION_AVAILABLE
+ && !TextUtils.isEmpty(voicemailEntry.getTranscription())) {
transcriptionBrandingTextView.setVisibility(VISIBLE);
} else {
transcriptionBrandingTextView.setVisibility(GONE);
@@ -435,7 +432,7 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On
return isViewHolderExpanded;
}
- public int getViewHolderId() {
+ public long getViewHolderId() {
return viewHolderId;
}
diff --git a/java/com/android/dialer/voicemail/listui/VoicemailCursorLoader.java b/java/com/android/dialer/voicemail/listui/VoicemailCursorLoader.java
index 5f717cf0c..f242484f3 100644
--- a/java/com/android/dialer/voicemail/listui/VoicemailCursorLoader.java
+++ b/java/com/android/dialer/voicemail/listui/VoicemailCursorLoader.java
@@ -20,6 +20,7 @@ import android.content.Context;
import android.database.Cursor;
import android.provider.CallLog.Calls;
import android.support.v4.content.CursorLoader;
+import android.text.TextUtils;
import com.android.dialer.DialerPhoneNumber;
import com.android.dialer.NumberAttributes;
import com.android.dialer.calllog.database.contract.AnnotatedCallLogContract.AnnotatedCallLog;
@@ -99,22 +100,48 @@ final class VoicemailCursorLoader extends CursorLoader {
"CP2 info incomplete for number: %s",
LogUtil.sanitizePii(number.getNormalizedNumber()));
- return VoicemailEntry.builder()
- .setId(cursor.getInt(ID))
- .setTimestamp(cursor.getLong(TIMESTAMP))
- .setNumber(number)
- .setFormattedNumber(cursor.getString(FORMATTED_NUMBER))
- .setDuration(cursor.getLong(DURATION))
- .setTranscription(cursor.getString(TRANSCRIPTION))
- .setVoicemailUri(cursor.getString(VOICEMAIL_URI))
- .setGeocodedLocation(cursor.getString(GEOCODED_LOCATION))
- .setCallType(cursor.getInt(CALL_TYPE))
- .setIsRead(cursor.getInt(IS_READ))
- .setNumberAttributes(numberAttributes)
- .setTranscriptionState(cursor.getInt(TRANSCRIPTION_STATE))
- .setPhoneAccountComponentName(cursor.getString(PHONE_ACCOUNT_COMPONENT_NAME))
- .setPhoneAccountId(cursor.getString(PHONE_ACCOUNT_ID))
- .build();
+ VoicemailEntry.Builder voicemailEntryBuilder =
+ VoicemailEntry.newBuilder()
+ .setId(cursor.getInt(ID))
+ .setTimestamp(cursor.getLong(TIMESTAMP))
+ .setNumber(number)
+ .setDuration(cursor.getLong(DURATION))
+ .setCallType(cursor.getInt(CALL_TYPE))
+ .setIsRead(cursor.getInt(IS_READ))
+ .setNumberAttributes(numberAttributes)
+ .setTranscriptionState(cursor.getInt(TRANSCRIPTION_STATE));
+
+ String formattedNumber = cursor.getString(FORMATTED_NUMBER);
+ if (!TextUtils.isEmpty(formattedNumber)) {
+ voicemailEntryBuilder.setFormattedNumber(formattedNumber);
+ }
+
+ String geocodedLocation = cursor.getString(GEOCODED_LOCATION);
+ if (!TextUtils.isEmpty(geocodedLocation)) {
+ voicemailEntryBuilder.setGeocodedLocation(geocodedLocation);
+ }
+
+ String transcription = cursor.getString(TRANSCRIPTION);
+ if (!TextUtils.isEmpty(transcription)) {
+ voicemailEntryBuilder.setTranscription(transcription);
+ }
+
+ String voicemailUri = cursor.getString(VOICEMAIL_URI);
+ if (!TextUtils.isEmpty(voicemailUri)) {
+ voicemailEntryBuilder.setVoicemailUri(voicemailUri);
+ }
+
+ String phoneAccountComponentName = cursor.getString(PHONE_ACCOUNT_COMPONENT_NAME);
+ if (!TextUtils.isEmpty(phoneAccountComponentName)) {
+ voicemailEntryBuilder.setPhoneAccountComponentName(phoneAccountComponentName);
+ }
+
+ String phoneAccountId = cursor.getString(PHONE_ACCOUNT_ID);
+ if (!TextUtils.isEmpty(phoneAccountId)) {
+ voicemailEntryBuilder.setPhoneAccountId(phoneAccountId);
+ }
+
+ return voicemailEntryBuilder.build();
}
static long getTimestamp(Cursor cursor) {
diff --git a/java/com/android/dialer/voicemail/listui/VoicemailEntryText.java b/java/com/android/dialer/voicemail/listui/VoicemailEntryText.java
index 4aaf2d1e7..973f9b1a8 100644
--- a/java/com/android/dialer/voicemail/listui/VoicemailEntryText.java
+++ b/java/com/android/dialer/voicemail/listui/VoicemailEntryText.java
@@ -33,10 +33,10 @@ public class VoicemailEntryText {
public static String buildPrimaryVoicemailText(Context context, VoicemailEntry data) {
StringBuilder primaryText = new StringBuilder();
- if (!TextUtils.isEmpty(data.numberAttributes().getName())) {
- primaryText.append(data.numberAttributes().getName());
- } else if (!TextUtils.isEmpty(data.formattedNumber())) {
- primaryText.append(data.formattedNumber());
+ if (!TextUtils.isEmpty(data.getNumberAttributes().getName())) {
+ primaryText.append(data.getNumberAttributes().getName());
+ } else if (!TextUtils.isEmpty(data.getFormattedNumber())) {
+ primaryText.append(data.getFormattedNumber());
} else {
// TODO(uabdullah): Handle CallLog.Calls.PRESENTATION_*, including Verizon restricted numbers.
primaryText.append(context.getText(R.string.voicemail_entry_unknown));
@@ -71,7 +71,7 @@ public class VoicemailEntryText {
private static String secondaryTextPrefix(
Context context, Clock clock, VoicemailEntry voicemailEntry) {
StringBuilder secondaryText = new StringBuilder();
- String location = voicemailEntry.geocodedLocation();
+ String location = voicemailEntry.getGeocodedLocation();
if (!TextUtils.isEmpty(location)) {
secondaryText.append(location);
}
@@ -80,9 +80,9 @@ public class VoicemailEntryText {
}
secondaryText.append(
CallLogDates.newCallLogTimestampLabel(
- context, clock.currentTimeMillis(), voicemailEntry.timestamp()));
+ context, clock.currentTimeMillis(), voicemailEntry.getTimestamp()));
- long duration = voicemailEntry.duration();
+ long duration = voicemailEntry.getDuration();
if (duration >= 0) {
secondaryText.append(" • ");
String formattedDuration = getVoicemailDuration(context, voicemailEntry);
@@ -92,15 +92,17 @@ public class VoicemailEntryText {
}
static String getVoicemailDuration(Context context, VoicemailEntry voicemailEntry) {
- long minutes = TimeUnit.SECONDS.toMinutes(voicemailEntry.duration());
- long seconds = voicemailEntry.duration() - TimeUnit.MINUTES.toSeconds(minutes);
+ long minutes = TimeUnit.SECONDS.toMinutes(voicemailEntry.getDuration());
+ long seconds = voicemailEntry.getDuration() - TimeUnit.MINUTES.toSeconds(minutes);
// The format for duration is "MM:SS" and we never expect the duration to be > 5 minutes
// However an incorrect duration could be set by the framework/someone to be >99, and in that
// case cap it at 99, for the UI to still be able to display it in "MM:SS" format.
if (minutes > 99) {
LogUtil.w(
- "VoicemailEntryText.getVoicemailDuration", "Duration was %d", voicemailEntry.duration());
+ "VoicemailEntryText.getVoicemailDuration",
+ "Duration was %d",
+ voicemailEntry.getDuration());
minutes = 99;
}
return context.getString(R.string.voicemailDurationFormat, minutes, seconds);
diff --git a/java/com/android/dialer/voicemail/listui/menu/Modules.java b/java/com/android/dialer/voicemail/listui/menu/Modules.java
index c3c883ceb..226063c1b 100644
--- a/java/com/android/dialer/voicemail/listui/menu/Modules.java
+++ b/java/com/android/dialer/voicemail/listui/menu/Modules.java
@@ -43,11 +43,11 @@ final class Modules {
Optional<HistoryItemActionModule> moduleForAddingContacts =
SharedModules.createModuleForAddingToContacts(
context,
- voicemailEntry.number(),
- voicemailEntry.numberAttributes().getName(),
- voicemailEntry.numberAttributes().getLookupUri(),
- voicemailEntry.numberAttributes().getIsBlocked(),
- voicemailEntry.numberAttributes().getIsSpam());
+ voicemailEntry.getNumber(),
+ voicemailEntry.getNumberAttributes().getName(),
+ voicemailEntry.getNumberAttributes().getLookupUri(),
+ voicemailEntry.getNumberAttributes().getIsBlocked(),
+ voicemailEntry.getNumberAttributes().getIsSpam());
if (moduleForAddingContacts.isPresent()) {
modules.add(moduleForAddingContacts.get());
}
@@ -55,8 +55,8 @@ final class Modules {
Optional<HistoryItemActionModule> moduleForSendingTextMessage =
SharedModules.createModuleForSendingTextMessage(
context,
- voicemailEntry.number().getNormalizedNumber(),
- voicemailEntry.numberAttributes().getIsBlocked());
+ voicemailEntry.getNumber().getNormalizedNumber(),
+ voicemailEntry.getNumberAttributes().getIsBlocked());
if (moduleForSendingTextMessage.isPresent()) {
modules.add(moduleForSendingTextMessage.get());
}
@@ -67,23 +67,23 @@ final class Modules {
BlockReportSpamDialogInfo blockReportSpamDialogInfo =
BlockReportSpamDialogInfo.newBuilder()
- .setNormalizedNumber(voicemailEntry.number().getNormalizedNumber())
- .setCountryIso(voicemailEntry.number().getCountryIso())
- .setCallType(voicemailEntry.callType())
+ .setNormalizedNumber(voicemailEntry.getNumber().getNormalizedNumber())
+ .setCountryIso(voicemailEntry.getNumber().getCountryIso())
+ .setCallType(voicemailEntry.getCallType())
.setReportingLocation(ReportingLocation.Type.VOICEMAIL_HISTORY)
- .setContactSource(voicemailEntry.numberAttributes().getContactSource())
+ .setContactSource(voicemailEntry.getNumberAttributes().getContactSource())
.build();
modules.addAll(
SharedModules.createModulesHandlingBlockedOrSpamNumber(
context,
blockReportSpamDialogInfo,
- voicemailEntry.numberAttributes().getIsBlocked(),
- voicemailEntry.numberAttributes().getIsSpam()));
+ voicemailEntry.getNumberAttributes().getIsBlocked(),
+ voicemailEntry.getNumberAttributes().getIsSpam()));
// TODO(zachh): Module for CallComposer.
Optional<HistoryItemActionModule> moduleForCopyingNumber =
SharedModules.createModuleForCopyingNumber(
- context, voicemailEntry.number().getNormalizedNumber());
+ context, voicemailEntry.getNumber().getNormalizedNumber());
if (moduleForCopyingNumber.isPresent()) {
modules.add(moduleForCopyingNumber.get());
}
diff --git a/java/com/android/dialer/voicemail/listui/menu/PrimaryAction.java b/java/com/android/dialer/voicemail/listui/menu/PrimaryAction.java
index dbc417c6c..14c83563a 100644
--- a/java/com/android/dialer/voicemail/listui/menu/PrimaryAction.java
+++ b/java/com/android/dialer/voicemail/listui/menu/PrimaryAction.java
@@ -19,7 +19,6 @@ package com.android.dialer.voicemail.listui.menu;
import android.content.Context;
import android.text.TextUtils;
import com.android.dialer.calllogutils.NumberAttributesConverter;
-import com.android.dialer.glidephotomanager.PhotoInfo;
import com.android.dialer.historyitemactions.HistoryItemPrimaryActionInfo;
import com.android.dialer.voicemail.model.VoicemailEntry;
@@ -34,30 +33,27 @@ final class PrimaryAction {
// setSecondaryText - check in with UX
static HistoryItemPrimaryActionInfo fromVoicemailEntry(
Context context, VoicemailEntry voicemailEntry) {
- PhotoInfo.Builder photoInfoBuilder =
- NumberAttributesConverter.toPhotoInfoBuilder(voicemailEntry.numberAttributes());
- if (!TextUtils.isEmpty(voicemailEntry.formattedNumber())) {
- photoInfoBuilder.setFormattedNumber(voicemailEntry.formattedNumber());
- }
-
return HistoryItemPrimaryActionInfo.builder()
- .setNumber(voicemailEntry.number())
- .setPhotoInfo(photoInfoBuilder.build())
+ .setNumber(voicemailEntry.getNumber())
+ .setPhotoInfo(
+ NumberAttributesConverter.toPhotoInfoBuilder(voicemailEntry.getNumberAttributes())
+ .setFormattedNumber(voicemailEntry.getFormattedNumber())
+ .build())
.setPrimaryText(buildPrimaryVoicemailText(context, voicemailEntry))
.setSecondaryText(buildSecondaryVoicemailText(voicemailEntry))
.build();
}
private static CharSequence buildSecondaryVoicemailText(VoicemailEntry voicemailEntry) {
- return voicemailEntry.geocodedLocation();
+ return voicemailEntry.getGeocodedLocation();
}
public static String buildPrimaryVoicemailText(Context context, VoicemailEntry data) {
StringBuilder primaryText = new StringBuilder();
- if (!TextUtils.isEmpty(data.numberAttributes().getName())) {
- primaryText.append(data.numberAttributes().getName());
- } else if (!TextUtils.isEmpty(data.formattedNumber())) {
- primaryText.append(data.formattedNumber());
+ if (!TextUtils.isEmpty(data.getNumberAttributes().getName())) {
+ primaryText.append(data.getNumberAttributes().getName());
+ } else if (!TextUtils.isEmpty(data.getFormattedNumber())) {
+ primaryText.append(data.getFormattedNumber());
} else {
// TODO(uabdullah): Handle CallLog.Calls.PRESENTATION_*, including Verizon restricted numbers.
// primaryText.append(context.getText(R.string.voicemail_unknown));