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

Commit ac3f10f1 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Fix invalid API use of XmlPullParser.getAttributeValue.

The 1st argument of the getAttributeValue is a namespace of the xml.

Bug: 10861108
Change-Id: I73fd15eca7101b745870ca7b6509b1dbfcc9b0d7
parent f0fc0c83
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -114,7 +114,8 @@ public class FontListParser {
            if (parser.getEventType() != XmlPullParser.START_TAG) continue;
            String tag = parser.getName();
            if (tag.equals("font")) {
                int ttcIndex = Integer.parseInt(parser.getAttributeValue("0", "ttcIndex"));
                String ttcIndexStr = parser.getAttributeValue(null, "ttcIndex");
                int ttcIndex = ttcIndexStr == null ? 0 : Integer.parseInt(ttcIndexStr);
                String weightStr = parser.getAttributeValue(null, "weight");
                int weight = weightStr == null ? 400 : Integer.parseInt(weightStr);
                boolean isItalic = "italic".equals(parser.getAttributeValue(null, "style"));