Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a44f188 authored by linyuh's avatar linyuh Committed by Eric Erfanian
Browse files

Better a11y for contact badge in the new call log.

Bug: 70989658
Test: GlidePhotoManagerImplTest
PiperOrigin-RevId: 197918533
Change-Id: I61d04e270ddf4237e8ed9c10e62e8d95f86d1eca
parent 33291b5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ final class NewCallLogViewHolder extends RecyclerView.ViewHolder {
  }

  private void setPhoto(CoalescedRow row) {
    contactPhotoView.setPhoto(PhotoInfoBuilder.fromCoalescedRow(row).build());
    contactPhotoView.setPhoto(PhotoInfoBuilder.fromCoalescedRow(activity, row).build());
  }

  private void setFeatureIcons(CoalescedRow row) {
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ final class BottomSheetHeader {
  static HistoryItemBottomSheetHeaderInfo fromRow(Context context, CoalescedRow row) {
    return HistoryItemBottomSheetHeaderInfo.newBuilder()
        .setNumber(row.getNumber())
        .setPhotoInfo(PhotoInfoBuilder.fromCoalescedRow(row))
        .setPhotoInfo(PhotoInfoBuilder.fromCoalescedRow(context, row))
        .setPrimaryText(CallLogEntryText.buildPrimaryText(context, row).toString())
        .setSecondaryText(
            CallLogEntryText.buildSecondaryTextForBottomSheet(context, row).toString())
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ final class Modules {
      Context context, CoalescedRow row) {
    return CallDetailsHeaderInfo.newBuilder()
        .setDialerPhoneNumber(row.getNumber())
        .setPhotoInfo(PhotoInfoBuilder.fromCoalescedRow(row))
        .setPhotoInfo(PhotoInfoBuilder.fromCoalescedRow(context, row))
        .setPrimaryText(CallLogEntryText.buildPrimaryText(context, row).toString())
        .setSecondaryText(
            CallLogEntryText.buildSecondaryTextForBottomSheet(context, row).toString())
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.dialer.calllogutils;

import android.content.Context;
import android.provider.CallLog.Calls;
import android.support.v4.os.BuildCompat;
import com.android.dialer.NumberAttributes;
@@ -28,8 +29,9 @@ import com.android.dialer.voicemail.model.VoicemailEntry;
public final class PhotoInfoBuilder {

  /** Returns a {@link PhotoInfo.Builder} with info from {@link CoalescedRow}. */
  public static PhotoInfo.Builder fromCoalescedRow(CoalescedRow coalescedRow) {
  public static PhotoInfo.Builder fromCoalescedRow(Context context, CoalescedRow coalescedRow) {
    return fromNumberAttributes(coalescedRow.getNumberAttributes())
        .setName(CallLogEntryText.buildPrimaryText(context, coalescedRow).toString())
        .setFormattedNumber(coalescedRow.getFormattedNumber())
        .setIsVoicemail(coalescedRow.getIsVoicemailCall())
        .setIsSpam(