summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChiao Cheng <chiaocheng@google.com>2013-10-02 11:35:58 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-02 11:35:58 -0700
commit9275583b7b5cf64a58a7148824b3524aa5a38614 (patch)
treecc9731ba7b536f156c8ce8e2cdbec50d9ce82e1d
parent08ec9a56596940328eb32093355f6ce7890e2ad0 (diff)
parent7603ff8f19b396c2214e2f28cbee64d26a78bd7a (diff)
am 95088c59: am 44f781da: am 935b78cc: Merge "Default to business avatar for businesses without an image." into klp-dev
* commit '95088c5942708f2c339608d80b0b620bc4d96a3a': Default to business avatar for businesses without an image.
-rw-r--r--InCallUI/res/drawable-hdpi/business_unknown.pngbin0 -> 1696 bytes
-rw-r--r--InCallUI/res/drawable-hdpi/picture_unknown.pngbin3503 -> 4910 bytes
-rw-r--r--InCallUI/res/drawable-mdpi/business_unknown.pngbin0 -> 1352 bytes
-rw-r--r--InCallUI/res/drawable-mdpi/picture_unknown.pngbin2378 -> 3249 bytes
-rw-r--r--InCallUI/res/drawable-xhdpi/business_unknown.pngbin0 -> 2450 bytes
-rw-r--r--InCallUI/res/drawable-xhdpi/picture_unknown.pngbin4829 -> 6931 bytes
-rw-r--r--InCallUI/res/drawable-xxhdpi/business_unknown.pngbin0 -> 3075 bytes
-rw-r--r--InCallUI/res/drawable-xxhdpi/picture_unknown.pngbin22053 -> 8707 bytes
-rw-r--r--InCallUI/src/com/android/incallui/ContactInfoCache.java6
-rw-r--r--InCallUI/src/com/android/incallui/service/PhoneNumberService.java1
10 files changed, 7 insertions, 0 deletions
diff --git a/InCallUI/res/drawable-hdpi/business_unknown.png b/InCallUI/res/drawable-hdpi/business_unknown.png
new file mode 100644
index 000000000..b369939ec
--- /dev/null
+++ b/InCallUI/res/drawable-hdpi/business_unknown.png
Binary files differ
diff --git a/InCallUI/res/drawable-hdpi/picture_unknown.png b/InCallUI/res/drawable-hdpi/picture_unknown.png
index ba46da151..26d2be16f 100644
--- a/InCallUI/res/drawable-hdpi/picture_unknown.png
+++ b/InCallUI/res/drawable-hdpi/picture_unknown.png
Binary files differ
diff --git a/InCallUI/res/drawable-mdpi/business_unknown.png b/InCallUI/res/drawable-mdpi/business_unknown.png
new file mode 100644
index 000000000..eac97a9b7
--- /dev/null
+++ b/InCallUI/res/drawable-mdpi/business_unknown.png
Binary files differ
diff --git a/InCallUI/res/drawable-mdpi/picture_unknown.png b/InCallUI/res/drawable-mdpi/picture_unknown.png
index 995df75b3..1ee333caa 100644
--- a/InCallUI/res/drawable-mdpi/picture_unknown.png
+++ b/InCallUI/res/drawable-mdpi/picture_unknown.png
Binary files differ
diff --git a/InCallUI/res/drawable-xhdpi/business_unknown.png b/InCallUI/res/drawable-xhdpi/business_unknown.png
new file mode 100644
index 000000000..aa84456e4
--- /dev/null
+++ b/InCallUI/res/drawable-xhdpi/business_unknown.png
Binary files differ
diff --git a/InCallUI/res/drawable-xhdpi/picture_unknown.png b/InCallUI/res/drawable-xhdpi/picture_unknown.png
index b4bd3666a..db74fd962 100644
--- a/InCallUI/res/drawable-xhdpi/picture_unknown.png
+++ b/InCallUI/res/drawable-xhdpi/picture_unknown.png
Binary files differ
diff --git a/InCallUI/res/drawable-xxhdpi/business_unknown.png b/InCallUI/res/drawable-xxhdpi/business_unknown.png
new file mode 100644
index 000000000..6273bb324
--- /dev/null
+++ b/InCallUI/res/drawable-xxhdpi/business_unknown.png
Binary files differ
diff --git a/InCallUI/res/drawable-xxhdpi/picture_unknown.png b/InCallUI/res/drawable-xxhdpi/picture_unknown.png
index 41275930d..38bec2cff 100644
--- a/InCallUI/res/drawable-xxhdpi/picture_unknown.png
+++ b/InCallUI/res/drawable-xxhdpi/picture_unknown.png
Binary files differ
diff --git a/InCallUI/src/com/android/incallui/ContactInfoCache.java b/InCallUI/src/com/android/incallui/ContactInfoCache.java
index 13f8dd00d..4b482cb4c 100644
--- a/InCallUI/src/com/android/incallui/ContactInfoCache.java
+++ b/InCallUI/src/com/android/incallui/ContactInfoCache.java
@@ -234,6 +234,12 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete
entry.location = oldEntry.location;
}
+ // If no image and it's a business, switch to using the default business avatar.
+ if (info.getImageUrl() == null && info.isBusiness()) {
+ Log.d(TAG, "Business has no image. Using default.");
+ entry.photo = mContext.getResources().getDrawable(R.drawable.business_unknown);
+ }
+
// Add the contact info to the cache.
mInfoMap.put(mCallId, entry);
sendInfoNotifications(mCallId, entry);
diff --git a/InCallUI/src/com/android/incallui/service/PhoneNumberService.java b/InCallUI/src/com/android/incallui/service/PhoneNumberService.java
index 942bf422f..24303cdfd 100644
--- a/InCallUI/src/com/android/incallui/service/PhoneNumberService.java
+++ b/InCallUI/src/com/android/incallui/service/PhoneNumberService.java
@@ -67,5 +67,6 @@ public interface PhoneNumberService {
public String getPhoneLabel();
public String getNormalizedNumber();
public String getImageUrl();
+ public boolean isBusiness();
}
}