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

Commit fe16787b authored by Alan Viverette's avatar Alan Viverette
Browse files

Preserve NPE behavior of removed TextView.getTextColors() API

BUG: 17511449
Change-Id: Iea7e9aed69c21b230e3c474d4c1378a8663cfcb1
parent 47e3124d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -8182,6 +8182,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
     * @removed
     */
    public static ColorStateList getTextColors(Context context, TypedArray attrs) {
        if (attrs == null) {
            // Preserve behavior prior to removal of this API.
            throw new NullPointerException();
        }

        // It's not safe to use this method from apps. The parameter 'attrs'
        // must have been obtained using the TextView filter array which is not
        // available to the SDK. As such, we grab a default TypedArray with the