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

Commit e99897ef authored by d34d's avatar d34d Committed by Clark Scheff
Browse files

Return original value if icon info is null

If the composed icon info is null then there is not much to do so
restore the original TypedValue and return.

Change-Id: I3351af8b996125b376f5db6a9dad6d37605d69b2
REF: THEMES-648
parent 6e73ab56
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -620,6 +620,11 @@ public class IconPackHelper {
        public static void getValue(Resources res, int resId, TypedValue outValue,
                Drawable baseIcon) {
            final String pkgName = res.getAssets().getAppName();
            final ComposedIconInfo iconInfo = res.getComposedIconInfo();
            if (iconInfo == null) {
                // No composed icon info available so return, keeping original value
                return;
            }
            TypedValue tempValue = new TypedValue();
            tempValue.setTo(outValue);
            outValue.assetCookie = COMPOSED_ICON_COOKIE;
@@ -630,7 +635,6 @@ public class IconPackHelper {

            if (!(new File(outValue.string.toString()).exists())) {
                // compose the icon and cache it
                final ComposedIconInfo iconInfo = res.getComposedIconInfo();
                int back = 0;
                if (iconInfo.swatchType != ComposedIconInfo.SwatchType.None) {
                    back = iconInfo.iconPaletteBack;