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

Commit 952802e2 authored by Alan Viverette's avatar Alan Viverette
Browse files

Fix bad workaround docs in Resources.getDrawable()

The real solution is to use ContextCompat, but we can't reference support
library from framework. C'est la vie.

Bug: 27727320
Change-Id: Ib9bcd5f2bdce1996f02fd44877df9ba202b26edc
parent 6dffdf82
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -715,11 +715,10 @@ public class Resources {
     * This means that if the density configuration of the alias resource
     * is different than the actual resource, the density of the returned
     * Drawable would be incorrect, resulting in bad scaling. To work
     * around this, you can instead retrieve the Drawable through
     * {@link TypedArray#getDrawable TypedArray.getDrawable}.  Use
     * {@link android.content.Context#obtainStyledAttributes(int[])
     * Context.obtainStyledAttributes} with
     * an array containing the resource ID of interest to create the TypedArray.</p>
     * around this, you can instead manually resolve the aliased reference
     * by using {@link #getValue(int, TypedValue, boolean)} and passing
     * {@code true} for {@code resolveRefs}. The resulting
     * {@link TypedValue#resourceId} value may be passed to this method.</p>
     *
     * <p class="note"><strong>Note:</strong> To obtain a themed drawable, use
     * {@link android.content.Context#getDrawable(int) Context.getDrawable(int)}