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

Commit b6a0ed95 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Handle potential IllegalArgumentException in Telecom am: 6f02de08 am: 9a1ad06a

Change-Id: I818307b3c5ea028b0132bff56e2558e16a734a58
parents bbcd8bad 9a1ad06a
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -1599,10 +1599,16 @@ public class PhoneAccountRegistrar {
            return BitmapFactory.decodeByteArray(imageByteArray, 0, imageByteArray.length);
        }

        @Nullable
        protected Icon readIcon(XmlPullParser parser) throws IOException {
            try {
                byte[] iconByteArray = Base64.decode(parser.getText(), 0);
                ByteArrayInputStream stream = new ByteArrayInputStream(iconByteArray);
                return Icon.createFromStream(stream);
            } catch (IllegalArgumentException e) {
                Log.e(this, e, "Bitmap must not be null.");
                return null;
            }
        }
    }