Set delete button description for editor view without type.
Current logic only sets content description for:
1) editor view with type.
2) editor view without type but has text changed on TextFieldEditorView.
This cl will fix the bug to set description for editor view without type.
BUG 29162515
BUG 29162517
Change-Id: Ieea82f8c0f288894c819cfd12800d59e57d002c6
diff --git a/src/com/android/contacts/editor/LabeledEditorView.java b/src/com/android/contacts/editor/LabeledEditorView.java
index 63d75d8..61c1061 100644
--- a/src/com/android/contacts/editor/LabeledEditorView.java
+++ b/src/com/android/contacts/editor/LabeledEditorView.java
@@ -300,8 +300,8 @@
mEntry.getAsString(mType.customColumn),
getContext().getString(mKind.titleRes)));
} else {
- mLabel.setSelection(mEditTypeAdapter.getPosition(mType));
if (mType != null) {
+ mLabel.setSelection(mEditTypeAdapter.getPosition(mType));
mDeleteContainer.setContentDescription(
getContext().getString(R.string.editor_delete_view_description,
getContext().getString(mType.labelRes),
@@ -408,10 +408,8 @@
mLabel.setEnabled(!readOnly && isEnabled());
mLabel.setContentDescription(getContext().getResources().getString(mKind.titleRes));
- if (hasTypes) {
- mType = RawContactModifier.getCurrentType(entry, kind);
- rebuildLabel();
- }
+ mType = RawContactModifier.getCurrentType(entry, kind);
+ rebuildLabel();
}
public ValuesDelta getValues() {