From 50d97b99752a04d06626506150783fd39f1335f6 Mon Sep 17 00:00:00 2001 From: althafvly Date: Wed, 18 Mar 2026 23:56:21 +0530 Subject: [PATCH] Allow to remove tint for homepage icons --- .../settings/dashboard/DashboardFeatureProviderImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java b/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java index 69fdc9eb6d8..3983454e0c7 100644 --- a/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java +++ b/src/com/android/settings/dashboard/DashboardFeatureProviderImpl.java @@ -26,6 +26,7 @@ import static com.android.settingslib.drawer.SwitchesProvider.METHOD_GET_DYNAMIC import static com.android.settingslib.drawer.SwitchesProvider.METHOD_GET_PROVIDER_ICON; import static com.android.settingslib.drawer.SwitchesProvider.METHOD_IS_CHECKED; import static com.android.settingslib.drawer.SwitchesProvider.METHOD_ON_CHECKED_CHANGED; +import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_ICON_TINTABLE; import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_ICON_URI; import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_SUMMARY; import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_SUMMARY_URI; @@ -424,7 +425,10 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider { String iconPackage, Icon icon) { Drawable iconDrawable = icon.loadDrawable(preference.getContext()); if (TextUtils.equals(tile.getCategory(), CategoryKey.CATEGORY_HOMEPAGE)) { - iconDrawable.setTint(Utils.getHomepageIconColor(preference.getContext())); + if (tile.getMetaData() != null + && tile.getMetaData().getBoolean(META_DATA_PREFERENCE_ICON_TINTABLE, true)) { + iconDrawable.setTint(Utils.getHomepageIconColor(preference.getContext())); + } } else if (forceRoundedIcon && !TextUtils.equals(mContext.getPackageName(), iconPackage)) { iconDrawable = new AdaptiveIcon(mContext, iconDrawable, R.dimen.dashboard_tile_foreground_image_inset); -- GitLab