Loading src/com/android/contacts/editor/CompactContactEditorFragment.java +19 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,25 @@ public class CompactContactEditorFragment extends ContactEditorBaseFragment impl } else { photo.primary = false; } updateContentDescription(photo); } } private void updateContentDescription(CompactPhotoSelectionFragment.Photo photo) { if (!TextUtils.isEmpty(photo.accountType)) { photo.contentDescription = getResources().getString(photo.primary ? R.string.photo_view_description_checked : R.string.photo_view_description_not_checked, photo.accountType, photo.accountName); photo.contentDescriptionChecked = getResources().getString( R.string.photo_view_description_checked, photo.accountType, photo.accountName); } else { photo.contentDescription = getResources().getString(photo.primary ? R.string.photo_view_description_checked_no_info : R.string.photo_view_description_not_checked_no_info); photo.contentDescriptionChecked = getResources().getString( R.string.photo_view_description_checked_no_info); } } Loading src/com/android/contacts/editor/CompactPhotoSelectionFragment.java +2 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,8 @@ public class CompactPhotoSelectionFragment extends Fragment { public String contentDescription; public String contentDescriptionChecked; // Talkback announcement when the photo is checked public String accountType; public String accountName; public ValuesDelta valuesDelta; Loading src/com/android/contacts/editor/CompactRawContactsEditorView.java +4 −21 Original line number Diff line number Diff line Loading @@ -554,27 +554,10 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O kindSectionData.getRawContactDelta().getRawContactId())); } // set content descriptions of the photo final CharSequence accountTypeText = accountType.getDisplayLabel(getContext()); if (accountTypeText != null) { final String accountNameText = kindSectionData.getRawContactDelta().getAccountName(); photo.contentDescription = getResources().getString(photo.primary ? R.string.photo_view_description_checked : R.string.photo_view_description_not_checked, accountTypeText, accountNameText == null ? "" : accountNameText); photo.contentDescriptionChecked = getResources().getString( R.string.photo_view_description_checked, accountTypeText, accountNameText == null ? "" : accountNameText); } else { photo.contentDescription = getResources().getString(photo.primary ? R.string.photo_view_description_checked_no_info : R.string.photo_view_description_not_checked_no_info); photo.contentDescriptionChecked = getResources().getString( R.string.photo_view_description_checked_no_info); } final CharSequence accountTypeLabel = accountType.getDisplayLabel(getContext()); photo.accountType = accountTypeLabel == null ? "" : accountTypeLabel.toString(); final String accountName = kindSectionData.getRawContactDelta().getAccountName(); photo.accountName = accountName == null ? "" : accountName; photos.add(photo); } Loading Loading
src/com/android/contacts/editor/CompactContactEditorFragment.java +19 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,25 @@ public class CompactContactEditorFragment extends ContactEditorBaseFragment impl } else { photo.primary = false; } updateContentDescription(photo); } } private void updateContentDescription(CompactPhotoSelectionFragment.Photo photo) { if (!TextUtils.isEmpty(photo.accountType)) { photo.contentDescription = getResources().getString(photo.primary ? R.string.photo_view_description_checked : R.string.photo_view_description_not_checked, photo.accountType, photo.accountName); photo.contentDescriptionChecked = getResources().getString( R.string.photo_view_description_checked, photo.accountType, photo.accountName); } else { photo.contentDescription = getResources().getString(photo.primary ? R.string.photo_view_description_checked_no_info : R.string.photo_view_description_not_checked_no_info); photo.contentDescriptionChecked = getResources().getString( R.string.photo_view_description_checked_no_info); } } Loading
src/com/android/contacts/editor/CompactPhotoSelectionFragment.java +2 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,8 @@ public class CompactPhotoSelectionFragment extends Fragment { public String contentDescription; public String contentDescriptionChecked; // Talkback announcement when the photo is checked public String accountType; public String accountName; public ValuesDelta valuesDelta; Loading
src/com/android/contacts/editor/CompactRawContactsEditorView.java +4 −21 Original line number Diff line number Diff line Loading @@ -554,27 +554,10 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O kindSectionData.getRawContactDelta().getRawContactId())); } // set content descriptions of the photo final CharSequence accountTypeText = accountType.getDisplayLabel(getContext()); if (accountTypeText != null) { final String accountNameText = kindSectionData.getRawContactDelta().getAccountName(); photo.contentDescription = getResources().getString(photo.primary ? R.string.photo_view_description_checked : R.string.photo_view_description_not_checked, accountTypeText, accountNameText == null ? "" : accountNameText); photo.contentDescriptionChecked = getResources().getString( R.string.photo_view_description_checked, accountTypeText, accountNameText == null ? "" : accountNameText); } else { photo.contentDescription = getResources().getString(photo.primary ? R.string.photo_view_description_checked_no_info : R.string.photo_view_description_not_checked_no_info); photo.contentDescriptionChecked = getResources().getString( R.string.photo_view_description_checked_no_info); } final CharSequence accountTypeLabel = accountType.getDisplayLabel(getContext()); photo.accountType = accountTypeLabel == null ? "" : accountTypeLabel.toString(); final String accountName = kindSectionData.getRawContactDelta().getAccountName(); photo.accountName = accountName == null ? "" : accountName; photos.add(photo); } Loading