summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorAndroid Dialer <noreply@google.com>2018-05-23 14:05:34 -0700
committerCopybara-Service <copybara-piper@google.com>2018-05-29 23:26:52 -0700
commitf13f0b8bc727c3a9428c78fd193197b3232cf1e0 (patch)
treef1f1a2f5a630987b67b41c4f6b94f17c58d52f48 /java
parenta93df43762f1539593da5f90bec16be2be01d281 (diff)
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
Diffstat (limited to 'java')
-rw-r--r--java/com/android/incallui/CallCardPresenter.java1
-rw-r--r--java/com/android/incallui/callpending/CallPendingActivity.java3
2 files changed, 3 insertions, 1 deletions
diff --git a/java/com/android/incallui/CallCardPresenter.java b/java/com/android/incallui/CallCardPresenter.java
index 9772cb1df..6614e7c74 100644
--- a/java/com/android/incallui/CallCardPresenter.java
+++ b/java/com/android/incallui/CallCardPresenter.java
@@ -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)
diff --git a/java/com/android/incallui/callpending/CallPendingActivity.java b/java/com/android/incallui/callpending/CallPendingActivity.java
index 3c69f97b5..a686308c2 100644
--- a/java/com/android/incallui/callpending/CallPendingActivity.java
+++ b/java/com/android/incallui/callpending/CallPendingActivity.java
@@ -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)