/cts/tests/tests/view/src/android/view/cts/util/ |
D | XmlUtils.java | 47 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/ |
D | XmlUtils.java | 48 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/content/src/android/content/cts/util/ |
D | XmlUtils.java | 50 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/graphics/src/android/graphics/drawable/cts/ |
D | PaintDrawableTest.java | 128 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 …]
|
D | DrawableTestUtils.java | 57 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 …]
|
D | LevelListDrawableTest.java | 136 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 …]
|
D | StateListDrawableTest.java | 210 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 …]
|
D | AnimationDrawableTest.java | 281 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 …]
|
D | AnimatedImageDrawableTest.java | 527 XmlPullParser parser = mRes.getXml(R.drawable.animatedimagedrawable_tag); in testCreateFromXml() local 528 Drawable drawable = Drawable.createFromXml(mRes, parser); in testCreateFromXml() 535 XmlPullParser parser = mRes.getXml(R.drawable.animatedimagedrawable); in testCreateFromXmlClass() local 536 Drawable drawable = Drawable.createFromXml(mRes, parser); in testCreateFromXmlClass() 543 XmlPullParser parser = mRes.getXml(R.drawable.animatedimagedrawable_class); in testCreateFromXmlClassAttribute() local 544 Drawable drawable = Drawable.createFromXml(mRes, parser); in testCreateFromXmlClassAttribute() 551 XmlPullParser parser = mRes.getXml(R.drawable.animatedimagedrawable_nosrc); in testMissingSrcInflate() local 552 Drawable drawable = Drawable.createFromXml(mRes, parser); in testMissingSrcInflate() 577 XmlPullParser parser = mRes.getXml(resId); in parseXml() local 578 Drawable drawable = Drawable.createFromXml(mRes, parser); in parseXml() [all …]
|
/cts/tests/signature/lib/android/src/android/signature/cts/ |
D | ApiDocumentParser.java | 79 XmlPullParser parser = factory.newPullParser(); in parseAsStream() local 80 parser.setInput(inputStream, null); in parseAsStream() 81 return StreamSupport.stream(new ClassDescriptionSpliterator(parser), false); in parseAsStream() 86 private final XmlPullParser parser; field in ApiDocumentParser.ClassDescriptionSpliterator 92 … ClassDescriptionSpliterator(XmlPullParser parser) throws IOException, XmlPullParserException { in ClassDescriptionSpliterator() argument 93 this.parser = parser; in ClassDescriptionSpliterator() 94 logd(String.format("Name: %s", parser.getName())); in ClassDescriptionSpliterator() 95 logd(String.format("Text: %s", parser.getText())); in ClassDescriptionSpliterator() 96 logd(String.format("Namespace: %s", parser.getNamespace())); in ClassDescriptionSpliterator() 97 logd(String.format("Line Number: %s", parser.getLineNumber())); in ClassDescriptionSpliterator() [all …]
|
D | CurrentApi.java | 78 static JDiffField loadFieldInfo(String className, XmlPullParser parser) { in loadFieldInfo() argument 79 String fieldName = parser.getAttributeValue(null, ATTRIBUTE_NAME); in loadFieldInfo() 80 String fieldType = parser.getAttributeValue(null, ATTRIBUTE_TYPE); in loadFieldInfo() 81 int modifier = jdiffModifierToReflectionFormat(className, parser); in loadFieldInfo() 82 String value = parser.getAttributeValue(null, ATTRIBUTE_VALUE); in loadFieldInfo() 93 static JDiffMethod loadMethodInfo(String className, XmlPullParser parser) { in loadMethodInfo() argument 94 String methodName = parser.getAttributeValue(null, ATTRIBUTE_NAME); in loadMethodInfo() 95 String returnType = parser.getAttributeValue(null, ATTRIBUTE_RETURN); in loadMethodInfo() 96 int modifier = jdiffModifierToReflectionFormat(className, parser); in loadMethodInfo() 108 XmlPullParser parser, JDiffClassDescription currentClass) { in loadConstructorInfo() argument [all …]
|
/cts/tools/release-parser/tests/ |
D | generate_golden_sample_files.sh | 13 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…
|
D | Android.bp | 15 // cts release-parser java unit test library 18 name: "release-parser-tests", 24 "release-parser",
|
/cts/tests/tests/view/src/android/view/cts/ |
D | LayoutInflaterTest.java | 110 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/tests/tests/widget/src/android/widget/cts/ |
D | TableLayout_LayoutParamsTest.java | 170 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 …]
|
D | TableRow_LayoutParamsTest.java | 194 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 …]
|
D | AbsoluteLayout_LayoutParamsTest.java | 53 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/ |
D | PermissionPolicyTest.java | 235 XmlPullParser parser = Xml.newPullParser(); in loadExpectedPermissions() local 236 parser.setInput(in, null); in loadExpectedPermissions() 238 final int outerDepth = parser.getDepth(); in loadExpectedPermissions() 240 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT in loadExpectedPermissions() 241 && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { in loadExpectedPermissions() 245 if (TAG_PERMISSION.equals(parser.getName())) { in loadExpectedPermissions() 247 parser.getAttributeValue(null, ATTR_NAME), in loadExpectedPermissions() 248 parser.getAttributeValue(null, ATTR_PERMISSION_GROUP), in loadExpectedPermissions() 249 parser.getAttributeValue(null, ATTR_BACKGROUND_PERMISSION), in loadExpectedPermissions() 251 parser.getAttributeValue(null, ATTR_PERMISSION_FLAGS)), in loadExpectedPermissions() [all …]
|
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ |
D | VintfFilesCollector.java | 82 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/hostsidetests/securitybulletin/securityPatch/CVE-2012-6702/ |
D | poc.c | 27 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/content/src/android/content/res/cts/ |
D | AssetManagerTest.java | 93 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()
|
D | TypedArrayTest.java | 92 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/seccomp/app/ |
D | gen_blacklist.py | 164 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/ |
D | FontScaleActivity.java | 47 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()
|
/cts/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/ |
D | MediaBitstreamsTest.java | 156 XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser(); in bitstreams() local 157 parser.setInput(is, null); in bitstreams() 158 parser.nextTag(); in bitstreams() 159 parser.require(XmlPullParser.START_TAG, null, MediaBitstreams.DYNAMIC_CONFIG); in bitstreams() 160 while (parser.next() != XmlPullParser.END_DOCUMENT) { in bitstreams() 161 if (parser.getEventType() != XmlPullParser.START_TAG in bitstreams() 162 || !MediaBitstreams.DYNAMIC_CONFIG_ENTRY.equals(parser.getName())) { in bitstreams() 166 String bitstream = parser.getAttributeValue(null, key); in bitstreams() 170 while (parser.next() != XmlPullParser.END_DOCUMENT) { in bitstreams() 171 if (parser.getEventType() != XmlPullParser.START_TAG) { in bitstreams() [all …]
|