Removed the @hide annotation on various StateListDrawable APIs to better
match the API surface exposed in ColorStateList.

Removed the @hide annotation for the following StateListDrawable APIs:
--getStateCount
--getStateSet
--getStateDrawable
--getStateDrawableIndex

Fixes: 30325322
Test: Re-ran StateListDrawable CTS tests and added tests to verify each
of the newly exposed APIs

Change-Id: If93a017b6cf690fc38381a234bf3bd19d0bfc675
diff --git a/api/current.txt b/api/current.txt
index cbff777..ab6770a 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -15070,6 +15070,10 @@
   public class StateListDrawable extends android.graphics.drawable.DrawableContainer {
     ctor public StateListDrawable();
     method public void addState(int[], android.graphics.drawable.Drawable);
+    method public int getStateCount();
+    method public android.graphics.drawable.Drawable getStateDrawable(int);
+    method public int getStateDrawableIndex(int[]);
+    method public int[] getStateSet(int);
   }
 
   public class TransitionDrawable extends android.graphics.drawable.LayerDrawable implements android.graphics.drawable.Drawable.Callback {
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt
index e69296d..7d1ce94 100644
--- a/config/hiddenapi-light-greylist.txt
+++ b/config/hiddenapi-light-greylist.txt
@@ -1063,10 +1063,6 @@
 Landroid/graphics/drawable/RippleDrawable$RippleState;->mColor:Landroid/content/res/ColorStateList;
 Landroid/graphics/drawable/RippleDrawable;->mState:Landroid/graphics/drawable/RippleDrawable$RippleState;
 Landroid/graphics/drawable/StateListDrawable;->extractStateSet(Landroid/util/AttributeSet;)[I
-Landroid/graphics/drawable/StateListDrawable;->getStateCount()I
-Landroid/graphics/drawable/StateListDrawable;->getStateDrawable(I)Landroid/graphics/drawable/Drawable;
-Landroid/graphics/drawable/StateListDrawable;->getStateDrawableIndex([I)I
-Landroid/graphics/drawable/StateListDrawable;->getStateSet(I)[I
 Landroid/graphics/drawable/StateListDrawable;->mStateListState:Landroid/graphics/drawable/StateListDrawable$StateListState;
 Landroid/graphics/drawable/StateListDrawable;->updateStateFromTypedArray(Landroid/content/res/TypedArray;)V
 Landroid/graphics/drawable/VectorDrawable$VGroup;->setRotation(F)V
@@ -1085,10 +1081,10 @@
 Landroid/graphics/GraphicBuffer;->CREATOR:Landroid/os/Parcelable$Creator;
 Landroid/graphics/GraphicBuffer;->mNativeObject:J
 Landroid/graphics/ImageDecoder;->postProcessAndRelease(Landroid/graphics/Canvas;)I
-Landroid/graphics/Insets;->left:I
-Landroid/graphics/Insets;->top:I
-Landroid/graphics/Insets;->right:I
 Landroid/graphics/Insets;->bottom:I
+Landroid/graphics/Insets;->left:I
+Landroid/graphics/Insets;->right:I
+Landroid/graphics/Insets;->top:I
 Landroid/graphics/LinearGradient;->mColors:[I
 Landroid/graphics/Matrix;->native_instance:J
 Landroid/graphics/Movie;-><init>(J)V
diff --git a/graphics/java/android/graphics/drawable/StateListDrawable.java b/graphics/java/android/graphics/drawable/StateListDrawable.java
index c98f160..6179523 100644
--- a/graphics/java/android/graphics/drawable/StateListDrawable.java
+++ b/graphics/java/android/graphics/drawable/StateListDrawable.java
@@ -16,6 +16,14 @@
 
 package android.graphics.drawable;
 
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.res.Resources;
+import android.content.res.Resources.Theme;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.util.StateSet;
+
 import com.android.internal.R;
 
 import org.xmlpull.v1.XmlPullParser;
@@ -24,14 +32,6 @@
 import java.io.IOException;
 import java.util.Arrays;
 
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.content.res.Resources;
-import android.content.res.TypedArray;
-import android.content.res.Resources.Theme;
-import android.util.AttributeSet;
-import android.util.StateSet;
-
 /**
  * Lets you assign a number of graphic images to a single Drawable and swap out the visible item by a string
  * ID value.
@@ -235,7 +235,6 @@
      * Gets the number of states contained in this drawable.
      *
      * @return The number of states contained in this drawable.
-     * @hide pending API council
      * @see #getStateSet(int)
      * @see #getStateDrawable(int)
      */
@@ -248,7 +247,6 @@
      *
      * @param index The index of the state set.
      * @return The state set at the index.
-     * @hide pending API council
      * @see #getStateCount()
      * @see #getStateDrawable(int)
      */
@@ -261,7 +259,6 @@
      *
      * @param index The index of the drawable.
      * @return The drawable at the index.
-     * @hide pending API council
      * @see #getStateCount()
      * @see #getStateSet(int)
      */
@@ -274,7 +271,6 @@
      *
      * @param stateSet the state set to look up
      * @return the index of the provided state set, or -1 if not found
-     * @hide pending API council
      * @see #getStateDrawable(int)
      * @see #getStateSet(int)
      */