Fix quick contact icons accessibility issues
Bug: 5275688 accessibility: phone and messaging
icon both are read as 'image-number' in
quick-contact card/contact card.
Changed the behavior of ResolveCache.getDescription to get the description
of the action from the icon's app before using the text fields.
Change-Id: I13b32d37e8437686cb5a8953c4f3ea273304d432
diff --git a/src/com/android/contacts/quickcontact/ResolveCache.java b/src/com/android/contacts/quickcontact/ResolveCache.java
index 71c4d0a..08a6cf8 100644
--- a/src/com/android/contacts/quickcontact/ResolveCache.java
+++ b/src/com/android/contacts/quickcontact/ResolveCache.java
@@ -184,10 +184,10 @@
public CharSequence getDescription(Action action) {
final CharSequence actionSubtitle = action.getSubtitle();
final ResolveInfo info = getEntry(action).bestResolve;
- if (!TextUtils.isEmpty(actionSubtitle)) {
- return actionSubtitle;
- } else if (info != null) {
+ if (info != null) {
return info.loadLabel(mPackageManager);
+ } else if (!TextUtils.isEmpty(actionSubtitle)) {
+ return actionSubtitle;
} else {
return null;
}