API Review: StateListDrawables#getDrawableForState
Renamed getStateDrawableIndex to findStateDrawableIndex
based on API review feedback.
Change-Id: If07fe279fb02bc8180a28c7f58ea84ca030773ad
Fixes: 113856171
Test: Re-ran CTS
diff --git a/api/current.txt b/api/current.txt
index f750e33..ebd4c9b 100755
--- a/api/current.txt
+++ b/api/current.txt
@@ -15135,9 +15135,9 @@
public class StateListDrawable extends android.graphics.drawable.DrawableContainer {
ctor public StateListDrawable();
method public void addState(int[], android.graphics.drawable.Drawable);
+ method public int findStateDrawableIndex(int[]);
method public int getStateCount();
method public android.graphics.drawable.Drawable getStateDrawable(int);
- method public int getStateDrawableIndex(int[]);
method public int[] getStateSet(int);
}
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index 0da47fd..1883809 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -545,7 +545,7 @@
StateListDrawable stateList = (StateListDrawable) mBackground;
// Find the above-anchor view - this one's easy, it should be labeled as such.
- int aboveAnchorStateIndex = stateList.getStateDrawableIndex(ABOVE_ANCHOR_STATE_SET);
+ int aboveAnchorStateIndex = stateList.findStateDrawableIndex(ABOVE_ANCHOR_STATE_SET);
// Now, for the below-anchor view, look for any other drawable specified in the
// StateListDrawable which is not for the above-anchor state and use that.
diff --git a/graphics/java/android/graphics/drawable/StateListDrawable.java b/graphics/java/android/graphics/drawable/StateListDrawable.java
index 8de8f81..2855227 100644
--- a/graphics/java/android/graphics/drawable/StateListDrawable.java
+++ b/graphics/java/android/graphics/drawable/StateListDrawable.java
@@ -280,7 +280,7 @@
* @see #getStateDrawable(int)
* @see #getStateSet(int)
*/
- public int getStateDrawableIndex(int[] stateSet) {
+ public int findStateDrawableIndex(int[] stateSet) {
return mStateListState.indexOfStateSet(stateSet);
}