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

Commit b206f127 authored by Svetoslav's avatar Svetoslav
Browse files

Null not handled when parsing media size resource id attribute.

bug:10835715

Change-Id: I0c9c1120c26e68b4c582599bbda3753d0e443d8c
parent 562ce888
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1036,8 +1036,9 @@ public final class PrintSpoolerService extends Service {
                    final int heightMils = Integer.parseInt(parser.getAttributeValue(null,
                            ATTR_HEIGHT_MILS));
                    String packageName = parser.getAttributeValue(null, ATTR_PACKAGE_NAME);
                    final int labelResId = Integer.parseInt(parser.getAttributeValue(null,
                            ATTR_LABEL_RES_ID));
                    String labelResIdString = parser.getAttributeValue(null, ATTR_LABEL_RES_ID);
                    final int labelResId = (labelResIdString != null)
                            ? Integer.parseInt(labelResIdString) : 0;
                    label = parser.getAttributeValue(null, ATTR_LABEL);
                    MediaSize mediaSize = new MediaSize(id, label, packageName, labelResId,
                                widthMils, heightMils);