Merge "Using Proguard to shrink apk size." into nyc-dev
diff --git a/src/com/android/contacts/editor/EditorUiUtils.java b/src/com/android/contacts/editor/EditorUiUtils.java
index dd3067b..cedc443 100644
--- a/src/com/android/contacts/editor/EditorUiUtils.java
+++ b/src/com/android/contacts/editor/EditorUiUtils.java
@@ -246,9 +246,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;
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index 4d6aa41..5469c2e 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -2719,7 +2719,8 @@
 
                         // Send a toast to give feedback to the user that a shortcut to this
                         // contact was added to the launcher.
-                        final String displayName = mContactData.getDisplayName();
+                        final String displayName = shortcutIntent
+                                .getStringExtra(Intent.EXTRA_SHORTCUT_NAME);
                         final String toastMessage = TextUtils.isEmpty(displayName)
                                 ? getString(R.string.createContactShortcutSuccessful_NoName)
                                 : getString(R.string.createContactShortcutSuccessful, displayName);