Home
last modified time | relevance | path

Searched refs:parser (Results 1 – 25 of 316) sorted by relevance

12345678910>>...13

/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/model/
DRoleParser.java152 try (XmlResourceParser parser = sGetRolesXml.apply(mContext)) { in parse() argument
153 Pair<ArrayMap<String, PermissionSet>, ArrayMap<String, Role>> xml = parseXml(parser); in parse()
169 @NonNull XmlResourceParser parser) throws IOException, XmlPullParserException { in parseXml()
174 int innerDepth = parser.getDepth() + 1; in parseXml()
175 while ((type = parser.next()) != XmlResourceParser.END_DOCUMENT in parseXml()
176 && ((depth = parser.getDepth()) >= innerDepth in parseXml()
182 if (parser.getName().equals(TAG_ROLES)) { in parseXml()
185 skipCurrentTag(parser); in parseXml()
188 xml = parseRoles(parser); in parseXml()
190 throwOrLogForUnknownTag(parser); in parseXml()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DXmlUtilHelper.java62 public static void skipCurrentTag(XmlPullParser parser) in skipCurrentTag() argument
64 int outerDepth = parser.getDepth(); in skipCurrentTag()
66 while ((type=parser.next()) != XmlPullParser.END_DOCUMENT in skipCurrentTag()
68 || parser.getDepth() > outerDepth)) { in skipCurrentTag()
746 XmlPullParser parser = Xml.newPullParser(); in readMapXml() local
747 parser.setInput(in, StandardCharsets.UTF_8.name()); in readMapXml()
748 return (HashMap<String, ?>) readValueXml(parser, new String[1]); in readMapXml()
767 XmlPullParser parser = Xml.newPullParser(); in readListXml() local
768 parser.setInput(in, StandardCharsets.UTF_8.name()); in readListXml()
769 return (ArrayList)readValueXml(parser, new String[1]); in readListXml()
[all …]
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/
DHbpcdLookupDatabaseHelper.java160 XmlResourceParser parser = r.getXml(R.xml.hbpcd_lookup_tables); in initDatabase() local
162 if (parser == null) { in initDatabase()
167 XmlUtils.beginDocument(parser, "hbpcd_info"); in initDatabase()
169 int eventType = parser.getEventType(); in initDatabase()
170 String tagName = parser.getName(); in initDatabase()
175 String tableName = parser.getAttributeValue(null, "name"); in initDatabase()
176 loadTable(db, parser, tableName); in initDatabase()
178 parser.next(); in initDatabase()
179 eventType = parser.getEventType(); in initDatabase()
180 tagName = parser.getName(); in initDatabase()
[all …]
/packages/apps/TV/src/com/android/tv/parental/
DContentRatingsParser.java75 try (XmlResourceParser parser = in parse() argument
77 if (parser == null) { in parse()
80 ratingSystems = parse(parser, packageName, !info.isSystemDefined()); in parse()
92 XmlResourceParser parser, String domain, boolean isCustom) in parse() argument
109 while (parser.next() == XmlPullParser.START_DOCUMENT) {} in parse()
111 int eventType = parser.getEventType(); in parse()
114 parser.getName(), in parse()
119 for (int i = 0; i < parser.getAttributeCount(); i++) { in parse()
120 String attr = parser.getAttributeName(i); in parse()
123 mXmlVersionCode = parser.getAttributeValue(i); in parse()
[all …]
/packages/services/Car/service/src/com/android/car/audio/
DCarAudioZonesHelper.java190 XmlPullParser parser = Xml.newPullParser(); in parseCarAudioZones() local
191 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, NAMESPACE != null); in parseCarAudioZones()
192 parser.setInput(stream, null); in parseCarAudioZones()
195 parser.nextTag(); in parseCarAudioZones()
196 parser.require(XmlPullParser.START_TAG, NAMESPACE, TAG_ROOT); in parseCarAudioZones()
200 parser.getAttributeValue(NAMESPACE, ATTR_VERSION)); in parseCarAudioZones()
209 while (parser.next() != XmlPullParser.END_TAG) { in parseCarAudioZones()
210 if (parser.getEventType() != XmlPullParser.START_TAG) continue; in parseCarAudioZones()
211 if (TAG_OEM_CONTEXTS.equals(parser.getName())) { in parseCarAudioZones()
212 parseCarAudioContexts(parser); in parseCarAudioZones()
[all …]
/packages/services/Car/tests/CarTelemetryApp/src/com/android/car/cartelemetryapp/
DConfigParser.java105 Map<String, MetricsConfig> getConfigs(@NonNull XmlPullParser parser) { in getConfigs() argument
108 int eventType = parser.getEventType(); in getConfigs()
110 if (eventType == XmlPullParser.START_TAG && Objects.equals(parser.getName(), in getConfigs()
112 MetricsConfig config = parseMetricsConfig(parser); in getConfigs()
117 eventType = parser.next(); in getConfigs()
120 log("Error parsing XML file! " + parser.getPositionDescription() in getConfigs()
129 private MetricsConfig parseMetricsConfig(@NonNull XmlPullParser parser) in parseMetricsConfig() argument
132 String name = parser.getAttributeValue(null, CONFIG_NAME_ATTR); in parseMetricsConfig()
134 log("Config name cannot be empty at " + parser.getPositionDescription()); in parseMetricsConfig()
138 String version = parser.getAttributeValue(null, CONFIG_VERSION_ATTR); in parseMetricsConfig()
[all …]
/packages/modules/Permission/SafetyCenter/Config/java/com/android/safetycenter/config/
DSafetyCenterConfigParser.java107 XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser(); in parseXmlResource() local
108 parser.setFeature(FEATURE_PROCESS_NAMESPACES, true); in parseXmlResource()
109 parser.setInput(in, null); in parseXmlResource()
110 if (parser.getEventType() != START_DOCUMENT) { in parseXmlResource()
113 parser.nextTag(); in parseXmlResource()
114 validateElementStart(parser, TAG_SAFETY_CENTER_CONFIG); in parseXmlResource()
115 SafetyCenterConfig safetyCenterConfig = parseSafetyCenterConfig(parser, resources); in parseXmlResource()
116 if (parser.getEventType() == TEXT && parser.isWhitespace()) { in parseXmlResource()
117 parser.next(); in parseXmlResource()
119 if (parser.getEventType() != END_DOCUMENT) { in parseXmlResource()
[all …]
/packages/apps/Dialer/java/com/android/voicemail/impl/utils/
DXmlUtils.java29 XmlPullParser parser, String endTag, String[] name, ReadMapCallback callback) in readThisArrayMapXml() argument
33 int eventType = parser.getEventType(); in readThisArrayMapXml()
36 Object val = readThisValueXml(parser, name, callback, true); in readThisArrayMapXml()
39 if (parser.getName().equals(endTag)) { in readThisArrayMapXml()
42 throw new XmlPullParserException("Expected " + endTag + " end tag at: " + parser.getName()); in readThisArrayMapXml()
44 eventType = parser.next(); in readThisArrayMapXml()
61 XmlPullParser parser, in readThisListXml() argument
69 int eventType = parser.getEventType(); in readThisListXml()
72 Object val = readThisValueXml(parser, name, callback, arrayMap); in readThisListXml()
75 if (parser.getName().equals(endTag)) { in readThisListXml()
[all …]
/packages/services/Car/tests/OemCarServiceTestApp/src/com/android/car/oem/utils/
DOemCarServiceHelper.java87 XmlPullParser parser = Xml.newPullParser(); in parseAudioManagementConfiguration() local
88 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, NO_NAMESPACE != null); in parseAudioManagementConfiguration()
89 parser.setInput(inputStream, /* inputEncoding= */ null); in parseAudioManagementConfiguration()
92 parser.next(); in parseAudioManagementConfiguration()
94 parser.require(XmlPullParser.START_TAG, NO_NAMESPACE, NO_TAG); in parseAudioManagementConfiguration()
95 String parserName = parser.getName(); in parseAudioManagementConfiguration()
102 while (parser.next() != XmlPullParser.END_TAG) { in parseAudioManagementConfiguration()
103 if (parser.getEventType() != XmlPullParser.START_TAG) continue; in parseAudioManagementConfiguration()
104 String currentTag = parser.getName(); in parseAudioManagementConfiguration()
107 mVolumePriorities = parseVolumePriority(parser); in parseAudioManagementConfiguration()
[all …]
/packages/services/Car/service/src/com/android/car/
DCarUxRestrictionsConfigurationXmlParser.java120 XmlResourceParser parser = mContext.getResources().getXml(xmlResource); in parse() local
121 if (parser == null) { in parse()
126 if (!traverseUntilStartTag(parser)) { in parse()
127 Slogf.e(TAG, "XML root element invalid: " + parser.getName()); in parse()
131 if (!traverseUntilEndOfDocument(parser)) { in parse()
146 private boolean traverseUntilStartTag(XmlResourceParser parser) in traverseUntilStartTag() argument
150 while ((type = parser.next()) != XmlResourceParser.END_DOCUMENT in traverseUntilStartTag()
154 return XML_ROOT_ELEMENT.equals(parser.getName()); in traverseUntilStartTag()
157 private boolean traverseUntilEndOfDocument(XmlResourceParser parser) in traverseUntilEndOfDocument() argument
159 while (parser.getEventType() != XmlResourceParser.END_DOCUMENT) { in traverseUntilEndOfDocument()
[all …]
/packages/modules/Permission/SafetyCenter/Persistence/java/com/android/safetycenter/persistence/
DSafetyCenterIssuesPersistence.java84 XmlPullParser parser = Xml.newPullParser(); in read() local
86 parser.setFeature(FEATURE_PROCESS_NAMESPACES, true); in read()
87 parser.setInput(inputStream, null); in read()
88 return unmodifiableList(parseXml(parser)); in read()
97 private static List<PersistedSafetyCenterIssue> parseXml(XmlPullParser parser) in parseXml() argument
99 if (parser.getEventType() != START_DOCUMENT) { in parseXml()
102 parser.nextTag(); in parseXml()
103 validateElementStart(parser, TAG_ISSUES); in parseXml()
104 List<PersistedSafetyCenterIssue> persistedSafetyCenterIssues = parseIssues(parser); in parseXml()
105 while (parser.getEventType() == TEXT && parser.isWhitespace()) { in parseXml()
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/util/
DFrameParserTest.java140 FrameParser parser = new FrameParser( in parseProbeResponseFrame() local
142 assertEquals(TEST_PROBE_RESPONSE_FRAME_PROTOCOL_STRING, parser.mMostSpecificProtocolString); in parseProbeResponseFrame()
143 assertEquals(TEST_PROBE_RESPONSE_FRAME_TYPE_STRING, parser.mTypeString); in parseProbeResponseFrame()
165 FrameParser parser = new FrameParser( in canParseStatusCodeOutOfNonHtOpenAuthenticationReply() local
179 assertEquals("802.11 Mgmt", parser.mMostSpecificProtocolString); in canParseStatusCodeOutOfNonHtOpenAuthenticationReply()
180 assertEquals("Authentication", parser.mTypeString); in canParseStatusCodeOutOfNonHtOpenAuthenticationReply()
181 assertEquals("17: Association denied; too many STAs", parser.mResultString); in canParseStatusCodeOutOfNonHtOpenAuthenticationReply()
187 FrameParser parser = new FrameParser( in canParseStatusCodeOutOfNonHtAssociationResponse() local
212 assertEquals("802.11 Mgmt", parser.mMostSpecificProtocolString); in canParseStatusCodeOutOfNonHtAssociationResponse()
213 assertEquals("Association Response", parser.mTypeString); in canParseStatusCodeOutOfNonHtAssociationResponse()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/
DAppManifestConfigParser.java55 public static AppManifestConfig getConfig(@NonNull XmlResourceParser parser) in getConfig() argument
66 parser.next(); in getConfig()
67 parser.next(); in getConfig()
68 parser.require(XmlPullParser.START_TAG, null, TAG_AD_SERVICES_CONFIG); in getConfig()
69 parser.next(); in getConfig()
72 while (parser.getEventType() != XmlResourceParser.END_DOCUMENT) { in getConfig()
73 if (parser.getEventType() != XmlResourceParser.START_TAG) { in getConfig()
74 parser.next(); in getConfig()
77 for (int i = 0; i < parser.getAttributeCount(); i++) { in getConfig()
78 String attr = parser.getAttributeName(i); in getConfig()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/
DKeyboardBuilder.java170 final XmlResourceParser parser = mResources.getXml(xmlId); in load() local
172 parseKeyboard(parser); in load()
180 parser.close(); in load()
219 private void parseKeyboard(final XmlPullParser parser) in parseKeyboard() argument
222 while (parser.getEventType() != XmlPullParser.END_DOCUMENT) { in parseKeyboard()
223 final int event = parser.next(); in parseKeyboard()
225 final String tag = parser.getName(); in parseKeyboard()
227 parseKeyboardAttributes(parser); in parseKeyboard()
229 parseKeyboardContent(parser, false); in parseKeyboard()
232 throw new XmlParseUtils.IllegalStartTag(parser, tag, TAG_KEYBOARD); in parseKeyboard()
[all …]
/packages/apps/TV/tuner/src/com/android/tv/tuner/hdhomerun/
DHdHomeRunChannelScan.java93 XmlPullParser parser = Xml.newPullParser(); in scan() local
95 parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false); in scan()
96 parser.setInput(inputStream, null); in scan()
97 parser.nextTag(); in scan()
98 parser.require(XmlPullParser.START_TAG, null, NAME_LINEUP); in scan()
99 while (parser.next() != XmlPullParser.END_TAG) { in scan()
103 if (parser.getEventType() != XmlPullParser.START_TAG) { in scan()
106 String name = parser.getName(); in scan()
109 readProgram(parser); in scan()
111 skip(parser); in scan()
[all …]
/packages/services/Telephony/src/com/android/phone/
DCarrierXmlParser.java435 XmlResourceParser parser = context.getResources().getXml(xmlResId); in CarrierXmlParser() local
436 mFeatureMaps = parseXml(parser); in CarrierXmlParser()
442 private HashMap<String, SsFeature> parseXml(XmlResourceParser parser) throws IOException { in parseXml() argument
445 int eventType = parser.getEventType(); in parseXml()
448 if (TAG_REGULAR_PARSER.equals(parser.getName())) { in parseXml()
449 sParserFormat = readText(parser); in parseXml()
451 } else if (TAG_FEATURE.equals(parser.getName())) { in parseXml()
452 String featureName = getSpecificAttributeValue(parser, ATTR_NAME); in parseXml()
454 SsFeature feature = generateFeatureList(parser); in parseXml()
460 parser.next(); in parseXml()
[all …]
/packages/apps/CarrierConfig/tests/src/com/android/carrierconfig/
DCarrierConfigTest.java56 public void check(XmlPullParser parser, String mccmnc) throws XmlPullParserException, in testAllFilesParse()
58 PersistableBundle b = DefaultCarrierConfigService.readConfigFromXml(parser, in testAllFilesParse()
71 public void check(XmlPullParser parser, String mccmnc) throws XmlPullParserException, in testFilterValidAttributes()
74 while (((event = parser.next()) != XmlPullParser.END_DOCUMENT)) { in testFilterValidAttributes()
76 && "carrier_config".equals(parser.getName())) { in testFilterValidAttributes()
77 for (int i = 0; i < parser.getAttributeCount(); ++i) { in testFilterValidAttributes()
78 String attribute = parser.getAttributeName(i); in testFilterValidAttributes()
96 + "' at " + parser.getPositionDescription()); in testFilterValidAttributes()
113 public void check(XmlPullParser parser, String mccmnc) throws XmlPullParserException, in testCarrierConfigFileNaming()
120 while (((event = parser.next()) != XmlPullParser.END_DOCUMENT)) { in testCarrierConfigFileNaming()
[all …]
/packages/services/Car/tests/CarTelemetryApp/tests/src/com/android/car/
DConfigParserTest.java104 XmlPullParser parser = createParserForXML(configXML); in test_parseConfigReturnsCorrectMetricsConfig() local
105 assertWithMessage("Failed to obtain parser from XML.").that(parser).isNotNull(); in test_parseConfigReturnsCorrectMetricsConfig()
106 Map<String, MetricsConfig> configs = mConfigParser.getConfigs(parser); in test_parseConfigReturnsCorrectMetricsConfig()
173 XmlPullParser parser = createParserForXML(configXML); in test_emptyOrNoConfigNameReturnsNoConfig() local
174 assertWithMessage("Failed to obtain parser from XML.").that(parser).isNotNull(); in test_emptyOrNoConfigNameReturnsNoConfig()
175 Map<String, MetricsConfig> configs = mConfigParser.getConfigs(parser); in test_emptyOrNoConfigNameReturnsNoConfig()
215 XmlPullParser parser = createParserForXML(configXML); in test_malformedOrNoConfigVersionReturnsNoConfig() local
216 assertWithMessage("Failed to obtain parser from XML.").that(parser).isNotNull(); in test_malformedOrNoConfigVersionReturnsNoConfig()
217 Map<String, MetricsConfig> configs = mConfigParser.getConfigs(parser); in test_malformedOrNoConfigVersionReturnsNoConfig()
257 XmlPullParser parser = createParserForXML(configXML); in test_emptyOrNoConfigScriptNameReturnsNoConfig() local
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/
DAutoInstallsLayout.java225 protected int parseLayout(XmlPullParser parser, IntArray screenIds) in parseLayout() argument
227 beginDocument(parser, mRootTag); in parseLayout()
228 final int depth = parser.getDepth(); in parseLayout()
233 while (((type = parser.next()) != XmlPullParser.END_TAG || in parseLayout()
234 parser.getDepth() > depth) && type != XmlPullParser.END_DOCUMENT) { in parseLayout()
238 count += parseAndAddNode(parser, tagParserMap, screenIds); in parseLayout()
247 protected void parseContainerAndScreen(XmlPullParser parser, int[] out) { in parseContainerAndScreen() argument
248 if (HOTSEAT_CONTAINER_NAME.equals(getAttributeValue(parser, ATTR_CONTAINER))) { in parseContainerAndScreen()
251 out[1] = Integer.parseInt(getAttributeValue(parser, ATTR_RANK)); in parseContainerAndScreen()
254 out[1] = Integer.parseInt(getAttributeValue(parser, ATTR_SCREEN)); in parseContainerAndScreen()
[all …]
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/permission/
DGrantTimeXmlHelper.java89 XmlPullParser parser = Xml.newPullParser(); in parseGrantTime() local
90 parser.setInput(inputStream, /* inputEncoding= */ null); in parseGrantTime()
91 return parseXml(parser); in parseGrantTime()
101 private static UserGrantTimeState parseXml(@NonNull XmlPullParser parser) in parseXml() argument
103 int targetDepth = parser.getDepth() + 1; in parseXml()
104 int type = parser.next(); in parseXml()
108 && (parser.getDepth() >= targetDepth || type != XmlPullParser.END_TAG)) { in parseXml()
109 if (parser.getDepth() > targetDepth || type != XmlPullParser.START_TAG) { in parseXml()
110 type = parser.next(); in parseXml()
114 if (parser.getName().equals(TAG_FIRST_GRANT_TIMES)) { in parseXml()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DXmlParseUtils.java33 public ParseException(final String msg, final XmlPullParser parser) { in ParseException() argument
34 super(msg + " at " + parser.getPositionDescription()); in ParseException()
40 public IllegalStartTag(final XmlPullParser parser, final String tag, final String parent) { in IllegalStartTag() argument
41 super("Illegal start tag " + tag + " in " + parent, parser); in IllegalStartTag()
47 public IllegalEndTag(final XmlPullParser parser, final String tag, final String parent) { in IllegalEndTag() argument
48 super("Illegal end tag " + tag + " in " + parent, parser); in IllegalEndTag()
54 public IllegalAttribute(final XmlPullParser parser, final String tag, in IllegalAttribute() argument
56 super("Tag " + tag + " has illegal attribute " + attribute, parser); in IllegalAttribute()
62 public NonEmptyTag(final XmlPullParser parser, final String tag) { in NonEmptyTag() argument
63 super(tag + " must be empty tag", parser); in NonEmptyTag()
[all …]
/packages/modules/Bluetooth/tools/pdl/tests/canonical/
Dle_test_file.pdl67 // The parser must be able to handle bit fields with scalar values
68 // up to 64 bits wide. The parser should generate a static size guard.
74 // The parser must be able to handle bit fields with enum values
75 // up to 64 bits wide. The parser should generate a static size guard.
81 // The parser must be able to handle bit fields with reserved fields
82 // up to 64 bits wide. The parser should generate a static size guard.
89 // The parser must be able to handle bit fields with size fields
90 // up to 64 bits wide. The parser should generate a static size guard.
97 // The parser must be able to handle bit fields with count fields
98 // up to 64 bits wide. The parser should generate a static size guard.
[all …]
Dle_rust_noalloc_test_file.pdl52 // The parser must be able to handle bit fields with scalar values
53 // up to 64 bits wide. The parser should generate a static size guard.
59 // The parser must be able to handle bit fields with enum values
60 // up to 64 bits wide. The parser should generate a static size guard.
66 // The parser must be able to handle bit fields with reserved fields
67 // up to 64 bits wide. The parser should generate a static size guard.
74 // The parser must be able to handle bit fields with size fields
75 // up to 64 bits wide. The parser should generate a static size guard.
82 // The parser must be able to handle bit fields with count fields
83 // up to 64 bits wide. The parser should generate a static size guard.
[all …]
Dle_rust_test_file.pdl43 // The parser must be able to handle bit fields with scalar values
44 // up to 64 bits wide. The parser should generate a static size guard.
50 // The parser must be able to handle bit fields with enum values
51 // up to 64 bits wide. The parser should generate a static size guard.
57 // The parser must be able to handle bit fields with reserved fields
58 // up to 64 bits wide. The parser should generate a static size guard.
65 // The parser must be able to handle bit fields with size fields
66 // up to 64 bits wide. The parser should generate a static size guard.
73 // The parser must be able to handle bit fields with count fields
74 // up to 64 bits wide. The parser should generate a static size guard.
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/responsive/
DResponsiveSpecsParser.kt30 private fun parseSizeSpecs(parser: XmlResourceParser): Map<String, SizeSpec> { in parseSizeSpecs()
31 val parentName = parser.name in parseSizeSpecs()
32 parser.next() in parseSizeSpecs()
35 while (parser.eventType != XmlPullParser.END_DOCUMENT && parser.name != parentName) { in parseSizeSpecs()
36 if (parser.eventType == XmlResourceParser.START_TAG) { in parseSizeSpecs()
37 result[parser.name] = SizeSpec.create(resourceHelper, Xml.asAttributeSet(parser)) in parseSizeSpecs()
39 parser.next() in parseSizeSpecs()
49 val parser: XmlResourceParser = resourceHelper.getXml() in parseXML() constant
54 var eventType = parser.eventType in parseXML()
56 if (eventType == XmlResourceParser.START_TAG && parser.name == tagName) { in parseXML()
[all …]

12345678910>>...13