summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJay Shrauner <shrauner@google.com>2014-11-25 14:42:43 -0800
committerJay Shrauner <shrauner@google.com>2014-11-25 14:42:43 -0800
commitc57f6640569acb1df4fc5d7d2b026e824351b531 (patch)
tree077d5232a3a16f9dc2d331258e9696e5f4e7f8e5 /src
parent867531f895c55f4fd8633c8173b686e4ce1f4582 (diff)
Fix NPE in markDropArea
Check for mDraggedEntry == null Bug:18524967 Change-Id: I323cf41ddd21444d4fd675543b822c29517e8b26
Diffstat (limited to 'src')
-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;