From 8156e92c5f389be9f7febbbda4b394af01322ed9 Mon Sep 17 00:00:00 2001 From: emancebo Date: Wed, 8 Apr 2015 10:15:16 -0700 Subject: Always use contacts sms icon for quick contact card There is logic in the quick contact card that attempts to fetch a drawable named ic_text_holo_light from the package that is the source for the contact information being displayed. This will never work correctly because we are taking the ID for that resource as defined in contacts app and searching for it in another package (which will have different id mappings). In the worst case scenario, the package will have a completely unrelated drawable that maps to the same ID, and we will attempt to display it as the sms icon. To get around this, always use the sms icon defined in contacts Change-Id: I4ab61ed73a769d618a75071a175f142b4d248486 --- src/com/android/contacts/quickcontact/DataAction.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/com/android/contacts/quickcontact/DataAction.java b/src/com/android/contacts/quickcontact/DataAction.java index e1b78f87b..43bf5e424 100644 --- a/src/com/android/contacts/quickcontact/DataAction.java +++ b/src/com/android/contacts/quickcontact/DataAction.java @@ -291,16 +291,6 @@ public class DataAction implements Action { @Override public Drawable getAlternateIcon() { if (mAlternateIconRes == 0) return null; - - final String resourcePackageName = mKind.resourcePackageName; - if (resourcePackageName != null) { - final PackageManager pm = mContext.getPackageManager(); - Drawable dw = pm.getDrawable(resourcePackageName, mAlternateIconRes, null); - if (dw != null) { - return dw; - } - } - return mContext.getResources().getDrawable(mAlternateIconRes); } -- cgit v1.2.3