Merge "Refresh the drawable state when selecting a position."
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 6b80608..1e10a71 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -271,12 +271,6 @@
     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.
      */
     int mSelectorPosition = INVALID_POSITION;
@@ -1669,7 +1663,6 @@
         setSelectedPositionInt(INVALID_POSITION);
         setNextSelectedPositionInt(INVALID_POSITION);
         mSelectedTop = 0;
-        mSelectorShowing = false;
         mSelectorPosition = INVALID_POSITION;
         mSelectorRect.setEmpty();
         invalidate();
@@ -2025,7 +2018,7 @@
         final boolean isChildViewEnabled = mIsChildViewEnabled;
         if (sel.isEnabled() != isChildViewEnabled) {
             mIsChildViewEnabled = !isChildViewEnabled;
-            if (mSelectorShowing) {
+            if (getSelectedItemPosition() != INVALID_POSITION) {
                 refreshDrawableState();
             }
         }
@@ -4529,7 +4522,6 @@
             setSelectedPositionInt(INVALID_POSITION);
             setNextSelectedPositionInt(INVALID_POSITION);
             mSelectedTop = 0;
-            mSelectorShowing = false;
         }
     }