Loading res/values/strings.xml +13 −0 Original line number Original line Diff line number Diff line Loading @@ -702,6 +702,19 @@ <!-- Content description for directions secondary button [CHAR LIMIT=NONE] --> <!-- Content description for directions secondary button [CHAR LIMIT=NONE] --> <string name="content_description_directions">directions to location</string> <string name="content_description_directions">directions to location</string> <!-- Content description for recent sms interaction [CHAR LIMIT=NONE] --> <string name="content_description_recent_sms">recent sms. <xliff:g id="message_details">%s</xliff:g>. click to respond</string> <!-- Header for the Relation entry [CHAR LIMIT=NONE] --> <string name="content_description_recent_call_type_incoming">incoming</string> <!-- Header for the Relation entry [CHAR LIMIT=NONE] --> <string name="content_description_recent_call_type_outgoing">outgoing</string> <!-- Header for the Relation entry [CHAR LIMIT=NONE] --> <string name="content_description_recent_call_type_missed">missed</string> <!-- Content description for recent sms interaction [CHAR LIMIT=NONE] --> <string name="content_description_recent_call">recent call. <xliff:g id="call_details">%s</xliff:g>. click to call back</string> <!-- Prefix for messages that you sent [CHAR LIMIT=40] --> <!-- Prefix for messages that you sent [CHAR LIMIT=40] --> <string name="message_from_you_prefix">You: <xliff:g id="sms_body">%s</xliff:g></string> <string name="message_from_you_prefix">You: <xliff:g id="sms_body">%s</xliff:g></string> Loading src/com/android/contacts/interactions/CalendarInteraction.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -276,4 +276,10 @@ public class CalendarInteraction implements ContactInteraction { public String getUid2445() { public String getUid2445() { return mValues.getAsString(Attendees.UID_2445); return mValues.getAsString(Attendees.UID_2445); } } @Override public String getContentDescription(Context context) { // The default TalkBack is good return null; } } } src/com/android/contacts/interactions/CallLogInteraction.java +29 −0 Original line number Original line Diff line number Diff line Loading @@ -173,4 +173,33 @@ public class CallLogInteraction implements ContactInteraction { public Integer getType() { public Integer getType() { return mValues.getAsInteger(Calls.TYPE); return mValues.getAsInteger(Calls.TYPE); } } @Override public String getContentDescription(Context context) { String callDetails = getCallTypeString(context) + ". " + getViewFooter(context) + ". " + getViewHeader(context) + ". " + getViewFooter(context); return context.getResources().getString(R.string.content_description_recent_call, callDetails); } private String getCallTypeString(Context context) { String callType = ""; Resources res = context.getResources(); Integer type = getType(); if (type == null) { return callType; } switch (type) { case Calls.INCOMING_TYPE: callType = res.getString(R.string.content_description_recent_call_type_incoming); break; case Calls.MISSED_TYPE: callType = res.getString(R.string.content_description_recent_call_type_missed); break; case Calls.OUTGOING_TYPE: callType = res.getString(R.string.content_description_recent_call_type_outgoing); break; } return callType; } } } No newline at end of file src/com/android/contacts/interactions/ContactInteraction.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -32,4 +32,5 @@ public interface ContactInteraction { Drawable getIcon(Context context); Drawable getIcon(Context context); Drawable getBodyIcon(Context context); Drawable getBodyIcon(Context context); Drawable getFooterIcon(Context context); Drawable getFooterIcon(Context context); String getContentDescription(Context context); } } src/com/android/contacts/interactions/SmsInteraction.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -152,4 +152,12 @@ public class SmsInteraction implements ContactInteraction { public Integer getType() { public Integer getType() { return mValues.getAsInteger(Sms.TYPE); return mValues.getAsInteger(Sms.TYPE); } } @Override public String getContentDescription(Context context) { String messageDetails = getViewHeader(context) + ". " + getViewBody(context) + ". " + getViewFooter(context); return context.getResources().getString(R.string.content_description_recent_sms, messageDetails); } } } Loading
res/values/strings.xml +13 −0 Original line number Original line Diff line number Diff line Loading @@ -702,6 +702,19 @@ <!-- Content description for directions secondary button [CHAR LIMIT=NONE] --> <!-- Content description for directions secondary button [CHAR LIMIT=NONE] --> <string name="content_description_directions">directions to location</string> <string name="content_description_directions">directions to location</string> <!-- Content description for recent sms interaction [CHAR LIMIT=NONE] --> <string name="content_description_recent_sms">recent sms. <xliff:g id="message_details">%s</xliff:g>. click to respond</string> <!-- Header for the Relation entry [CHAR LIMIT=NONE] --> <string name="content_description_recent_call_type_incoming">incoming</string> <!-- Header for the Relation entry [CHAR LIMIT=NONE] --> <string name="content_description_recent_call_type_outgoing">outgoing</string> <!-- Header for the Relation entry [CHAR LIMIT=NONE] --> <string name="content_description_recent_call_type_missed">missed</string> <!-- Content description for recent sms interaction [CHAR LIMIT=NONE] --> <string name="content_description_recent_call">recent call. <xliff:g id="call_details">%s</xliff:g>. click to call back</string> <!-- Prefix for messages that you sent [CHAR LIMIT=40] --> <!-- Prefix for messages that you sent [CHAR LIMIT=40] --> <string name="message_from_you_prefix">You: <xliff:g id="sms_body">%s</xliff:g></string> <string name="message_from_you_prefix">You: <xliff:g id="sms_body">%s</xliff:g></string> Loading
src/com/android/contacts/interactions/CalendarInteraction.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -276,4 +276,10 @@ public class CalendarInteraction implements ContactInteraction { public String getUid2445() { public String getUid2445() { return mValues.getAsString(Attendees.UID_2445); return mValues.getAsString(Attendees.UID_2445); } } @Override public String getContentDescription(Context context) { // The default TalkBack is good return null; } } }
src/com/android/contacts/interactions/CallLogInteraction.java +29 −0 Original line number Original line Diff line number Diff line Loading @@ -173,4 +173,33 @@ public class CallLogInteraction implements ContactInteraction { public Integer getType() { public Integer getType() { return mValues.getAsInteger(Calls.TYPE); return mValues.getAsInteger(Calls.TYPE); } } @Override public String getContentDescription(Context context) { String callDetails = getCallTypeString(context) + ". " + getViewFooter(context) + ". " + getViewHeader(context) + ". " + getViewFooter(context); return context.getResources().getString(R.string.content_description_recent_call, callDetails); } private String getCallTypeString(Context context) { String callType = ""; Resources res = context.getResources(); Integer type = getType(); if (type == null) { return callType; } switch (type) { case Calls.INCOMING_TYPE: callType = res.getString(R.string.content_description_recent_call_type_incoming); break; case Calls.MISSED_TYPE: callType = res.getString(R.string.content_description_recent_call_type_missed); break; case Calls.OUTGOING_TYPE: callType = res.getString(R.string.content_description_recent_call_type_outgoing); break; } return callType; } } } No newline at end of file
src/com/android/contacts/interactions/ContactInteraction.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -32,4 +32,5 @@ public interface ContactInteraction { Drawable getIcon(Context context); Drawable getIcon(Context context); Drawable getBodyIcon(Context context); Drawable getBodyIcon(Context context); Drawable getFooterIcon(Context context); Drawable getFooterIcon(Context context); String getContentDescription(Context context); } }
src/com/android/contacts/interactions/SmsInteraction.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -152,4 +152,12 @@ public class SmsInteraction implements ContactInteraction { public Integer getType() { public Integer getType() { return mValues.getAsInteger(Sms.TYPE); return mValues.getAsInteger(Sms.TYPE); } } @Override public String getContentDescription(Context context) { String messageDetails = getViewHeader(context) + ". " + getViewBody(context) + ". " + getViewFooter(context); return context.getResources().getString(R.string.content_description_recent_sms, messageDetails); } } }