Lines Matching refs:xml

139 static xml::AaptAttribute CreateAttributeWithId(const ResourceId& id) {  in CreateAttributeWithId()
140 return xml::AaptAttribute(Attribute(), id); in CreateAttributeWithId()
143 static xml::NamespaceDecl CreateAndroidNamespaceDecl() { in CreateAndroidNamespaceDecl()
144 xml::NamespaceDecl decl; in CreateAndroidNamespaceDecl()
146 decl.uri = xml::kSchemaAndroid; in CreateAndroidNamespaceDecl()
175 std::unique_ptr<xml::XmlResource> GenerateSplitManifest(const AppInfo& app_info, in GenerateSplitManifest()
182 std::unique_ptr<xml::Element> manifest_el = util::make_unique<xml::Element>(); in GenerateSplitManifest()
185 manifest_el->attributes.push_back(xml::Attribute{"", "package", app_info.package}); in GenerateSplitManifest()
189 manifest_el->attributes.push_back(xml::Attribute{ in GenerateSplitManifest()
190 xml::kSchemaAndroid, "versionCode", std::to_string(version_code), in GenerateSplitManifest()
197 manifest_el->attributes.push_back(xml::Attribute{ in GenerateSplitManifest()
198 xml::kSchemaAndroid, "versionCodeMajor", std::to_string(version_code_major), in GenerateSplitManifest()
205 manifest_el->attributes.push_back(xml::Attribute{ in GenerateSplitManifest()
206 xml::kSchemaAndroid, "revisionCode", std::to_string(revision_code), in GenerateSplitManifest()
221 manifest_el->attributes.push_back(xml::Attribute{"", "split", split_name.str()}); in GenerateSplitManifest()
225 xml::Attribute{"", "configForSplit", app_info.split_name.value()}); in GenerateSplitManifest()
233 manifest_el->attributes.push_back(xml::Attribute{"", "targetConfig", target_config_str.str()}); in GenerateSplitManifest()
235 std::unique_ptr<xml::Element> application_el = util::make_unique<xml::Element>(); in GenerateSplitManifest()
238 xml::Attribute{xml::kSchemaAndroid, "hasCode", "false", CreateAttributeWithId(kHasCode), in GenerateSplitManifest()
243 std::unique_ptr<xml::XmlResource> doc = util::make_unique<xml::XmlResource>(); in GenerateSplitManifest()
248 static Maybe<std::string> ExtractCompiledString(const xml::Attribute& attr, in ExtractCompiledString()
272 static Maybe<uint32_t> ExtractCompiledInt(const xml::Attribute& attr, std::string* out_error) { in ExtractCompiledInt()
296 static Maybe<int> ExtractSdkVersion(const xml::Attribute& attr, std::string* out_error) { in ExtractSdkVersion()
333 Maybe<AppInfo> ExtractAppInfoFromBinaryManifest(const xml::XmlResource& xml_res, in ExtractAppInfoFromBinaryManifest()
336 const xml::Element* manifest_el = xml_res.root.get(); in ExtractAppInfoFromBinaryManifest()
348 const xml::Attribute* package_attr = manifest_el->FindAttribute({}, "package"); in ExtractAppInfoFromBinaryManifest()
363 if (const xml::Attribute* version_code_attr = in ExtractAppInfoFromBinaryManifest()
364 manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode")) { in ExtractAppInfoFromBinaryManifest()
374 if (const xml::Attribute* version_code_major_attr = in ExtractAppInfoFromBinaryManifest()
375 manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCodeMajor")) { in ExtractAppInfoFromBinaryManifest()
385 if (const xml::Attribute* revision_code_attr = in ExtractAppInfoFromBinaryManifest()
386 manifest_el->FindAttribute(xml::kSchemaAndroid, "revisionCode")) { in ExtractAppInfoFromBinaryManifest()
396 if (const xml::Attribute* split_name_attr = manifest_el->FindAttribute({}, "split")) { in ExtractAppInfoFromBinaryManifest()
406 if (const xml::Element* uses_sdk_el = manifest_el->FindChild({}, "uses-sdk")) { in ExtractAppInfoFromBinaryManifest()
407 if (const xml::Attribute* min_sdk = in ExtractAppInfoFromBinaryManifest()
408 uses_sdk_el->FindAttribute(xml::kSchemaAndroid, "minSdkVersion")) { in ExtractAppInfoFromBinaryManifest()
421 void SetLongVersionCode(xml::Element* manifest, uint64_t version) { in SetLongVersionCode()
423 auto version_code = manifest->FindOrCreateAttribute(xml::kSchemaAndroid, "versionCode"); in SetLongVersionCode()
430 auto version_major = manifest->FindOrCreateAttribute(xml::kSchemaAndroid, "versionCodeMajor"); in SetLongVersionCode()
434 manifest->RemoveAttribute(xml::kSchemaAndroid, "versionCodeMajor"); in SetLongVersionCode()