Merge "Fix crash when number is null" into klp-dev
diff --git a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java
index e28fd73..cd4fb00 100644
--- a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java
+++ b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java
@@ -88,6 +88,7 @@
     private long mIdToKeepInPlace = -1;
 
     private boolean mAwaitingRemove = false;
+    private boolean mDelayCursorUpdates = false;
 
     private ContactPhotoManager mPhotoManager;
     protected int mNumFrequents;
@@ -178,6 +179,7 @@
      * @param inDragging Boolean variable indicating whether there is a drag in process.
      */
     public void setInDragging(boolean inDragging) {
+        mDelayCursorUpdates = inDragging;
         mInDragging = inDragging;
     }
 
@@ -224,7 +226,7 @@
      * Else use {@link ContactTileLoaderFactory}
      */
     public void setContactCursor(Cursor cursor) {
-        if (cursor != null && !cursor.isClosed()) {
+        if (!mDelayCursorUpdates && cursor != null && !cursor.isClosed()) {
             mNumStarred = getNumStarredContacts(cursor);
             if (mAwaitingRemove) {
                 mDataSetChangedListener.cacheOffsetsForDatasetChange();