Merge "Show visible and non deleted editor view to Editor UI." into ub-contactsdialer-a-dev
diff --git a/src/com/android/contacts/editor/CompactRawContactsEditorView.java b/src/com/android/contacts/editor/CompactRawContactsEditorView.java
index eadebc8..0ccc2a7 100644
--- a/src/com/android/contacts/editor/CompactRawContactsEditorView.java
+++ b/src/com/android/contacts/editor/CompactRawContactsEditorView.java
@@ -464,7 +464,7 @@
public void updatePhoto(Uri photoUri) {
mPhotoValuesDelta.setFromTemplate(false);
// Unset primary for all photos
- unsetSuperPrimaryFromAllWritablePhotos();
+ unsetSuperPrimaryFromAllPhotos();
// Mark the currently displayed photo as primary
mPhotoValuesDelta.setSuperPrimary(true);
@@ -487,14 +487,12 @@
mPhotoView.setFullSizedPhoto(photoUri);
}
- private void unsetSuperPrimaryFromAllWritablePhotos() {
+ private void unsetSuperPrimaryFromAllPhotos() {
final List<KindSectionData> kindSectionDataList =
mKindSectionDataMap.get(Photo.CONTENT_ITEM_TYPE);
for (KindSectionData kindSectionData : kindSectionDataList) {
- if (kindSectionData.getAccountType().areContactsWritable()) {
- for (ValuesDelta valuesDelta : kindSectionData.getNonEmptyValuesDeltas()) {
- valuesDelta.setSuperPrimary(false);
- }
+ for (ValuesDelta valuesDelta : kindSectionData.getNonEmptyValuesDeltas()) {
+ valuesDelta.setSuperPrimary(false);
}
}
}
@@ -587,7 +585,7 @@
final ValuesDelta valuesDelta = valuesDeltaList.get(photo.valuesDeltaListIndex);
valuesDelta.setFromTemplate(false);
// Unset primary for all photos
- unsetSuperPrimaryFromAllWritablePhotos();
+ unsetSuperPrimaryFromAllPhotos();
// Mark the currently displayed photo as primary
valuesDelta.setSuperPrimary(true);
// Update the UI