diff options
author | emancebo <emancebo@cyngn.com> | 2015-04-08 10:15:16 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2015-04-08 23:51:24 +0000 |
commit | 8156e92c5f389be9f7febbbda4b394af01322ed9 (patch) | |
tree | 1f5fab90a75706d65bb0db489e0f40c331e6eed7 | |
parent | 4883cedb00ffd0066bffcf172c5a6cad077ca32e (diff) | |
download | packages_apps_Contacts-8156e92c5f389be9f7febbbda4b394af01322ed9.tar.gz packages_apps_Contacts-8156e92c5f389be9f7febbbda4b394af01322ed9.tar.bz2 packages_apps_Contacts-8156e92c5f389be9f7febbbda4b394af01322ed9.zip |
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
-rw-r--r-- | src/com/android/contacts/quickcontact/DataAction.java | 10 |
1 files changed, 0 insertions, 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); } |