summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-10-25 17:23:00 -0700
committerYorke Lee <yorkelee@google.com>2014-10-25 17:23:00 -0700
commit141bdce758369c6134cb4f2982a4219eafe2d3c7 (patch)
treec4cc7c8124959a5d605f601b7abcac7e23997fca /src
parent152266fb7ae309942e9a67419f104a29f491c0b8 (diff)
Send desired size of photo to ContactPhotoManager
This allows it to correctly determine if the photo should be treated as a thumbnail (and thus cropped into a circle), and also saves on RAM since the full sized bitmap doesn't need to be decoded. Bug: 17327890 Change-Id: Ia92cfd9005ea2060608284e3c1f6a539bdd6da72
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/calllog/CallLogAdapter.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index bd20d2209..c99633963 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -267,6 +267,7 @@ public class CallLogAdapter extends GroupingListAdapter
private int mCallLogBackgroundColor;
private int mExpandedBackgroundColor;
private float mExpandedTranslationZ;
+ private int mPhotoSize;
/** Listener for the primary or secondary actions in the list.
* Primary opens the call details.
@@ -365,6 +366,7 @@ public class CallLogAdapter extends GroupingListAdapter
mCallLogBackgroundColor = resources.getColor(R.color.background_dialer_list_items);
mExpandedBackgroundColor = resources.getColor(R.color.call_log_expanded_background_color);
mExpandedTranslationZ = resources.getDimension(R.dimen.call_log_expanded_translation_z);
+ mPhotoSize = resources.getDimensionPixelSize(R.dimen.contact_photo_size);
mContactPhotoManager = ContactPhotoManager.getInstance(mContext);
mPhoneNumberHelper = new PhoneNumberDisplayHelper(mContext, resources);
@@ -1234,7 +1236,7 @@ public class CallLogAdapter extends GroupingListAdapter
views.quickContactView.setOverlay(null);
DefaultImageRequest request = new DefaultImageRequest(displayName, identifier,
contactType, true /* isCircular */);
- mContactPhotoManager.loadDirectoryPhoto(views.quickContactView, photoUri,
+ mContactPhotoManager.loadPhoto(views.quickContactView, photoUri, mPhotoSize,
false /* darkTheme */, true /* isCircular */, request);
}