Use Tile.getIcon() to avoid caching issue
Bug: 77600770 Test: robotests Change-Id: Icb21f5da9b542abc239b04b71813290ad3104ffb
This commit is contained in:
@@ -256,7 +256,7 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
|
||||
|
||||
@VisibleForTesting
|
||||
boolean tintTileIcon(Tile tile) {
|
||||
if (tile.icon == null) {
|
||||
if (tile.getIcon() == null) {
|
||||
return false;
|
||||
}
|
||||
// First check if the tile has set the icon tintable metadata.
|
||||
@@ -330,7 +330,7 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
|
||||
/**
|
||||
* Refresh preference items backed by DashboardCategory.
|
||||
*/
|
||||
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
|
||||
@VisibleForTesting
|
||||
void refreshDashboardTiles(final String TAG) {
|
||||
final PreferenceScreen screen = getPreferenceScreen();
|
||||
|
||||
@@ -370,7 +370,7 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
|
||||
continue;
|
||||
}
|
||||
if (tintTileIcon(tile)) {
|
||||
tile.icon.setTint(tintColor);
|
||||
tile.getIcon().setTint(tintColor);
|
||||
}
|
||||
if (mDashboardTilePrefKeys.contains(key)) {
|
||||
// Have the key already, will rebind.
|
||||
|
Reference in New Issue
Block a user