Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b5079dc authored by Wenyi Wang's avatar Wenyi Wang Committed by android-build-merger
Browse files

Allow G+ profile photo to be saved as ME profile.

am: b8ab8612

* commit 'b8ab8612':
  Allow G+ profile photo to be saved as ME profile.
parents 5501015e b8ab8612
Loading
Loading
Loading
Loading
+8 −16
Original line number Diff line number Diff line
@@ -465,14 +465,10 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O

    public void updatePhoto(Uri photoUri) {
        mPhotoValuesDelta.setFromTemplate(false);

        if (!mIsUserProfile) {
        // Unset primary for all photos
        unsetSuperPrimary();

        // Mark the currently displayed photo as primary
        mPhotoValuesDelta.setSuperPrimary(true);
        }

        // Even though high-res photos cannot be saved by passing them via
        // an EntityDeltaList (since they cause the Bundle size limit to be
@@ -587,14 +583,10 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O
        }
        final ValuesDelta valuesDelta = valuesDeltaList.get(photo.valuesDeltaListIndex);
        valuesDelta.setFromTemplate(false);

        if (!mIsUserProfile) {
            // Unset primary for all other photos
        // Unset primary for all photos
        unsetSuperPrimary();

        // Mark the currently displayed photo as primary
        valuesDelta.setSuperPrimary(true);
        }

        // Update the UI
        mPhotoView.setPhoto(valuesDelta, mMaterialPalette);
    }