Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33622a03 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Guard against the NPE in setPreferenceIcon()" into tm-dev am: cce3381e

parents d2631c30 cce3381e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -422,6 +422,11 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
    private void setPreferenceIcon(Preference preference, Tile tile, boolean forceRoundedIcon,
            String iconPackage, Icon icon) {
        Drawable iconDrawable = icon.loadDrawable(preference.getContext());
        if (iconDrawable == null) {
            Log.w(TAG, "Set null preference icon for: " + iconPackage);
            preference.setIcon(null);
            return;
        }
        if (TextUtils.equals(tile.getCategory(), CategoryKey.CATEGORY_HOMEPAGE)) {
            iconDrawable.setTint(Utils.getHomepageIconColor(preference.getContext()));
        } else if (forceRoundedIcon && !TextUtils.equals(mContext.getPackageName(), iconPackage)) {