Home
last modified time | relevance | path

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

123456

/cts/tests/tests/content/src/android/content/cts/util/
DXmlUtils.java50 public static void skipCurrentTag(XmlPullParser parser) in skipCurrentTag() argument
52 int outerDepth = parser.getDepth(); in skipCurrentTag()
54 while ((type=parser.next()) != XmlPullParser.END_DOCUMENT in skipCurrentTag()
56 || parser.getDepth() > outerDepth)) { in skipCurrentTag()
737 XmlPullParser parser = Xml.newPullParser(); in readMapXml() local
738 parser.setInput(in, StandardCharsets.UTF_8.name()); in readMapXml()
739 return (HashMap<String, ?>) readValueXml(parser, new String[1]); in readMapXml()
758 XmlPullParser parser = Xml.newPullParser(); in readListXml() local
759 parser.setInput(in, StandardCharsets.UTF_8.name()); in readListXml()
760 return (ArrayList)readValueXml(parser, new String[1]); in readListXml()
[all …]
/cts/tests/tests/view/src/android/view/cts/util/
DXmlUtils.java47 public static void skipCurrentTag(XmlPullParser parser) in skipCurrentTag() argument
49 int outerDepth = parser.getDepth(); in skipCurrentTag()
51 while ((type=parser.next()) != XmlPullParser.END_DOCUMENT in skipCurrentTag()
53 || parser.getDepth() > outerDepth)) { in skipCurrentTag()
709 XmlPullParser parser = Xml.newPullParser(); in readMapXml() local
710 parser.setInput(in, StandardCharsets.UTF_8.name()); in readMapXml()
711 return (HashMap<String, ?>) readValueXml(parser, new String[1]); in readMapXml()
730 XmlPullParser parser = Xml.newPullParser(); in readListXml() local
731 parser.setInput(in, StandardCharsets.UTF_8.name()); in readListXml()
732 return (ArrayList)readValueXml(parser, new String[1]); in readListXml()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/util/
DXmlUtils.java48 public static void skipCurrentTag(XmlPullParser parser) in skipCurrentTag() argument
50 int outerDepth = parser.getDepth(); in skipCurrentTag()
52 while ((type=parser.next()) != XmlPullParser.END_DOCUMENT in skipCurrentTag()
54 || parser.getDepth() > outerDepth)) { in skipCurrentTag()
710 XmlPullParser parser = Xml.newPullParser(); in readMapXml() local
711 parser.setInput(in, StandardCharsets.UTF_8.name()); in readMapXml()
712 return (HashMap<String, ?>) readValueXml(parser, new String[1]); in readMapXml()
731 XmlPullParser parser = Xml.newPullParser(); in readListXml() local
732 parser.setInput(in, StandardCharsets.UTF_8.name()); in readListXml()
733 return (ArrayList)readValueXml(parser, new String[1]); in readListXml()
[all …]
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DPaintDrawableTest.java128 XmlResourceParser parser = getParser(); in testInflateTag() local
129 AttributeSet attr = getAttributeSet(parser); in testInflateTag()
131 gotoTag(parser, "padding"); in testInflateTag()
140 assertTrue(paintDrawable.inflateTag("padding", mResources, parser, attr)); in testInflateTag()
144 parser = getParser(); in testInflateTag()
145 attr = getAttributeSet(parser); in testInflateTag()
147 assertFalse(new MyPaintDrawable().inflateTag("", mResources, parser, attr)); in testInflateTag()
152 new MyPaintDrawable().inflateTag(null, mResources, parser, attr); in testInflateTag()
160 gotoTag(parser, "padding"); in testInflateTag()
161 new MyPaintDrawable().inflateTag("padding", null, parser, attr); in testInflateTag()
[all …]
DDrawableTestUtils.java57 public static void skipCurrentTag(XmlPullParser parser) in skipCurrentTag() argument
59 int outerDepth = parser.getDepth(); in skipCurrentTag()
61 while ((type=parser.next()) != XmlPullParser.END_DOCUMENT in skipCurrentTag()
63 || parser.getDepth() > outerDepth)) { in skipCurrentTag()
76 public static AttributeSet getAttributeSet(XmlResourceParser parser, String searchedNodeName) in getAttributeSet() argument
80 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttributeSet()
83 String nodeName = parser.getName(); in getAttributeSet()
87 int outerDepth = parser.getDepth(); in getAttributeSet()
88 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttributeSet()
89 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in getAttributeSet()
[all …]
DLevelListDrawableTest.java136 XmlResourceParser parser = getResourceParser(R.xml.level_list_correct); in testInflate() local
139 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
151 parser = getResourceParser(R.xml.level_list_missing_item_minlevel_maxlevel); in testInflate()
152 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
163 XmlResourceParser parser = getResourceParser(R.xml.level_list_missing_item_drawable); in testInflateMissingContent() local
165 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateMissingContent()
170 XmlResourceParser parser = getResourceParser(R.xml.level_list_correct); in testInflateWithNullResources() local
172 mLevelListDrawable.inflate(null, parser, Xml.asAttributeSet(parser)); in testInflateWithNullResources()
178 XmlResourceParser parser = getResourceParser(R.xml.level_list_correct); in testInflateWithNullParser() local
180 mLevelListDrawable.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateWithNullParser()
[all …]
DStateListDrawableTest.java210 final XmlResourceParser parser = getResourceParser(drawableResId); in verifyPreloadDensityTestForDrawableInner() local
212 preloadedDrawable.inflate(res, parser, Xml.asAttributeSet(parser)); in verifyPreloadDensityTestForDrawableInner()
265 XmlResourceParser parser = getResourceParser(R.xml.selector_correct); in testInflate() local
268 mMockDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
289 parser = getResourceParser(R.xml.selector_missing_selector_attrs); in testInflate()
290 mMockDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
307 parser = getResourceParser(R.xml.selector_missing_item_drawable); in testInflate()
309 mMockDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
317 XmlResourceParser parser = getResourceParser(R.xml.level_list_correct); in testInflateWithNullResources() local
319 mMockDrawable.inflate(null, parser, Xml.asAttributeSet(parser)); in testInflateWithNullResources()
[all …]
DAnimationDrawableTest.java281 XmlResourceParser parser = getResourceParser(R.xml.anim_list_correct); in testInflateCorrect() local
283 dr.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateCorrect()
300 XmlResourceParser parser = getResourceParser(R.xml.anim_list_missing_item_drawable); in testInflateMissingDrawable() local
303 dr.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateMissingDrawable()
312 XmlResourceParser parser = getResourceParser(R.drawable.animationdrawable); in testInflateNullResources() local
315 dr.inflate(null, parser, Xml.asAttributeSet(parser)); in testInflateNullResources()
320 XmlResourceParser parser = getResourceParser(R.drawable.animationdrawable); in testInflateNullXmlPullParser() local
323 dr.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateNullXmlPullParser()
328 XmlResourceParser parser = getResourceParser(R.drawable.animationdrawable); in testInflateNullAttributeSet() local
331 dr.inflate(mResources, parser, null); in testInflateNullAttributeSet()
[all …]
DAnimatedImageDrawableTest.java530 XmlPullParser parser = mRes.getXml(R.drawable.animatedimagedrawable_tag); in testCreateFromXml() local
531 Drawable drawable = Drawable.createFromXml(mRes, parser); in testCreateFromXml()
538 XmlPullParser parser = mRes.getXml(R.drawable.animatedimagedrawable); in testCreateFromXmlClass() local
539 Drawable drawable = Drawable.createFromXml(mRes, parser); in testCreateFromXmlClass()
546 XmlPullParser parser = mRes.getXml(R.drawable.animatedimagedrawable_class); in testCreateFromXmlClassAttribute() local
547 Drawable drawable = Drawable.createFromXml(mRes, parser); in testCreateFromXmlClassAttribute()
554 XmlPullParser parser = mRes.getXml(R.drawable.animatedimagedrawable_nosrc); in testMissingSrcInflate() local
555 Drawable drawable = Drawable.createFromXml(mRes, parser); in testMissingSrcInflate()
580 XmlPullParser parser = mRes.getXml(resId); in parseXml() local
581 Drawable drawable = Drawable.createFromXml(mRes, parser); in parseXml()
[all …]
/cts/tests/signature/lib/android/src/android/signature/cts/
DXmlApiParser.java138 JDiffClassDescription currentClass, XmlPullParser parser) { in loadFieldInfo() argument
139 String fieldName = parser.getAttributeValue(null, ATTRIBUTE_NAME); in loadFieldInfo()
140 String fieldType = canonicalizeType(parser.getAttributeValue(null, ATTRIBUTE_TYPE)); in loadFieldInfo()
141 int modifier = jdiffModifierToReflectionFormat(currentClass.getClassName(), parser); in loadFieldInfo()
142 String value = parser.getAttributeValue(null, ATTRIBUTE_VALUE); in loadFieldInfo()
234 private static JDiffMethod loadMethodInfo(String className, XmlPullParser parser) { in loadMethodInfo() argument
235 String methodName = parser.getAttributeValue(null, ATTRIBUTE_NAME); in loadMethodInfo()
236 String returnType = parser.getAttributeValue(null, ATTRIBUTE_RETURN); in loadMethodInfo()
237 int modifier = jdiffModifierToReflectionFormat(className, parser); in loadMethodInfo()
251 XmlPullParser parser, JDiffClassDescription currentClass) { in loadConstructorInfo() argument
[all …]
/cts/tests/tests/view/src/android/view/cts/
DLayoutInflaterTest.java110 XmlResourceParser parser = null; in getAttrs() local
118 parser = ai.loadXmlMetaData(mContext.getPackageManager(), in getAttrs()
121 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs()
124 String nodeName = parser.getName(); in getAttrs()
128 int outerDepth = parser.getDepth(); in getAttrs()
129 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs()
130 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in getAttrs()
134 nodeName = parser.getName(); in getAttrs()
136 attrs = Xml.asAttributeSet(parser); in getAttrs()
138 XmlUtils.skipCurrentTag(parser); in getAttrs()
[all …]
/cts/tools/release-parser/tests/
Dgenerate_golden_sample_files.sh13 echo Generating golden sample files for parser validation
17 …java -cp $ANDROID_HOST_OUT/framework/release-parser.jar com.android.cts.releaseparser.ApkParser -i…
23 …java -cp $ANDROID_HOST_OUT/framework/release-parser.jar com.android.cts.releaseparser.SoParser -i …
29 …java -cp $ANDROID_HOST_OUT/framework/release-parser.jar com.android.cts.releaseparser.SoParser -i …
35 …java -cp $ANDROID_HOST_OUT/framework/release-parser.jar com.android.cts.releaseparser.VdexParser -…
41 …java -cp $ANDROID_HOST_OUT/framework/release-parser.jar com.android.cts.releaseparser.OdexParser -…
47 …java -cp $ANDROID_HOST_OUT/framework/release-parser.jar com.android.cts.releaseparser.OatParser -i…
53 …java -cp $ANDROID_HOST_OUT/framework/release-parser.jar com.android.cts.releaseparser.ArtParser -i…
59 …java -cp $ANDROID_HOST_OUT/framework/release-parser.jar com.android.cts.releaseparser.XmlParser -i…
65 …java -cp $ANDROID_HOST_OUT/framework/release-parser.jar com.android.cts.releaseparser.BuildPropPar…
DAndroid.bp15 // cts release-parser java unit test library
18 name: "release-parser-tests",
24 "release-parser",
/cts/tests/tests/widget/src/android/widget/cts/
DTableLayout_LayoutParamsTest.java170 XmlResourceParser parser = null; in getAttrs() local
173 parser = mContext.getResources().getXml(R.xml.base_attributes); in getAttrs()
176 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs()
179 String nodeName = parser.getName(); in getAttrs()
183 int outerDepth = parser.getDepth(); in getAttrs()
184 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs()
185 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in getAttrs()
189 nodeName = parser.getName(); in getAttrs()
191 outerDepth = parser.getDepth(); in getAttrs()
192 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs()
[all …]
DTableRow_LayoutParamsTest.java194 XmlResourceParser parser = null; in getAttrs() local
197 parser = mActivity.getResources().getXml(R.xml.base_attributes); in getAttrs()
200 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs()
203 String nodeName = parser.getName(); in getAttrs()
207 int outerDepth = parser.getDepth(); in getAttrs()
208 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs()
209 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in getAttrs()
213 nodeName = parser.getName(); in getAttrs()
215 outerDepth = parser.getDepth(); in getAttrs()
216 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in getAttrs()
[all …]
DAbsoluteLayout_LayoutParamsTest.java53 XmlPullParser parser = mContext.getResources().getLayout(R.layout.absolute_layout); in getAttributeSet() local
54 WidgetTestUtils.beginDocument(parser, "LinearLayout"); in getAttributeSet()
55 return Xml.asAttributeSet(parser); in getAttributeSet()
/cts/tests/tests/permission2/src/android/permission2/cts/
DPermissionPolicyTest.java246 XmlPullParser parser = Xml.newPullParser(); in loadExpectedPermissions() local
247 parser.setInput(in, null); in loadExpectedPermissions()
249 final int outerDepth = parser.getDepth(); in loadExpectedPermissions()
251 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in loadExpectedPermissions()
252 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in loadExpectedPermissions()
256 if (TAG_PERMISSION.equals(parser.getName())) { in loadExpectedPermissions()
258 parser.getAttributeValue(null, ATTR_NAME), in loadExpectedPermissions()
259 parser.getAttributeValue(null, ATTR_PERMISSION_GROUP), in loadExpectedPermissions()
260 parser.getAttributeValue(null, ATTR_BACKGROUND_PERMISSION), in loadExpectedPermissions()
262 parser.getAttributeValue(null, ATTR_PERMISSION_FLAGS)), in loadExpectedPermissions()
[all …]
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/
DVintfFilesCollector.java82 XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser(); in guessFileName() local
83 parser.setInput(new StringReader(content)); in guessFileName()
85 for (int eventType = parser.getEventType(); eventType != XmlPullParser.END_DOCUMENT; in guessFileName()
86 eventType = parser.next()) { in guessFileName()
89 String tag = parser.getName(); in guessFileName()
90 if (parser.getDepth() != 1) { in guessFileName()
94 String type = parser.getAttributeValue(null, "type"); in guessFileName()
/cts/tests/tests/content/src/android/content/res/cts/
DAssetManagerTest.java93 XmlResourceParser parser = mAssets.openXmlResourceParser("AndroidManifest.xml"); in testAssetOperations() local
94 assertThat(parser).isNotNull(); in testAssetOperations()
95 XmlUtils.beginDocument(parser, "manifest"); in testAssetOperations()
96 parser = mAssets.openXmlResourceParser(0, "AndroidManifest.xml"); in testAssetOperations()
97 assertThat(parser).isNotNull(); in testAssetOperations()
98 beginDocument(parser, "manifest"); in testAssetOperations()
213 private void beginDocument(final XmlPullParser parser, final String firstElementName) in beginDocument() argument
216 while ((type = parser.next()) != XmlPullParser.START_TAG) { in beginDocument()
222 assertThat(firstElementName).isEqualTo(parser.getName()); in beginDocument()
DTypedArrayTest.java92 XmlResourceParser parser = in testSourceResourceIdFromLayout() local
95 final AttributeSet attrs = Xml.asAttributeSet(parser); in testSourceResourceIdFromLayout()
98 assertEquals(XmlPullParser.START_DOCUMENT, parser.next()); in testSourceResourceIdFromLayout()
99 assertEquals(XmlPullParser.START_TAG, parser.next()); in testSourceResourceIdFromLayout()
274 final XmlResourceParser parser = getContext().getResources().getXml(R.xml.test_color); in testNonResourceString() local
275 XmlUtils.beginDocument(parser, XML_BEGIN); in testNonResourceString()
276 final AttributeSet set = parser; in testNonResourceString()
284 parser.close(); in testNonResourceString()
289 try (final XmlResourceParser parser = resources.getXml(R.xml.empty)) { in testEmptyXmlAttributeDoesNotFallbackToTheme() argument
290 XmlUtils.beginDocument(parser, "element"); in testEmptyXmlAttributeDoesNotFallbackToTheme()
[all …]
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2012-6702/
Dpoc.c27 XML_Parser parser; in main() local
33 parser = XML_ParserCreate("UTF-8"); in main()
34 XML_Parse(parser, "", 0, 1); in main()
35 XML_ParserFree(parser); in main()
/cts/tests/tests/security/src/android/security/cts/
DAssetManagerTest.java31 final XmlResourceParser[] parser = {null}; in testCloseThenFinalize() local
33 parser[0] = assetManager[0].openXmlResourceParser( in testCloseThenFinalize()
42 parser[0] = null; in testCloseThenFinalize()
/cts/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/
DMediaBitstreamsTest.java161 XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser(); in bitstreams() local
162 parser.setInput(is, null); in bitstreams()
163 parser.nextTag(); in bitstreams()
164 parser.require(XmlPullParser.START_TAG, null, MediaBitstreams.DYNAMIC_CONFIG); in bitstreams()
165 while (parser.next() != XmlPullParser.END_DOCUMENT) { in bitstreams()
166 if (parser.getEventType() != XmlPullParser.START_TAG in bitstreams()
167 || !MediaBitstreams.DYNAMIC_CONFIG_ENTRY.equals(parser.getName())) { in bitstreams()
171 String bitstream = parser.getAttributeValue(null, key); in bitstreams()
175 while (parser.next() != XmlPullParser.END_DOCUMENT) { in bitstreams()
176 if (parser.getEventType() != XmlPullParser.START_TAG) { in bitstreams()
[all …]
/cts/hostsidetests/seccomp/app/
Dgen_blacklist.py164 parser = argparse.ArgumentParser('syscall name to number generator')
165 parser.add_argument('--allowed', metavar='path/to/json', type=str)
166 parser.add_argument('--blocked', metavar='path/to/json', type=str)
167 args = parser.parse_args()
/cts/tests/framework/base/windowmanager/app/src/android/server/wm/app/
DFontScaleActivity.java47 try (XmlResourceParser parser = getResources().getXml(R.layout.font_scale)) { in dumpFontSize() argument
49 while (parser.next() != XmlPullParser.START_TAG) { } in dumpFontSize()
51 final AttributeSet attrs = Xml.asAttributeSet(parser); in dumpFontSize()

123456