Check icon tintable flag of the Suggestion.
- instead of checking the icon resource package, check the icon tintable flag to see if we should tint the suggestion icon. Bug: 72330968 Test: make RunSettingsRoboTests Change-Id: I4767df05bebf815774dbd8e528c7ac0f5b902d44
This commit is contained in:
@@ -116,7 +116,7 @@ public class SuggestionAdapter extends RecyclerView.Adapter<DashboardItemHolder>
|
||||
mConfig.setCardLayout(holder, suggestionCount, position);
|
||||
final Icon icon = suggestion.getIcon();
|
||||
final Drawable drawable = mCache.getIcon(icon);
|
||||
if (drawable != null && TextUtils.equals(icon.getResPackage(), mContext.getPackageName())) {
|
||||
if ((suggestion.getFlags() & Suggestion.FLAG_ICON_TINTABLE) != 0) {
|
||||
drawable.setTint(Utils.getColorAccent(mContext));
|
||||
}
|
||||
holder.icon.setImageDrawable(drawable);
|
||||
|
Reference in New Issue
Block a user