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

Commit f13f0b8b authored by Android Dialer's avatar Android Dialer Committed by Copybara-Service
Browse files

Updating locations where PrimaryInfo#setPhoto is used to also...

Updating locations where PrimaryInfo#setPhoto is used to also PrimaryInfo#setPhotoUri for new GlidePhotoManager implementation. As part of this addition, we also are cleaning the setPhoto(null) because this is not explicitly needed.

Bug: 76206920
Test: BottomRowTest,TopRowTest,SpeakEasyFragmentV2Test
PiperOrigin-RevId: 197785533
Change-Id: I1702f43ec206a6c31cf162978712292aff0f8a17
parent a93df437
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -722,6 +722,7 @@ public class CallCardPresenter
                      : null)
              .setLabel(isChildNumberShown || isCallSubjectShown ? null : primaryContactInfo.label)
              .setPhoto(primaryContactInfo.photo)
              .setPhotoUri(primaryContactInfo.displayPhotoUri)
              .setPhotoType(primaryContactInfo.photoType)
              .setIsSipCall(primaryContactInfo.isSipCall)
              .setIsContactPhotoShown(showContactPhoto)
+2 −1
Original line number Diff line number Diff line
@@ -166,9 +166,9 @@ public class CallPendingActivity extends FragmentActivity
    }

    Drawable photo = null;
    Uri photoUri = getPhotoUri();
    try {
      // TODO(calderwoodra) move to background thread
      Uri photoUri = getPhotoUri();
      InputStream is = getContentResolver().openInputStream(photoUri);
      photo = Drawable.createFromStream(is, photoUri.toString());
    } catch (FileNotFoundException e) {
@@ -185,6 +185,7 @@ public class CallPendingActivity extends FragmentActivity
        .setNameIsNumber(name != null && name.equals(number))
        .setLabel(getPhoneLabel())
        .setPhoto(photo)
        .setPhotoUri(photoUri)
        .setPhotoType(ContactPhotoType.CONTACT)
        .setIsSipCall(false)
        .setIsContactPhotoShown(true)