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

Commit a79f4b7d authored by Jason Bayer's avatar Jason Bayer Committed by Jeff Brown
Browse files

Refresh the drawable state when selecting a position.

It seems that mSelectorShowing is a dead (always false) field.

Bug: 4070346
Change-Id: Icf3cc6f19cc49dcfda15229a6d91232404c0743c
parent a86127fe
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -270,12 +270,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     */
    Drawable mSelector;

    /**
     * Set to true if we would like to have the selector showing itself.
     * We still need to draw and position it even if this is false.
     */
    boolean mSelectorShowing;

    /**
     * The current position of the selector in the list.
     */
@@ -1669,7 +1663,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        setSelectedPositionInt(INVALID_POSITION);
        setNextSelectedPositionInt(INVALID_POSITION);
        mSelectedTop = 0;
        mSelectorShowing = false;
        mSelectorPosition = INVALID_POSITION;
        mSelectorRect.setEmpty();
        invalidate();
@@ -2025,7 +2018,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        final boolean isChildViewEnabled = mIsChildViewEnabled;
        if (sel.isEnabled() != isChildViewEnabled) {
            mIsChildViewEnabled = !isChildViewEnabled;
            if (mSelectorShowing) {
            if (getSelectedItemPosition() != INVALID_POSITION) {
                refreshDrawableState();
            }
        }
@@ -4529,7 +4522,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            setSelectedPositionInt(INVALID_POSITION);
            setNextSelectedPositionInt(INVALID_POSITION);
            mSelectedTop = 0;
            mSelectorShowing = false;
        }
    }