Lines Matching refs:attr

34   xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "name");  in RequiredNameIsNotEmpty()  local
35 if (attr == nullptr) { in RequiredNameIsNotEmpty()
41 if (attr->value.empty()) { in RequiredNameIsNotEmpty()
50 static bool NameIsJavaClassName(xml::Element* el, xml::Attribute* attr, in NameIsJavaClassName() argument
56 util::GetFullyQualifiedClassName("a", attr->value); in NameIsJavaClassName()
60 : attr->value; in NameIsJavaClassName()
72 if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "name")) { in OptionalNameIsJavaClassName() local
73 return NameIsJavaClassName(el, attr, diag); in OptionalNameIsJavaClassName()
79 xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "name"); in RequiredNameIsJavaClassName() local
80 if (attr == nullptr) { in RequiredNameIsJavaClassName()
85 return NameIsJavaClassName(el, attr, diag); in RequiredNameIsJavaClassName()
89 xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "name"); in RequiredNameIsJavaPackage() local
90 if (attr == nullptr) { in RequiredNameIsJavaPackage()
96 if (!util::IsJavaPackageName(attr->value)) { in RequiredNameIsJavaPackage()
104 static xml::XmlNodeAction::ActionFuncWithDiag RequiredAndroidAttribute(const std::string& attr) { in RequiredAndroidAttribute() argument
106 if (el->FindAttribute(xml::kSchemaAndroid, attr) == nullptr) { in RequiredAndroidAttribute()
108 << "<" << el->name << "> is missing required attribute 'android:" << attr << "'"); in RequiredAndroidAttribute()
119 xml::Attribute* attr = el->FindAttribute({}, kFeatureSplit); in AutoGenerateIsFeatureSplit() local
120 if (attr != nullptr) { in AutoGenerateIsFeatureSplit()
123 attr->name = "split"; in AutoGenerateIsFeatureSplit()
126 xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, kIsFeatureSplit); in AutoGenerateIsFeatureSplit() local
127 if (attr != nullptr) { in AutoGenerateIsFeatureSplit()
128 if (!ResourceUtils::ParseBool(attr->value).value_or_default(false)) { in AutoGenerateIsFeatureSplit()
146 xml::Attribute* attr = el->FindAttribute({}, "package"); in VerifyManifest() local
147 if (!attr) { in VerifyManifest()
151 } else if (ResourceUtils::IsReference(attr->value)) { in VerifyManifest()
155 } else if (!util::IsAndroidPackageName(attr->value)) { in VerifyManifest()
158 << attr->value << "'"); in VerifyManifest()
162 attr = el->FindAttribute({}, "split"); in VerifyManifest()
163 if (attr) { in VerifyManifest()
164 if (!util::IsJavaPackageName(attr->value)) { in VerifyManifest()
176 if (xml::Attribute* attr = el->FindAttribute("", "coreApp")) { in FixCoreAppAttribute() local
177 std::unique_ptr<BinaryPrimitive> result = ResourceUtils::TryParseBool(attr->value); in FixCoreAppAttribute()
182 attr->compiled_value = std::move(result); in FixCoreAppAttribute()
190 if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "name")) { in VerifyUsesFeature() local
191 if (attr->value.empty()) { in VerifyUsesFeature()
200 if (xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "glEsVersion")) { in VerifyUsesFeature() local
371 if (xml::Attribute* attr = in BuildRules() local
373 attr->value = options_.rename_instrumentation_target_package.value(); in BuildRules()
391 if (xml::Attribute* attr = in BuildRules() local
393 attr->value = options_.rename_overlay_target_package.value(); in BuildRules()
448 xml::Attribute *attr = el->FindOrCreateAttribute(xml::kSchemaAndroid, "debuggable"); in BuildRules() local
449 attr->value = "true"; in BuildRules()
481 xml::Attribute* attr = el->FindAttribute(attr_ns, attr_name); in FullyQualifyClassName() local
482 if (attr != nullptr) { in FullyQualifyClassName()
483 if (Maybe<std::string> new_value = util::GetFullyQualifiedClassName(package, attr->value)) { in FullyQualifyClassName()
484 attr->value = std::move(new_value.value()); in FullyQualifyClassName()
490 xml::Attribute* attr = manifest_el->FindAttribute({}, "package"); in RenameManifestPackage() local
494 CHECK(attr != nullptr); in RenameManifestPackage()
496 std::string original_package = std::move(attr->value); in RenameManifestPackage()
497 attr->value = package_override.to_string(); in RenameManifestPackage()
541 xml::Attribute* attr = root->FindOrCreateAttribute(xml::kSchemaAndroid, "compileSdkVersion"); in Consume() local
544 attr->compiled_value = {}; in Consume()
545 attr->value = options_.compile_sdk_version.value(); in Consume()
547 attr = root->FindOrCreateAttribute("", "platformBuildVersionCode"); in Consume()
550 attr->compiled_value = {}; in Consume()
551 attr->value = options_.compile_sdk_version.value(); in Consume()
556 xml::Attribute* attr = in Consume() local
560 attr->compiled_value = {}; in Consume()
561 attr->value = options_.compile_sdk_version_codename.value(); in Consume()
563 attr = root->FindOrCreateAttribute("", "platformBuildVersionName"); in Consume()
566 attr->compiled_value = {}; in Consume()
567 attr->value = options_.compile_sdk_version_codename.value(); in Consume()