diff options
author | Yorke Lee <yorkelee@google.com> | 2013-12-05 20:38:14 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-12-05 20:38:15 +0000 |
commit | 8f77316183e2009e4d9d100abc5733f1a536e68a (patch) | |
tree | f03503c967b8db75837f9840c6d72416dcb09cc8 | |
parent | 1d66af17ae04e2c17746d7c402888ce98cda4b12 (diff) | |
parent | 670fd3f59160bdb81f38b6be2f176ba233915686 (diff) |
Merge "Temporarily stop UI refresh during drag and drop"
-rw-r--r-- | src/com/android/dialer/list/PhoneFavoritesTileAdapter.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java index 368075368..a85fc6a60 100644 --- a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java +++ b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java @@ -87,6 +87,7 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements private long mIdToKeepInPlace = -1; private boolean mAwaitingRemove = false; + private boolean mDelayCursorUpdates = false; private ContactPhotoManager mPhotoManager; protected int mNumFrequents; @@ -177,6 +178,7 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements * @param inDragging Boolean variable indicating whether there is a drag in process. */ public void setInDragging(boolean inDragging) { + mDelayCursorUpdates = inDragging; mInDragging = inDragging; } @@ -223,7 +225,7 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements * 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(); |