Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1df1070 authored by Jay Shrauner's avatar Jay Shrauner Committed by Divya Sharma
Browse files

Fix NPE in markDropArea

Check for mDraggedEntry == null

Bug:18524967
Change-Id: I204d9067cf9b02afddaf10ec897fddba3bdb3932
parent 511d388d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -459,7 +459,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;