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

Commit 616dd478 authored by Alan Viverette's avatar Alan Viverette
Browse files

Use correct state list for obtaining stroke color

BUG: 11696411
Change-Id: Ia9ad70cbceae18923fc79db8f07223fb0d41ae81
parent e5d2af6b
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -702,17 +702,20 @@ public class GradientDrawable extends Drawable {
            final int oldColor = mFillPaint.getColor();
            if (oldColor != newColor) {
                mFillPaint.setColor(newColor);
                invalidateSelf |= true;
                invalidateSelf = true;
            }
        }

        final Paint strokePaint = mStrokePaint;
        if (strokePaint != null) {
            final ColorStateList strokeStateList = s.mStrokeColorStateList;
            if (strokeStateList != null) {
            final int newColor = stateList.getColorForState(stateSet, 0);
            final int oldColor = mStrokePaint.getColor();
            if (oldColor != newColor) {
                mStrokePaint.setColor(newColor);
                invalidateSelf |= true;
                final int newStrokeColor = strokeStateList.getColorForState(stateSet, 0);
                final int oldStrokeColor = strokePaint.getColor();
                if (oldStrokeColor != newStrokeColor) {
                    strokePaint.setColor(newStrokeColor);
                    invalidateSelf = true;
                }
            }
        }