am 05e809c8: am 1d18ce0b: am d375274c: am 76c2add1: am 83e76aa2: am c1392c0f: Merge "Mutate FAB backgrounds before tinting" into lmp-mr1-ub-dev

* commit '05e809c871b64b9a79381e1f3a0436748f436050':
  Mutate FAB backgrounds before tinting

GitOrigin-RevId=e6044a99864aef98a04e89a7685e859b9fd9bef5

PiperOrigin-RevId: 140549420
This commit is contained in:
Chris Banes 2016-11-30 01:25:26 +00:00 committed by Travis Collins
parent 74c3dff7bb
commit 7e8fde62b7
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ class FloatingActionButtonEclairMr1 extends FloatingActionButtonImpl {
PorterDuff.Mode backgroundTintMode, int rippleColor, int borderWidth) {
// Now we need to tint the original background with the tint, using
// an InsetDrawable if we have a border width
mShapeDrawable = DrawableCompat.wrap(originalBackground);
mShapeDrawable = DrawableCompat.wrap(originalBackground.mutate());
DrawableCompat.setTintList(mShapeDrawable, backgroundTint);
if (backgroundTintMode != null) {
DrawableCompat.setTintMode(mShapeDrawable, backgroundTintMode);

View File

@ -54,7 +54,7 @@ class FloatingActionButtonLollipop extends FloatingActionButtonHoneycombMr1 {
void setBackgroundDrawable(Drawable originalBackground, ColorStateList backgroundTint,
PorterDuff.Mode backgroundTintMode, int rippleColor, int borderWidth) {
// Now we need to tint the original background with the tint
mShapeDrawable = DrawableCompat.wrap(originalBackground);
mShapeDrawable = DrawableCompat.wrap(originalBackground.mutate());
DrawableCompat.setTintList(mShapeDrawable, backgroundTint);
if (backgroundTintMode != null) {
DrawableCompat.setTintMode(mShapeDrawable, backgroundTintMode);