Update icon for security settings.

- also fix the issue of dynamic tile icon is being cached and not
updated properly.

Change-Id: I9289260340c1cddc4123fda88c366d658a11ddfc
Fixes: 74255242
Test: visual
This commit is contained in:
Doris Ling
2018-04-17 12:26:33 -07:00
parent 03b8aa3a3c
commit f2dce9fac2
10 changed files with 34 additions and 81 deletions

View File

@@ -259,8 +259,10 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
return;
}
tile.icon = Icon.createWithResource(iconInfo.first, iconInfo.second);
ThreadUtils.postOnMainThread(() ->
preference.setIcon(tile.icon.loadDrawable(preference.getContext()))
ThreadUtils.postOnMainThread(() -> {
preference.setIcon(tile.icon.loadDrawable(preference.getContext()));
tile.icon = null;
}
);
});
}