Merge "Disable drag and drop if the undo dialog for a favorite is showing" into klp-dev
diff --git a/res/layout/phone_no_favorites.xml b/res/layout/phone_no_favorites.xml
index cc9b1ff..1a0079f 100644
--- a/res/layout/phone_no_favorites.xml
+++ b/res/layout/phone_no_favorites.xml
@@ -21,18 +21,6 @@
     android:orientation="vertical"
     android:minHeight="?android:attr/listPreferredItemHeight">
 
-    <ImageView
-        android:id="@+id/nofavorite_image"
-        android:layout_height="wrap_content"
-        android:layout_width="match_parent"
-        android:layout_gravity="center"
-        android:layout_alignParentTop="true"
-        android:layout_alignParentLeft="true"
-        android:layout_alignParentStart="true"
-        android:paddingTop="36dp"
-        android:paddingBottom="16dp"
-        android:src="@drawable/no_favorites_banner" />
-
     <include
         android:id="@+id/show_all_contact_button_in_nofav"
         layout="@layout/show_all_contact_button"
@@ -42,20 +30,34 @@
         android:layout_alignParentLeft="true"
         android:layout_alignParentStart="true"/>
 
-    <TextView
-        android:id="@+id/title"
+    <LinearLayout
+        android:id="@+id/nofavorite_frame"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
         android:layout_gravity="center"
         android:gravity="center"
-        android:layout_below="@id/nofavorite_image"
-        android:layout_above="@id/show_all_contact_button_in_nofav"
         android:layout_alignParentLeft="true"
         android:layout_alignParentStart="true"
-        android:text="@string/no_favorites"
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:textColor="@color/nofavorite_text_color"
-        android:layout_marginTop="8dp"
-        android:layout_marginBottom="8dp"/>
+        android:layout_alignParentTop="true"
+        android:layout_above="@id/show_all_contact_button_in_nofav">
+
+        <ImageView
+            android:id="@+id/nofavorite_image"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:gravity="center_horizontal"
+            android:src="@drawable/no_favorites_banner"
+            android:layout_marginBottom="14dp"/>
+
+        <TextView
+            android:id="@+id/title"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_horizontal"
+            android:text="@string/no_favorites"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:textColor="@color/nofavorite_text_color"/>
+    </LinearLayout>
 
 </RelativeLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a7387b9..98e5b43 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -457,7 +457,7 @@
     <string name="description_start_voice_search">Start voice search</string>
 
     <!-- The string used to represent an unknown location for a phone number in the call log [CHAR LIMIT=3] -->
-    <string name="call_log_empty_gecode">-</string>
+    <string name="call_log_empty_gecode">\u0020</string>
 
     <!-- Menu item used to call a contact, containing the number of the contact to call -->
     <string name="menu_callNumber">Call <xliff:g id="number">%s</xliff:g></string>
diff --git a/src/com/android/dialer/list/PhoneFavoriteFragment.java b/src/com/android/dialer/list/PhoneFavoriteFragment.java
index 828ca70..eca4d97 100644
--- a/src/com/android/dialer/list/PhoneFavoriteFragment.java
+++ b/src/com/android/dialer/list/PhoneFavoriteFragment.java
@@ -399,6 +399,9 @@
     public void onPause() {
         // If there are any pending contact entries that are to be removed, remove them
         mContactTileAdapter.removePendingContactEntry();
+        // Wipe the cache to refresh the call shortcut item. This is not that expensive because
+        // it only contains one item.
+        mCallLogAdapter.invalidateCache();
         super.onPause();
     }