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

Commit 59c48c49 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Use correct state list for obtaining stroke color"

parents b25b8901 616dd478
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;
                }
            }
        }