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
diff --git a/java/com/android/incallui/CallCardPresenter.java b/java/com/android/incallui/CallCardPresenter.java
index 9772cb1..6614e7c 100644
--- a/java/com/android/incallui/CallCardPresenter.java
+++ b/java/com/android/incallui/CallCardPresenter.java
@@ -722,6 +722,7 @@
: null)
.setLabel(isChildNumberShown || isCallSubjectShown ? null : primaryContactInfo.label)
.setPhoto(primaryContactInfo.photo)
+ .setPhotoUri(primaryContactInfo.displayPhotoUri)
.setPhotoType(primaryContactInfo.photoType)
.setIsSipCall(primaryContactInfo.isSipCall)
.setIsContactPhotoShown(showContactPhoto)
diff --git a/java/com/android/incallui/callpending/CallPendingActivity.java b/java/com/android/incallui/callpending/CallPendingActivity.java
index 3c69f97..a686308 100644
--- a/java/com/android/incallui/callpending/CallPendingActivity.java
+++ b/java/com/android/incallui/callpending/CallPendingActivity.java
@@ -166,9 +166,9 @@
}
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 @@
.setNameIsNumber(name != null && name.equals(number))
.setLabel(getPhoneLabel())
.setPhoto(photo)
+ .setPhotoUri(photoUri)
.setPhotoType(ContactPhotoType.CONTACT)
.setIsSipCall(false)
.setIsContactPhotoShown(true)