From cb481aa46e012d1f9f147919b346fbfb16624dab Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Mon, 28 Apr 2014 18:43:40 -0700 Subject: Use circular support in ContactPhotoManager Bug: 13747208 Change-Id: I39932fc22ab13317430c13034c4c4c2725662999 --- src/com/android/dialer/CallDetailActivity.java | 4 ++-- src/com/android/dialer/calllog/CallLogAdapter.java | 10 ++++++---- src/com/android/dialer/list/PhoneFavoriteTileView.java | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index 470c0b668..decfe9bf1 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -745,9 +745,9 @@ public class CallDetailActivity extends Activity implements ProximitySensorAware private void loadContactPhotos(Uri photoUri, String displayName, String lookupKey, int contactType) { final DefaultImageRequest request = new DefaultImageRequest(displayName, lookupKey, - contactType); + contactType, false); mContactPhotoManager.loadPhoto(mContactBackgroundView, photoUri, - mContactBackgroundView.getWidth(), true, request); + mContactBackgroundView.getWidth(), true, false /* isCircular */, request); } static final class ViewEntry { diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index aee24baad..266be34ba 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -882,19 +882,21 @@ public class CallLogAdapter extends GroupingListAdapter private void setPhoto(CallLogListItemViews views, long photoId, Uri contactUri, String displayName, String identifier, int contactType) { views.quickContactView.assignContactUri(contactUri); + views.quickContactView.setOverlay(null); DefaultImageRequest request = new DefaultImageRequest(displayName, identifier, - contactType); + contactType, true /* isCircular */); mContactPhotoManager.loadThumbnail(views.quickContactView, photoId, false /* darkTheme */, - request); + true /* isCircular */, request); } private void setPhoto(CallLogListItemViews views, Uri photoUri, Uri contactUri, String displayName, String identifier, int contactType) { views.quickContactView.assignContactUri(contactUri); + views.quickContactView.setOverlay(null); DefaultImageRequest request = new DefaultImageRequest(displayName, identifier, - contactType); + contactType, true /* isCircular */); mContactPhotoManager.loadDirectoryPhoto(views.quickContactView, photoUri, - false /* darkTheme */, request); + false /* darkTheme */, true /* isCircular */, request); } diff --git a/src/com/android/dialer/list/PhoneFavoriteTileView.java b/src/com/android/dialer/list/PhoneFavoriteTileView.java index 3626bcb93..862952de4 100644 --- a/src/com/android/dialer/list/PhoneFavoriteTileView.java +++ b/src/com/android/dialer/list/PhoneFavoriteTileView.java @@ -131,7 +131,7 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { @Override protected DefaultImageRequest getDefaultImageRequest(String displayName, String lookupKey) { return new DefaultImageRequest(displayName, lookupKey, ContactPhotoManager.TYPE_DEFAULT, - DEFAULT_IMAGE_LETTER_SCALE, DEFAULT_IMAGE_LETTER_OFFSET); + DEFAULT_IMAGE_LETTER_SCALE, DEFAULT_IMAGE_LETTER_OFFSET, false); } @Override -- cgit v1.2.3