Loading graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java +1 −1 Original line number Diff line number Diff line Loading @@ -492,7 +492,7 @@ public class AnimatedStateListDrawable extends StateListDrawable { @Override public Drawable mutate() { if (!mMutated) { if (!mMutated && super.mutate() == this) { final AnimatedStateListState newState = new AnimatedStateListState(mState, this, null); setConstantState(newState); mMutated = true; Loading graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java +1 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable { @Override public Drawable mutate() { if (!mMutated && super.mutate() == this) { mAnimatedVectorState = new AnimatedVectorDrawableState(mAnimatedVectorState); mAnimatedVectorState.mVectorDrawable.mutate(); mMutated = true; } return this; Loading graphics/java/android/graphics/drawable/RippleDrawable.java +23 −6 Original line number Diff line number Diff line Loading @@ -114,7 +114,8 @@ public class RippleDrawable extends LayerDrawable { /** Current dirty bounds, union of current and previous drawing bounds. */ private final Rect mDirtyBounds = new Rect(); private final RippleState mState; /** Mirrors mLayerState with some extra information. */ private RippleState mState; /** The masking layer, e.g. the layer with id R.id.mask. */ private Drawable mMask; Loading Loading @@ -885,18 +886,34 @@ public class RippleDrawable extends LayerDrawable { return mState; } @Override public Drawable mutate() { super.mutate(); // LayerDrawable creates a new state using createConstantState, so // this should always be a safe cast. mState = (RippleState) mLayerState; return this; } @Override RippleState createConstantState(LayerState state, Resources res) { return new RippleState(state, this, res); } static class RippleState extends LayerState { int[] mTouchThemeAttrs; ColorStateList mColor = ColorStateList.valueOf(Color.MAGENTA); int mMaxRadius = RADIUS_AUTO; public RippleState(RippleState orig, RippleDrawable owner, Resources res) { public RippleState(LayerState orig, RippleDrawable owner, Resources res) { super(orig, owner, res); if (orig != null) { mTouchThemeAttrs = orig.mTouchThemeAttrs; mColor = orig.mColor; mMaxRadius = orig.mMaxRadius; if (orig != null && orig instanceof RippleState) { final RippleState origs = (RippleState) orig; mTouchThemeAttrs = origs.mTouchThemeAttrs; mColor = origs.mColor; mMaxRadius = origs.mMaxRadius; } } Loading graphics/java/android/graphics/drawable/VectorDrawable.java +22 −9 Original line number Diff line number Diff line Loading @@ -507,9 +507,10 @@ public class VectorDrawable extends Drawable { pathRenderer.getAlpha()); pathRenderer.setAlpha(alphaInFloat); pathRenderer.mRootName = a.getString(R.styleable.VectorDrawable_name); if (pathRenderer.mRootName != null) { pathRenderer.mVGTargetsMap.put(pathRenderer.mRootName, pathRenderer); final String name = a.getString(R.styleable.VectorDrawable_name); if (name != null) { pathRenderer.mRootName = name; pathRenderer.mVGTargetsMap.put(name, pathRenderer); } } Loading Loading @@ -1313,9 +1314,15 @@ public class VectorDrawable extends Drawable { // Account for any configuration changes. mChangingConfigurations |= a.getChangingConfigurations(); mPathName = a.getString(R.styleable.VectorDrawableClipPath_name); mNodes = PathParser.createNodesFromPathData(a.getString( R.styleable.VectorDrawableClipPath_pathData)); final String pathName = a.getString(R.styleable.VectorDrawableClipPath_name); if (pathName != null) { mPathName = pathName; } final String pathData = a.getString(R.styleable.VectorDrawableClipPath_pathData); if (pathData != null) { mNodes = PathParser.createNodesFromPathData(pathData); } } @Override Loading Loading @@ -1415,9 +1422,15 @@ public class VectorDrawable extends Drawable { // Extract the theme attributes, if any. mThemeAttrs = a.extractThemeAttrs(); mPathName = a.getString(R.styleable.VectorDrawablePath_name); mNodes = PathParser.createNodesFromPathData(a.getString( R.styleable.VectorDrawablePath_pathData)); final String pathName = a.getString(R.styleable.VectorDrawablePath_name); if (pathName != null) { mPathName = pathName; } final String pathData = a.getString(R.styleable.VectorDrawablePath_pathData); if (pathData != null) { mNodes = PathParser.createNodesFromPathData(pathData); } mFillColor = a.getColor(R.styleable.VectorDrawablePath_fillColor, mFillColor); Loading Loading
graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java +1 −1 Original line number Diff line number Diff line Loading @@ -492,7 +492,7 @@ public class AnimatedStateListDrawable extends StateListDrawable { @Override public Drawable mutate() { if (!mMutated) { if (!mMutated && super.mutate() == this) { final AnimatedStateListState newState = new AnimatedStateListState(mState, this, null); setConstantState(newState); mMutated = true; Loading
graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java +1 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable { @Override public Drawable mutate() { if (!mMutated && super.mutate() == this) { mAnimatedVectorState = new AnimatedVectorDrawableState(mAnimatedVectorState); mAnimatedVectorState.mVectorDrawable.mutate(); mMutated = true; } return this; Loading
graphics/java/android/graphics/drawable/RippleDrawable.java +23 −6 Original line number Diff line number Diff line Loading @@ -114,7 +114,8 @@ public class RippleDrawable extends LayerDrawable { /** Current dirty bounds, union of current and previous drawing bounds. */ private final Rect mDirtyBounds = new Rect(); private final RippleState mState; /** Mirrors mLayerState with some extra information. */ private RippleState mState; /** The masking layer, e.g. the layer with id R.id.mask. */ private Drawable mMask; Loading Loading @@ -885,18 +886,34 @@ public class RippleDrawable extends LayerDrawable { return mState; } @Override public Drawable mutate() { super.mutate(); // LayerDrawable creates a new state using createConstantState, so // this should always be a safe cast. mState = (RippleState) mLayerState; return this; } @Override RippleState createConstantState(LayerState state, Resources res) { return new RippleState(state, this, res); } static class RippleState extends LayerState { int[] mTouchThemeAttrs; ColorStateList mColor = ColorStateList.valueOf(Color.MAGENTA); int mMaxRadius = RADIUS_AUTO; public RippleState(RippleState orig, RippleDrawable owner, Resources res) { public RippleState(LayerState orig, RippleDrawable owner, Resources res) { super(orig, owner, res); if (orig != null) { mTouchThemeAttrs = orig.mTouchThemeAttrs; mColor = orig.mColor; mMaxRadius = orig.mMaxRadius; if (orig != null && orig instanceof RippleState) { final RippleState origs = (RippleState) orig; mTouchThemeAttrs = origs.mTouchThemeAttrs; mColor = origs.mColor; mMaxRadius = origs.mMaxRadius; } } Loading
graphics/java/android/graphics/drawable/VectorDrawable.java +22 −9 Original line number Diff line number Diff line Loading @@ -507,9 +507,10 @@ public class VectorDrawable extends Drawable { pathRenderer.getAlpha()); pathRenderer.setAlpha(alphaInFloat); pathRenderer.mRootName = a.getString(R.styleable.VectorDrawable_name); if (pathRenderer.mRootName != null) { pathRenderer.mVGTargetsMap.put(pathRenderer.mRootName, pathRenderer); final String name = a.getString(R.styleable.VectorDrawable_name); if (name != null) { pathRenderer.mRootName = name; pathRenderer.mVGTargetsMap.put(name, pathRenderer); } } Loading Loading @@ -1313,9 +1314,15 @@ public class VectorDrawable extends Drawable { // Account for any configuration changes. mChangingConfigurations |= a.getChangingConfigurations(); mPathName = a.getString(R.styleable.VectorDrawableClipPath_name); mNodes = PathParser.createNodesFromPathData(a.getString( R.styleable.VectorDrawableClipPath_pathData)); final String pathName = a.getString(R.styleable.VectorDrawableClipPath_name); if (pathName != null) { mPathName = pathName; } final String pathData = a.getString(R.styleable.VectorDrawableClipPath_pathData); if (pathData != null) { mNodes = PathParser.createNodesFromPathData(pathData); } } @Override Loading Loading @@ -1415,9 +1422,15 @@ public class VectorDrawable extends Drawable { // Extract the theme attributes, if any. mThemeAttrs = a.extractThemeAttrs(); mPathName = a.getString(R.styleable.VectorDrawablePath_name); mNodes = PathParser.createNodesFromPathData(a.getString( R.styleable.VectorDrawablePath_pathData)); final String pathName = a.getString(R.styleable.VectorDrawablePath_name); if (pathName != null) { mPathName = pathName; } final String pathData = a.getString(R.styleable.VectorDrawablePath_pathData); if (pathData != null) { mNodes = PathParser.createNodesFromPathData(pathData); } mFillColor = a.getColor(R.styleable.VectorDrawablePath_fillColor, mFillColor); Loading