Merge "Revert "Don\'t use file ID of the removed photo"" into nyc-dev
am: 0488c3d
* commit '0488c3d83099c4d82f5ddc41c045bc7b7833de29':
Revert "Don't use file ID of the removed photo"
Change-Id: Ifbdb9af436ddde7fb70fc6d718338ef27d558efd
diff --git a/src/com/android/contacts/editor/EditorUiUtils.java b/src/com/android/contacts/editor/EditorUiUtils.java
index b87d4f4..a513be5 100644
--- a/src/com/android/contacts/editor/EditorUiUtils.java
+++ b/src/com/android/contacts/editor/EditorUiUtils.java
@@ -240,9 +240,7 @@
/** Returns the {@link Photo#PHOTO_FILE_ID} from the given ValuesDelta. */
public static Long getPhotoFileId(ValuesDelta valuesDelta) {
if (valuesDelta == null) return null;
- // 1. There's no "after", we want to obtain the value of Photo.PHOTO_FILE_ID from "before".
- // 2. There's a "after", we want to obtain the value of Photo.PHOTO_FILE_ID from "after".
- if (valuesDelta.getAfter().size() == 0 || valuesDelta.getAfter().get(Photo.PHOTO) != null) {
+ if (valuesDelta.getAfter() == null || valuesDelta.getAfter().get(Photo.PHOTO) == null) {
return valuesDelta.getAsLong(Photo.PHOTO_FILE_ID);
}
return null;