Unset super primary of writable accounts photos
Bug: 25714956
Change-Id: I2d24f57732b069f08a4913db20702f98b853db12
diff --git a/src/com/android/contacts/editor/CompactRawContactsEditorView.java b/src/com/android/contacts/editor/CompactRawContactsEditorView.java
index b5f46f7..ab81780 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