From 820e397a859c9696686d37c6957cb14825c0e012 Mon Sep 17 00:00:00 2001 From: Walter Jang Date: Wed, 4 May 2016 17:43:56 -0700 Subject: Rename message xml drawable so it's found on ldpi (2/2) The ic_message_24dp.xml drawable is not found on ldpi devices. The difference between ic_message_24dp and other xml drawables which name a png src in a bitmap element (in order to also set the autoMirrored attribute) is that in other instances (e.g. ic_search_video_call.xml and ic_person_add_tinted_24dp.xml) the png that is referenced has a different name from the xml drawable (ic_videocam.png and ic_person_add_24dp for the previous two examples) Bug 27047302 Change-Id: I32843ca750aed57cc7c2586fa18cb02fe26192ef --- res/drawable/ic_message_24dp.xml | 19 ------------------- res/drawable/ic_message_24dp_mirrored.xml | 19 +++++++++++++++++++ .../contacts/common/list/ShortcutIntentBuilder.java | 2 +- .../common/model/account/BaseAccountType.java | 4 ++-- 4 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 res/drawable/ic_message_24dp.xml create mode 100644 res/drawable/ic_message_24dp_mirrored.xml diff --git a/res/drawable/ic_message_24dp.xml b/res/drawable/ic_message_24dp.xml deleted file mode 100644 index b1bd7439..00000000 --- a/res/drawable/ic_message_24dp.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/res/drawable/ic_message_24dp_mirrored.xml b/res/drawable/ic_message_24dp_mirrored.xml new file mode 100644 index 00000000..b1bd7439 --- /dev/null +++ b/res/drawable/ic_message_24dp_mirrored.xml @@ -0,0 +1,19 @@ + + + diff --git a/src/com/android/contacts/common/list/ShortcutIntentBuilder.java b/src/com/android/contacts/common/list/ShortcutIntentBuilder.java index ea01caa9..f30a1766 100644 --- a/src/com/android/contacts/common/list/ShortcutIntentBuilder.java +++ b/src/com/android/contacts/common/list/ShortcutIntentBuilder.java @@ -316,7 +316,7 @@ public class ShortcutIntentBuilder { } else { phoneUri = Uri.fromParts(ContactsUtils.SCHEME_SMSTO, phoneNumber, null); bitmap = generatePhoneNumberIcon(drawable, phoneType, phoneLabel, - R.drawable.ic_message_24dp); + R.drawable.ic_message_24dp_mirrored); } Intent shortcutIntent = new Intent(shortcutAction, phoneUri); diff --git a/src/com/android/contacts/common/model/account/BaseAccountType.java b/src/com/android/contacts/common/model/account/BaseAccountType.java index 214ba773..6481c063 100644 --- a/src/com/android/contacts/common/model/account/BaseAccountType.java +++ b/src/com/android/contacts/common/model/account/BaseAccountType.java @@ -256,7 +256,7 @@ public abstract class BaseAccountType extends AccountType { protected DataKind addDataKindPhone(Context context) throws DefinitionException { DataKind kind = addKind(new DataKind(Phone.CONTENT_ITEM_TYPE, R.string.phoneLabelsGroup, Weight.PHONE, true)); - kind.iconAltRes = R.drawable.ic_message_24dp; + kind.iconAltRes = R.drawable.ic_message_24dp_mirrored; kind.iconAltDescriptionRes = R.string.sms; kind.actionHeader = new PhoneActionInflater(); kind.actionAltHeader = new PhoneActionAltInflater(); @@ -1045,7 +1045,7 @@ public abstract class BaseAccountType extends AccountType { Phone.CONTENT_ITEM_TYPE, Phone.TYPE, R.string.phoneLabelsGroup, Weight.PHONE, new PhoneActionInflater(), new SimpleInflater(Phone.NUMBER)); - kind.iconAltRes = R.drawable.ic_message_24dp; + kind.iconAltRes = R.drawable.ic_message_24dp_mirrored; kind.iconAltDescriptionRes = R.string.sms; kind.actionAltHeader = new PhoneActionAltInflater(); -- cgit v1.2.3