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

Commit cae3eb91 authored by Chet Haase's avatar Chet Haase Committed by Android Git Automerger
Browse files

am 946facaa: am a004ff88: Merge "Use correct alpha value when a color is not...

am 946facaa: am a004ff88: Merge "Use correct alpha value when a color is not set on a GradientDrawable." into jb-mr1.1-dev

* commit '946facaa':
  Use correct alpha value when a color is not set on a GradientDrawable.
parents 713bebda 946facaa
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -479,7 +479,7 @@ public class GradientDrawable extends Drawable {
            mFillPaint.setDither(mDither);
            mFillPaint.setDither(mDither);
            mFillPaint.setColorFilter(mColorFilter);
            mFillPaint.setColorFilter(mColorFilter);
            if (mColorFilter != null && !mGradientState.mHasSolidColor) {
            if (mColorFilter != null && !mGradientState.mHasSolidColor) {
                mFillPaint.setColor(0xff000000);
                mFillPaint.setColor(mAlpha << 24);
            }
            }
            if (haveStroke) {
            if (haveStroke) {
                mStrokePaint.setAlpha(currStrokeAlpha);
                mStrokePaint.setAlpha(currStrokeAlpha);
@@ -743,7 +743,7 @@ public class GradientDrawable extends Drawable {
                    mFillPaint.setShader(new LinearGradient(x0, y0, x1, y1,
                    mFillPaint.setShader(new LinearGradient(x0, y0, x1, y1,
                            colors, st.mPositions, Shader.TileMode.CLAMP));
                            colors, st.mPositions, Shader.TileMode.CLAMP));
                    if (!mGradientState.mHasSolidColor) {
                    if (!mGradientState.mHasSolidColor) {
                        mFillPaint.setColor(0xff000000);
                        mFillPaint.setColor(mAlpha << 24);
                    }
                    }
                } else if (st.mGradient == RADIAL_GRADIENT) {
                } else if (st.mGradient == RADIAL_GRADIENT) {
                    x0 = r.left + (r.right - r.left) * st.mCenterX;
                    x0 = r.left + (r.right - r.left) * st.mCenterX;
@@ -755,7 +755,7 @@ public class GradientDrawable extends Drawable {
                            level * st.mGradientRadius, colors, null,
                            level * st.mGradientRadius, colors, null,
                            Shader.TileMode.CLAMP));
                            Shader.TileMode.CLAMP));
                    if (!mGradientState.mHasSolidColor) {
                    if (!mGradientState.mHasSolidColor) {
                        mFillPaint.setColor(0xff000000);
                        mFillPaint.setColor(mAlpha << 24);
                    }
                    }
                } else if (st.mGradient == SWEEP_GRADIENT) {
                } else if (st.mGradient == SWEEP_GRADIENT) {
                    x0 = r.left + (r.right - r.left) * st.mCenterX;
                    x0 = r.left + (r.right - r.left) * st.mCenterX;
@@ -788,7 +788,7 @@ public class GradientDrawable extends Drawable {
                    }
                    }
                    mFillPaint.setShader(new SweepGradient(x0, y0, tempColors, tempPositions));
                    mFillPaint.setShader(new SweepGradient(x0, y0, tempColors, tempPositions));
                    if (!mGradientState.mHasSolidColor) {
                    if (!mGradientState.mHasSolidColor) {
                        mFillPaint.setColor(0xff000000);
                        mFillPaint.setColor(mAlpha << 24);
                    }
                    }
                }
                }
            }
            }