Adding speakable description for checkbox
Bug:27299806
Change-Id: Ic7eed4711648b23ffba4a2f6915dab320ef3fe5c
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index 8ebbb25..30a65d1 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -594,6 +594,10 @@
new int[] { -android.R.attr.state_checked }
};
final int[] colors = new int[] { mColorFilterColor, mColorFilterColor };
+ if (suggestion != null && suggestion.name != null) {
+ checkbox.setContentDescription(suggestion.name + " " +
+ getResources().getString(R.string.contact_from_account_name, accountName));
+ }
checkbox.setButtonTintList(new ColorStateList(stateSet, colors));
checkbox.setChecked(mSuggestionsShouldAutoSelected ||
mSelectedAggregationIds.contains(suggestion.contactId));