summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Shrauner <shrauner@google.com>2014-12-01 19:45:57 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-01 19:45:57 +0000
commiteaf7d3bdf1d7b94f3181dfe72ac701d7887c17ad (patch)
treebc6b8de860aab7ae79fb4c6dcac3a1ba4e27f8d4
parent9f2ea5adc40aa57c6bb4345e9facb200e6acfad1 (diff)
parent4ad916ec4a34d18ab6ad35f1fbfb7a73de30ba24 (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.java3
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;