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

Commit 2eeaba62 authored by Alan Viverette's avatar Alan Viverette Committed by Android Git Automerger
Browse files

am 49a20330: am 17cdbe10: am 8f7812bc: am 20b9a6c4: am 9e84a6a0: Merge "Fix...

am 49a20330: am 17cdbe10: am 8f7812bc: am 20b9a6c4: am 9e84a6a0: Merge "Fix inaccurate TypedArray.getDrawable() documentation" into lmp-dev

* commit '49a20330f238fb9e72c5ad32d35c1147ccebaf9b':
  Fix inaccurate TypedArray.getDrawable() documentation
parents ab204faa a83de9cf
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.content.res;

import android.annotation.Nullable;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
@@ -728,15 +729,13 @@ public class TypedArray {
    }

    /**
     * Retrieve the Drawable for the attribute at <var>index</var>.  This
     * gets the resource ID of the selected attribute, and uses
     * {@link Resources#getDrawable Resources.getDrawable} of the owning
     * Resources object to retrieve its Drawable.
     * Retrieve the Drawable for the attribute at <var>index</var>.
     *
     * @param index Index of attribute to retrieve.
     *
     * @return Drawable for the attribute, or null if not defined.
     */
    @Nullable
    public Drawable getDrawable(int index) {
        if (mRecycled) {
            throw new RuntimeException("Cannot make calls to a recycled instance!");