Bug 1180907 - Mutate search label before tinting it. r=sebastian

If we don't mutate, we're tinting the shared Drawable state and other Drawables
using the same asset might also get tinted.
This commit is contained in:
Michael Comella 2015-07-06 14:42:22 -07:00
parent 9aa228ed20
commit aa9af0f5f1

View File

@ -175,7 +175,8 @@ public class SearchEngineBar extends TwoWayView
view = LayoutInflater.from(getContext()).inflate(R.layout.search_engine_bar_label, parent, false);
}
Drawable icon = DrawableCompat.wrap(ContextCompat.getDrawable(parent.getContext(), R.drawable.search_icon_active));
final Drawable icon = DrawableCompat.wrap(
ContextCompat.getDrawable(parent.getContext(), R.drawable.search_icon_active).mutate());
DrawableCompat.setTint(icon, getResources().getColor(R.color.disabled_grey));
final ImageView iconView = (ImageView) view.findViewById(R.id.search_engine_label);