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

Commit 071149a9 authored by Nader Jawad's avatar Nader Jawad
Browse files

API Review: StateListDrawables#getDrawableForState

Renamed getStateDrawableIndex to findStateDrawableIndex
based on API review feedback.

Change-Id: If07fe279fb02bc8180a28c7f58ea84ca030773ad
Fixes: 113856171
Test: Re-ran CTS
parent c803806e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15135,9 +15135,9 @@ package android.graphics.drawable {
  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);
  }
+1 −1
Original line number Diff line number Diff line
@@ -545,7 +545,7 @@ public class PopupWindow {
            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.
+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ public class StateListDrawable extends DrawableContainer {
     * @see #getStateDrawable(int)
     * @see #getStateSet(int)
     */
    public int getStateDrawableIndex(int[] stateSet) {
    public int findStateDrawableIndex(int[] stateSet) {
        return mStateListState.indexOfStateSet(stateSet);
    }