diff options
author | linyuh <linyuh@google.com> | 2018-05-16 16:18:46 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-05-16 16:19:29 -0700 |
commit | 4a8890f37496bf669734772068b3d684007c42f9 (patch) | |
tree | 5bc78cfca0bf571b752c5fc48321f98a93f18a0e /java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java | |
parent | b86b1a295178dc77d1b6b4af59d561d54c7469cf (diff) |
Implement accessibility for the new voicemail fragment.
Bug: 70989658
Test: Manual
PiperOrigin-RevId: 196907085
Change-Id: If3db2d6906245f052e756b315365b9d306f9d06d
Diffstat (limited to 'java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java')
-rw-r--r-- | java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java b/java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java index 66e2195b7..c001c0059 100644 --- a/java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java +++ b/java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java @@ -34,7 +34,6 @@ import android.util.Pair; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageView; -import android.widget.QuickContactBadge; import android.widget.TextView; import com.android.dialer.calllog.database.contract.AnnotatedCallLogContract.AnnotatedCallLog; import com.android.dialer.calllogutils.NumberAttributesConverter; @@ -44,10 +43,10 @@ import com.android.dialer.common.concurrent.DialerExecutor.SuccessListener; 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.time.Clock; import com.android.dialer.voicemail.listui.menu.NewVoicemailMenu; import com.android.dialer.voicemail.model.VoicemailEntry; +import com.android.dialer.widget.ContactPhotoView; import com.android.voicemail.VoicemailClient; /** {@link RecyclerView.ViewHolder} for the new voicemail tab. */ @@ -58,7 +57,7 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On private final TextView secondaryTextView; private final TextView transcriptionTextView; private final TextView transcriptionBrandingTextView; - private final QuickContactBadge quickContactBadge; + private final ContactPhotoView contactPhotoView; private final NewVoicemailMediaPlayerView mediaPlayerView; private final ImageView menuButton; private final Clock clock; @@ -67,13 +66,9 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On private VoicemailEntry voicemailEntryOfViewHolder; @NonNull private Uri viewHolderVoicemailUri; private final NewVoicemailViewHolderListener voicemailViewHolderListener; - private final GlidePhotoManager glidePhotoManager; NewVoicemailViewHolder( - View view, - Clock clock, - NewVoicemailViewHolderListener newVoicemailViewHolderListener, - GlidePhotoManager glidePhotoManager) { + View view, Clock clock, NewVoicemailViewHolderListener newVoicemailViewHolderListener) { super(view); LogUtil.enterBlock("NewVoicemailViewHolder"); this.context = view.getContext(); @@ -81,12 +76,11 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On secondaryTextView = view.findViewById(R.id.secondary_text); transcriptionTextView = view.findViewById(R.id.transcription_text); transcriptionBrandingTextView = view.findViewById(R.id.transcription_branding); - quickContactBadge = view.findViewById(R.id.quick_contact_photo); + contactPhotoView = view.findViewById(R.id.contact_photo_view); mediaPlayerView = view.findViewById(R.id.new_voicemail_media_player); menuButton = view.findViewById(R.id.menu_button); this.clock = clock; voicemailViewHolderListener = newVoicemailViewHolderListener; - this.glidePhotoManager = glidePhotoManager; viewHolderId = -1; isViewHolderExpanded = false; @@ -213,8 +207,7 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On } private void setPhoto(VoicemailEntry voicemailEntry) { - glidePhotoManager.loadQuickContactBadge( - quickContactBadge, + contactPhotoView.setPhoto( NumberAttributesConverter.toPhotoInfoBuilder(voicemailEntry.getNumberAttributes()) .setFormattedNumber(voicemailEntry.getFormattedNumber()) .build()); |