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.

--HG--
extra : commitid : KZghkGnS9ty
extra : rebase_source : f45ac49e5c6c8dcdfa07709ca42b692ef197916e
This commit is contained in:
Michael Comella 2015-07-06 14:42:22 -07:00
Родитель 05250e0d80
Коммит 84a16d7f27
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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);