Home
last modified time | relevance | path

Searched refs:ResourceName (Results 1 – 25 of 63) sorted by relevance

123

/frameworks/base/tools/aapt2/
DResource.h129 struct ResourceName { struct
134 ResourceName() = default; argument
135 ResourceName(android::StringPiece p, const ResourceNamedTypeRef& t, android::StringPiece e);
136 ResourceName(android::StringPiece p, ResourceType t, android::StringPiece e);
138 int compare(const ResourceName& other) const;
158 ResourceNameRef(const ResourceName& rhs); // NOLINT(google-explicit-constructor)
163 ResourceNameRef& operator=(const ResourceName& rhs);
167 ResourceName ToResourceName() const;
207 ResourceName name;
220 ResourceName name;
[all …]
DResourceTable_test.cpp135 const ResourceName name = test::ParseNameOrDie("android:attr/foo"); in TEST()
213 const ResourceName name = test::ParseNameOrDie("android:string/foo"); in TEST()
243 const ResourceName name = test::ParseNameOrDie("android:string/foo"); in TEST()
275 const ResourceName name = test::ParseNameOrDie("android:string/foo"); in TEST()
298 const ResourceName foo = test::ParseNameOrDie("android:string/foo"); in TEST()
305 const ResourceName bar = test::ParseNameOrDie("android:string/bar"); in TEST()
311 const ResourceName baz = test::ParseNameOrDie("android:string/baz"); in TEST()
321 const ResourceName foo = test::ParseNameOrDie("android:string/foo"); in TEST()
327 const ResourceName bar = test::ParseNameOrDie("android:string/bar"); in TEST()
336 const ResourceName name = test::ParseNameOrDie("android:string/foo"); in TEST()
[all …]
DResourceUtils.h77 std::optional<ResourceName> ToResourceName(const android::ResTable::resource_name& name);
82 std::optional<ResourceName> ToResourceName(const android::AssetManager2::ResourceName& name_in);
204 const std::function<bool(const ResourceName&)>& on_create_reference = {});
208 const std::function<bool(const ResourceName&)>& on_create_reference = {});
DNameMangler.h46 std::optional<ResourceName> MangleName(const ResourceName& name) { in MangleName()
53 return ResourceName(policy_.target_package_name, name.type, in MangleName()
DDebug.cpp80 const ResourceName& parent_name = parent_ref.name.value(); in Visit()
164 const ResourceName& name = entry.key.name.value(); in Visit()
220 const ResourceName& name = attr.name.value(); in Visit()
358 static size_t GetNodeIndex(const std::vector<ResourceName>& names, const ResourceName& name) { in GetNodeIndex()
365 void Debug::PrintStyleGraph(ResourceTable* table, const ResourceName& target_style) { in PrintStyleGraph()
366 std::map<ResourceName, std::set<ResourceName>> graph; in PrintStyleGraph()
368 std::queue<ResourceName> styles_to_visit; in PrintStyleGraph()
371 const ResourceName& style_name = styles_to_visit.front(); in PrintStyleGraph()
372 std::set<ResourceName>& parents = graph[style_name]; in PrintStyleGraph()
392 std::vector<ResourceName> names; in PrintStyleGraph()
[all …]
DResourceUtils.cpp61 std::optional<ResourceName> ToResourceName(const android::ResTable::resource_name& name_in) { in ToResourceName()
63 ResourceName name_out; in ToResourceName()
87 std::optional<ResourceName> ToResourceName(const android::AssetManager2::ResourceName& name_in) { in ToResourceName()
88 ResourceName name_out; in ToResourceName()
322 ref.name = ResourceName(package, ResourceNamedTypeWithDefaultName(ResourceType::kAttr), in ParseXmlAttributeName()
371 const ResourceName& enum_symbol_resource_name = symbol.symbol.name.value(); in TryParseEnumSymbol()
399 const ResourceName& flag_symbol_resource_name = in TryParseFlagSymbol()
623 const std::function<bool(const ResourceName&)>& on_create_reference) { in TryParseItemForAttribute()
711 const std::function<bool(const ResourceName&)>& on_create_reference) { in TryParseItemForAttribute()
/frameworks/base/tools/aapt2/cmd/
DUtil_test.cpp471 std::unordered_set<ResourceName> resource_exclusion; in TEST()
472 std::set<ResourceName> name_collapse_exemptions; in TEST()
473 std::set<ResourceName> path_shorten_exemptions; in TEST()
479 UnorderedElementsAre(ResourceName({}, ResourceType::kString, "foo"), in TEST()
480 ResourceName({}, ResourceType::kDimen, "bar"), in TEST()
481 ResourceName({}, ResourceType::kBool, "keep_name"), in TEST()
482 ResourceName({}, ResourceType::kLayout, "keep_name_and_path"))); in TEST()
484 UnorderedElementsAre(ResourceName({}, ResourceType::kLayout, "keep_path"), in TEST()
485 ResourceName({}, ResourceType::kLayout, "keep_name_and_path"))); in TEST()
487 UnorderedElementsAre(ResourceName({}, ResourceType::kBool, "remove_me"))); in TEST()
[all …]
DUtil.h97 std::unordered_set<ResourceName>& out_resource_exclude_list,
98 std::set<ResourceName>& out_name_collapse_exemptions,
99 std::set<ResourceName>& out_path_shorten_exemptions);
/frameworks/base/tools/aapt2/optimize/
DResourceFilter_test.cpp40 std::unordered_set<ResourceName> exclude_list = { in TEST()
41 ResourceName({}, ResourceType::kString, "exclude_listed"), in TEST()
42 ResourceName({}, ResourceType::kString, "exclude_listed2"), in TEST()
64 std::unordered_set<ResourceName> exclude_list = { in TEST()
65 ResourceName({}, ResourceType::kString, "exclude_listed"), in TEST()
DResourceFilter.cpp23 ResourceFilter::ResourceFilter(const std::unordered_set<ResourceName>& exclude_list) in ResourceFilter()
31 ResourceName resource = ResourceName({}, type->named_type, (*it)->name); in Consume()
DObfuscator.h52 const bool collapse_key_stringpool, const std::set<ResourceName>& name_collapse_exemptions,
54 const android::base::function_ref<void(Result, const ResourceName&)> onObfuscate);
62 const std::set<ResourceName>& path_shorten_exemptions);
DObfuscator.cpp110 const std::set<ResourceName>& path_shorten_exemptions) { in HandleShortenFilePaths()
117 ResourceName resource_name({}, type->named_type, entry->name); in HandleShortenFilePaths()
154 const bool collapse_key_stringpool, const std::set<ResourceName>& name_collapse_exemptions, in ObfuscateResourceName()
156 const android::base::function_ref<void(Result obfuscatedResult, const ResourceName&)> in ObfuscateResourceName()
158 ResourceName resource_name({}, type_name, entry.name); in ObfuscateResourceName()
178 const std::set<ResourceName>& name_collapse_exemptions, in HandleCollapseKeyStringPool()
186 const ResourceName& resource_name) { in HandleCollapseKeyStringPool()
DResourceFilter.h31 explicit ResourceFilter(const std::unordered_set<ResourceName>& exclude_list);
37 std::unordered_set<ResourceName> exclude_list_;
/frameworks/base/tools/aapt2/process/
DSymbolTable.cpp73 const SymbolTable::Symbol* SymbolTable::FindByName(const ResourceName& name) { in FindByName()
74 const ResourceName* name_with_package = &name; in FindByName()
79 std::optional<ResourceName> name_with_package_impl; in FindByName()
81 name_with_package_impl = ResourceName(mangler_->GetTargetPackageName(), name.type, name.entry); in FindByName()
92 const ResourceName* mangled_name = name_with_package; in FindByName()
93 std::optional<ResourceName> mangled_name_impl; in FindByName()
163 const ResourceName& name, const std::vector<std::unique_ptr<ISymbolSource>>& sources) { in FindByName()
185 const ResourceName& name) { in FindByName()
190 return FindByName(ResourceName(name.package, ResourceType::kAttrPrivate, name.entry)); in FindByName()
304 std::optional<ResourceName> parsed_name = ResourceUtils::ToResourceName(*name); in LookupAttributeInTable()
[all …]
DSymbolTable.h37 inline android::hash_t hash_type(const ResourceName& name) { in hash_type()
91 const Symbol* FindByName(const ResourceName& name);
110 android::LruCache<ResourceName, std::shared_ptr<Symbol>> cache_;
125 const ResourceName& name, const std::vector<std::unique_ptr<ISymbolSource>>& sources) = 0;
140 const ResourceName& name,
156 const ResourceName& name) = 0;
179 const ResourceName& name) override;
200 const ResourceName& name) override;
/frameworks/base/tools/aapt2/compile/
DIdAssigner.cpp69 Result<std::monostate> ReserveId(const ResourceName& name, ResourceId id);
77 NextIdFinder<uint16_t, ResourceName> next_entry_id_;
109 bool ReserveId(const ResourceName& name, ResourceId id, const Visibility& visibility,
113 std::optional<ResourceId> NextId(const ResourceName& name, android::IDiagnostics* diag);
131 const ResourceName name(package->name, type->named_type, entry->name); in Consume()
164 const ResourceName& pre_assigned_name = stable_id_entry.first; in Consume()
178 const ResourceName name(package->name, type->named_type, entry->name); in Consume()
246 Result<std::monostate> TypeGroup::ReserveId(const ResourceName& name, ResourceId id) { in ReserveId()
274 bool IdAssignerContext::ReserveId(const ResourceName& name, ResourceId id, in ReserveId()
344 std::optional<ResourceId> IdAssignerContext::NextId(const ResourceName& name, in NextId()
DIdAssigner.h34 explicit IdAssigner(const std::unordered_map<ResourceName, ResourceId>* map) in IdAssigner() argument
40 const std::unordered_map<ResourceName, ResourceId>* assigned_id_map_ = nullptr;
/frameworks/base/tools/aapt2/format/binary/
DTableFlattener.h61 std::set<ResourceName> name_collapse_exemptions;
64 std::set<ResourceName> path_shorten_exemptions;
DBinaryResourceParser.h119 std::map<ResourceId, ResourceName> id_index_;
126 std::set<std::pair<ResourceName, ResourceId>> staged_entries_to_remove_;
/frameworks/base/tools/aapt2/java/
DProguardRules.h38 ResourceName name;
67 inline void AddReference(const UsageLocation& file, const ResourceName& resource_name) { in AddReference()
82 std::map<ResourceName, std::set<UsageLocation>> reference_set_;
DProguardRules.cpp97 ResourceName ref_name = ref->name.value(); in AddReference()
99 ref_name = ResourceName(file_.name.package, ref_name.type, ref_name.entry); in AddReference()
493 ReferenceVisitor(aapt::IAaptContext* context, ResourceName from, KeepSet* keep_set) in ReferenceVisitor()
499 ResourceName reference_name = reference->name.value(); in Visit()
501 reference_name = ResourceName(context_->GetCompilationPackage(), reference_name.type, in Visit()
510 ResourceName from_;
520 ResourceName from(pkg->name, type->named_type, entry->name); in CollectResourceReferences()
/frameworks/base/libs/androidfw/include/androidfw/
DResourceUtils.h33 base::expected<AssetManager2::ResourceName, NullOrIOError> ToResourceName(
38 std::string ToFormattedResourceString(const AssetManager2::ResourceName& resource_name);
/frameworks/base/tools/aapt2/link/
DReferenceLinker.cpp63 ResourceName& full_name = fully_qualified.name.value(); in operator <<()
233 const ResourceName& name = ref.name.value(); in IsSymbolVisible()
257 const ResourceName& name = reference.name.value(); in ResolveSymbol()
261 ResourceName(callsite.package, name.type, name.entry)); in ResolveSymbol()
274 symbol = symbols->FindByName(ResourceName(split_package, name.type, name.entry)); in ResolveSymbol()
351 const ResourceName& ref_name = ref.name.value(); in WriteAttributeName()
362 ResourceName& full_name = fully_qualified.name.value(); in WriteAttributeName()
468 ResourceName name(package->name, type->named_type, entry->name); in Consume()
/frameworks/base/libs/androidfw/
DResourceUtils.cpp51 base::expected<AssetManager2::ResourceName, NullOrIOError> ToResourceName( in ToResourceName()
54 AssetManager2::ResourceName name{ in ToResourceName()
98 std::string ToFormattedResourceString(const AssetManager2::ResourceName& resource_name) { in ToFormattedResourceString()
/frameworks/base/tools/aapt2/test/
DBuilders.cpp105 ResourceName res_name = ParseNameOrDie(name); in AddValue()
119 ResourceName res_name = ParseNameOrDie(name); in SetSymbolState()
132 ResourceName res_name = ParseNameOrDie(name); in SetOverlayable()
187 Attribute::Symbol{Reference(ResourceName({}, ResourceType::kId, name)), value}); in AddItem()
193 Reference ref(ResourceName({}, ResourceType::kId, name)); in AddItemWithComment()

123