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

Commit 9a1ad06a authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Handle potential IllegalArgumentException in Telecom am: 6f02de08

Change-Id: I22ba11ea7ea5e91b5c4bf1b14323bdbc10495bf8
parents 3e362f86 6f02de08
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;
            }
        }
    }