summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorJay Shrauner <shrauner@google.com>2013-09-14 12:24:04 -0700
committerJay Shrauner <shrauner@google.com>2013-09-14 13:29:27 -0700
commit03c572f066ec9ef28d6fbc7bdd56cab89626ac1c (patch)
tree3ded0fa66ae598235a40d2c8e97418136600948b /InCallUI
parentb5346c68a29e128fed4d1e72b3501599ee9663bb (diff)
Pass number to fetchImage as cache key
Pass phone number in on fetchImage lookups so it can be used to save the image to the cache. Bug:10760102 Change-Id: I3afb5e99aa4e8a4bc9148f6cfda4e5eba48ec476
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/ContactInfoCache.java3
-rw-r--r--InCallUI/src/com/android/incallui/service/PhoneNumberService.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/InCallUI/src/com/android/incallui/ContactInfoCache.java b/InCallUI/src/com/android/incallui/ContactInfoCache.java
index 9ad7c5415..bc5d7c9a1 100644
--- a/InCallUI/src/com/android/incallui/ContactInfoCache.java
+++ b/InCallUI/src/com/android/incallui/ContactInfoCache.java
@@ -239,7 +239,8 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete
// If there's an associated image, fetch that
if (info.getImageUrl() != null) {
Log.d(TAG, "Contact lookup. Remote contact found, loading image.");
- mPhoneNumberService.fetchImage(info.getImageUrl(), this);
+ mPhoneNumberService.fetchImage(info.getNormalizedNumber(),
+ info.getImageUrl(), this);
} else {
// Otherwise, we're done, so clear callbacks
Log.d(TAG, "Contact lookup. Remote contact found, no image.");
diff --git a/InCallUI/src/com/android/incallui/service/PhoneNumberService.java b/InCallUI/src/com/android/incallui/service/PhoneNumberService.java
index 279593da2..942bf422f 100644
--- a/InCallUI/src/com/android/incallui/service/PhoneNumberService.java
+++ b/InCallUI/src/com/android/incallui/service/PhoneNumberService.java
@@ -34,10 +34,11 @@ public interface PhoneNumberService {
/**
* Get an image asynchronously.
*
+ * @param number The phone number for the image.
* @param url The url to fetch the image from.
* @param listener The listener to notify when the image lookup is complete.
*/
- public void fetchImage(String url, ImageLookupListener listener);
+ public void fetchImage(String number, String url, ImageLookupListener listener);
public interface NumberLookupListener {