Home
last modified time | relevance | path

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

123456

/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/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/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 …]
/cts/tests/tests/hardware/src/android/hardware/input/cts/
DGlobalKeyMapping.java53 try (XmlResourceParser parser = context.getResources().getXml( in loadGlobalKeys() argument
55 beginDocument(parser, TAG_GLOBAL_KEYS); in loadGlobalKeys()
56 int version = parser.getAttributeIntValue(null, ATTR_VERSION, 0); in loadGlobalKeys()
59 nextElement(parser); in loadGlobalKeys()
60 String element = parser.getName(); in loadGlobalKeys()
65 String keyCodeName = parser.getAttributeValue(null, ATTR_KEY_CODE); in loadGlobalKeys()
91 private void nextElement(XmlPullParser parser) throws XmlPullParserException, IOException { in nextElement() argument
93 while ((type = parser.next()) != parser.START_TAG && type != parser.END_DOCUMENT) { in nextElement()
99 private void beginDocument(XmlPullParser parser, String firstElementName) in beginDocument() argument
102 while ((type = parser.next()) != parser.START_TAG && type != parser.END_DOCUMENT) { in beginDocument()
[all …]
/cts/tests/tests/mediatranscoding/src/android/media/mediatranscoding/cts/
DApplicationMediaCapabilitiesTest.java96 XmlResourceParser parser = mContext.getResources().getXml(R.xml.mediacapabilities); in testReadMediaCapabilitiesXml() local
98 parser); in testReadMediaCapabilitiesXml()
109 final XmlPullParser parser = Xml.newPullParser(); in testReadFromCorrectXmlWithInputStreamInAssets() local
110 parser.setInput(xmlIs, StandardCharsets.UTF_8.name()); in testReadFromCorrectXmlWithInputStreamInAssets()
113 parser); in testReadFromCorrectXmlWithInputStreamInAssets()
132 final XmlPullParser parser = Xml.newPullParser(); in testReadMediaCapabilitiesXmlWithSupportAllHdr() local
133 parser.setInput(xmlIs, StandardCharsets.UTF_8.name()); in testReadMediaCapabilitiesXmlWithSupportAllHdr()
136 parser); in testReadMediaCapabilitiesXmlWithSupportAllHdr()
160 final XmlPullParser parser = Xml.newPullParser(); in testReadFromWrongMediaCapabilityXml()
161 parser.setInput(xmlIs, StandardCharsets.UTF_8.name()); in testReadFromWrongMediaCapabilityXml()
[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 …]
DApiDocumentParser.java51 ApiParser parser = getApiParser(path); in parseAsStream() local
53 return parser.parseAsStream(path); in parseAsStream()
/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
22 name: "release-parser-tests",
28 "release-parser",
/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/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/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 …]
/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()
/cts/hostsidetests/car/src/android/car/cts/powerpolicy/
DCpmsFrameworkLayerStateInfo.java197 StateInfoParser parser = new StateInfoParser(lines); in parse() local
200 while ((header = parser.searchHeader()) != null) { in parse()
203 currentState = parser.getIntData(CURRENT_STATE_HDR); in parse()
206 currentPolicyId = parser.getStringData(CURRENT_POLICY_ID_HDR); in parse()
209 pendingPolicyId = parser.getStringData(PENDING_POLICY_ID_HDR); in parse()
212 currentPolicyGroupId = parser.getStringData(CURRENT_POLICY_GROUP_ID_HDR); in parse()
215 ArrayList<String> groupList = parser.getStringArray(POWER_POLICY_GROUPS_HDR, in parse()
220 parser.parseComponentStates(COMPONENT_STATE_HDR, in parse()
222 enables = parser.getEnables(); in parse()
223 disables = parser.getDisables(); in parse()
[all …]
/cts/tests/tests/security/src/android/security/cts/
DAssetManagerTest.java30 final XmlResourceParser[] parser = {null}; in testCloseThenFinalize() local
32 parser[0] = assetManager[0].openXmlResourceParser( in testCloseThenFinalize()
41 parser[0] = null; in testCloseThenFinalize()
/cts/tools/incremental-cts/
Dincremental_deqp.py451 parser = argparse.ArgumentParser(description='Run incremental dEQP on devices.')
452 parser.add_argument('-s', '--serial', help='Optional. Use device with given serial.')
453 parser.add_argument('-t', '--test', help=('Optional. Directory of incremental deqp test file. '
456 parser.add_argument('-b', '--base_build', help=('Target file of base build that has passed dEQP '
458 parser.add_argument('-c', '--current_build',
465 parser.add_argument('--generate_deps_only', action='store_true',
468 parser.add_argument('--ats_mode', action='store_true',
470 parser.add_argument('--custom_handler', action='store_true',
472 return parser
612 parser = _get_parser()
[all …]
/cts/tests/input/src/android/input/cts/
DGamepadWithAccessibilityTest.kt98 val parser = InputJsonParser(mInstrumentation.getTargetContext()) in testDeviceId() constant
99 val resourceDeviceId = parser.readDeviceId(resourceId) in testDeviceId()
100 val registerCommand = parser.readRegisterCommand(resourceId) in testDeviceId()
102 parser.readVendorId(resourceId), parser.readProductId(resourceId), in testDeviceId()
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DLockScreenInspector.java64 WindowManagerServiceDumpProto.parser(), DUMPSYS_WINDOW); in checkCurrentState()
81 private <T extends MessageLite> T getDump(Parser<T> parser, String command) throws Exception { in getDump() argument
84 return parser.parseFrom(receiver.getOutput()); in getDump()
/cts/hostsidetests/seccomp/app/
Dgen_blocklist.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