diff options
author | Jay Shrauner <shrauner@google.com> | 2014-12-01 19:45:57 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-01 19:45:57 +0000 |
commit | eaf7d3bdf1d7b94f3181dfe72ac701d7887c17ad (patch) | |
tree | bc6b8de860aab7ae79fb4c6dcac3a1ba4e27f8d4 | |
parent | 9f2ea5adc40aa57c6bb4345e9facb200e6acfad1 (diff) | |
parent | 4ad916ec4a34d18ab6ad35f1fbfb7a73de30ba24 (diff) |
am 4ad916ec: am ce5effba: Merge "Fix NPE in markDropArea" into lmp-mr1-dev
* commit '4ad916ec4a34d18ab6ad35f1fbfb7a73de30ba24':
Fix NPE in markDropArea
-rw-r--r-- | src/com/android/dialer/list/PhoneFavoritesTileAdapter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java index 382e42e56..3f670127f 100644 --- a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java +++ b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java @@ -441,7 +441,8 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements * @param itemIndex Position of the contact in {@link #mContactEntries}. */ private void markDropArea(int itemIndex) { - if (isIndexInBound(mDragEnteredEntryIndex) && isIndexInBound(itemIndex)) { + if (mDraggedEntry != null && isIndexInBound(mDragEnteredEntryIndex) && + isIndexInBound(itemIndex)) { mDataSetChangedListener.cacheOffsetsForDatasetChange(); // Remove the old placeholder item and place the new placeholder item. final int oldIndex = mDragEnteredEntryIndex; |