Lines Matching refs:doc
73 def raise_min_sdk_version(doc, min_sdk_version, target_sdk_version, library): argument
85 manifest = parse_manifest(doc)
94 element = doc.createElement('uses-sdk')
100 manifest.insertBefore(doc.createTextNode(indent), manifest.firstChild)
106 min_attr = doc.createAttributeNS(android_ns, 'android:minSdkVersion')
117 target_attr = doc.createAttributeNS(android_ns, 'android:targetSdkVersion')
130 def add_logging_parent(doc, logging_parent_value): argument
140 manifest = parse_manifest(doc)
148 application = doc.createElement('application')
151 manifest.insertBefore(doc.createTextNode(indent), first)
162 ul = doc.createElement('meta-data')
165 application.insertBefore(doc.createTextNode(indent), last)
173 application.appendChild(doc.createTextNode(indent))
176 def add_uses_libraries(doc, new_uses_libraries, required): argument
187 manifest = parse_manifest(doc)
193 application = doc.createElement('application')
196 manifest.insertBefore(doc.createTextNode(indent), first)
212 ul = doc.createElement('uses-library')
216 application.insertBefore(doc.createTextNode(indent), last)
223 application.appendChild(doc.createTextNode(indent))
226 def add_uses_non_sdk_api(doc): argument
235 manifest = parse_manifest(doc)
241 application = doc.createElement('application')
244 manifest.insertBefore(doc.createTextNode(indent), first)
249 attr = doc.createAttributeNS(android_ns, 'android:usesNonSdkApi')
254 def add_use_embedded_dex(doc): argument
255 manifest = parse_manifest(doc)
261 application = doc.createElement('application')
264 manifest.insertBefore(doc.createTextNode(indent), first)
269 attr = doc.createAttributeNS(android_ns, 'android:useEmbeddedDex')
276 def add_extract_native_libs(doc, extract_native_libs): argument
277 manifest = parse_manifest(doc)
283 application = doc.createElement('application')
286 manifest.insertBefore(doc.createTextNode(indent), first)
292 attr = doc.createAttributeNS(android_ns, 'android:extractNativeLibs')
300 def set_has_code_to_false(doc): argument
301 manifest = parse_manifest(doc)
307 application = doc.createElement('application')
310 manifest.insertBefore(doc.createTextNode(indent), first)
317 attr = doc.createAttributeNS(android_ns, 'android:hasCode')
327 doc = minidom.parse(args.input)
329 ensure_manifest_android_ns(doc)
332 raise_min_sdk_version(doc, args.min_sdk_version, args.target_sdk_version, args.library)
335 add_uses_libraries(doc, args.uses_libraries, True)
338 add_uses_libraries(doc, args.optional_uses_libraries, False)
341 add_uses_non_sdk_api(doc)
344 add_logging_parent(doc, args.logging_parent)
347 add_use_embedded_dex(doc)
350 set_has_code_to_false(doc)
353 add_extract_native_libs(doc, args.extract_native_libs)
356 write_xml(f, doc)