Use Tile.getIcon() to avoid caching issue

Bug: 77600770
Test: robotests
Change-Id: Icb21f5da9b542abc239b04b71813290ad3104ffb
This commit is contained in:
Fan Zhang
2018-07-24 12:49:30 -07:00
parent f24b749ec0
commit 701b65eccc
12 changed files with 167 additions and 142 deletions

View File

@@ -238,8 +238,9 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
@VisibleForTesting
void bindIcon(Preference preference, Tile tile) {
if (tile.icon != null) {
preference.setIcon(tile.icon.loadDrawable(preference.getContext()));
final Icon tileIcon = tile.getIcon();
if (tileIcon != null) {
preference.setIcon(tileIcon.loadDrawable(preference.getContext()));
} else if (tile.metaData != null
&& tile.metaData.containsKey(META_DATA_PREFERENCE_ICON_URI)) {
ThreadUtils.postOnBackgroundThread(() -> {