Home
last modified time | relevance | path

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

12

/frameworks/base/tools/aapt2/
DResourceParser_test.cpp101 EXPECT_EQ(ref.name, (ResourceName{ u"android", ResourceType::kStyle, u"foo" })); in TEST()
104 EXPECT_EQ(ref.name, (ResourceName{ {}, ResourceType::kStyle, u"foo" })); in TEST()
107 EXPECT_EQ(ref.name, (ResourceName{ u"android", ResourceType::kStyle, u"foo" })); in TEST()
110 EXPECT_EQ(ref.name, (ResourceName{ {}, ResourceType::kStyle, u"foo" })); in TEST()
113 EXPECT_EQ(ref.name, (ResourceName{ u"android", ResourceType::kStyle, u"foo" })); in TEST()
116 EXPECT_EQ(ref.name, (ResourceName{ u"android", ResourceType::kStyle, u"foo" })); in TEST()
119 EXPECT_EQ(ref.name, (ResourceName{ {}, ResourceType::kStyle, u"foo" })); in TEST()
178 const String* str = findResource<String>(ResourceName{ in TEST_F()
188 const String* str = findResource<String>(ResourceName{ in TEST_F()
202 const BinaryPrimitive* integer = findResource<BinaryPrimitive>(ResourceName{ in TEST_F()
[all …]
DResource.h72 struct ResourceName { struct
78 bool operator<(const ResourceName& rhs) const; argument
79 bool operator==(const ResourceName& rhs) const;
80 bool operator!=(const ResourceName& rhs) const;
97 ResourceNameRef(const ResourceName& rhs);
101 ResourceNameRef& operator=(const ResourceName& rhs);
103 ResourceName toResourceName() const;
211 inline bool ResourceName::isValid() const { in isValid()
215 inline bool ResourceName::operator<(const ResourceName& rhs) const {
220 inline bool ResourceName::operator==(const ResourceName& rhs) const {
[all …]
DJavaClassGenerator_test.cpp47 ASSERT_TRUE(addResource(ResourceName{ {}, ResourceType::kId, u"class" }, in TEST_F()
57 ASSERT_TRUE(addResource(ResourceName{ {}, ResourceType::kId, u"hey-man" }, in TEST_F()
60 ASSERT_TRUE(addResource(ResourceName{ {}, ResourceType::kAttr, u"cool.attr" }, in TEST_F()
64 Reference ref(ResourceName{ u"android", ResourceType::kAttr, u"cool.attr"}); in TEST_F()
68 ASSERT_TRUE(mTable->addResource(ResourceName{ {}, ResourceType::kStyleable, u"hey.dude" }, in TEST_F()
90 ASSERT_TRUE(addResource(ResourceName{ {}, ResourceType::kId, u"foo" }, in TEST_F()
94 ASSERT_TRUE(table.addResource(ResourceName{ {}, ResourceType::kId, u"test" }, {}, in TEST_F()
99 std::make_shared<MockResolver>(mTable, std::map<ResourceName, ResourceId>()), in TEST_F()
124 ASSERT_TRUE(mTable->addResource(ResourceName{ {}, ResourceType::kStyleable, u"Foo" }, {}, {}, in TEST_F()
128 std::map<ResourceName, ResourceId>({ in TEST_F()
[all …]
DLinker_test.cpp40 addResource(ResourceName{ {}, ResourceType::kAttr, u"integer" }, in SetUp()
43 addResource(ResourceName{ {}, ResourceType::kAttr, u"string" }, in SetUp()
46 addResource(ResourceName{ {}, ResourceType::kId, u"apple" }, util::make_unique<Id>()); in SetUp()
48 addResource(ResourceName{ {}, ResourceType::kId, u"banana" }, util::make_unique<Id>()); in SetUp()
56 addResource(ResourceName{ {}, ResourceType::kAttr, u"flags" }, std::move(flagAttr)); in SetUp()
72 ASSERT_TRUE(addResource(ResourceName{ u"android", ResourceType::kString, u"foo" }, in TEST_F()
86 ASSERT_TRUE(addResource(ResourceName{ u"android", ResourceType::kStyle, u"foo" }, in TEST_F()
101 ASSERT_TRUE(addResource(ResourceName{ u"android", ResourceType::kStyle, u"foo" }, in TEST_F()
115 ASSERT_TRUE(addResource(ResourceName{ u"android", ResourceType::kStyle, u"foo" }, in TEST_F()
133 ASSERT_TRUE(addResource(ResourceName{ u"android", ResourceType::kStyle, u"foo" }, in TEST_F()
[all …]
DMockResolver.h35 const std::map<ResourceName, ResourceId>& items) : in MockResolver()
41 virtual Maybe<ResourceId> findId(const ResourceName& name) override { in findId()
54 virtual Maybe<Entry> findAttribute(const ResourceName& name) override { in findAttribute()
71 virtual Maybe<ResourceName> findName(ResourceId resId) override { in findName()
72 Maybe<ResourceName> result = mResolver->findName(resId); in findName()
88 std::map<ResourceName, ResourceId> mItems;
DResourceTableResolver.h48 virtual Maybe<ResourceId> findId(const ResourceName& name) override;
50 virtual Maybe<Entry> findAttribute(const ResourceName& name) override;
52 virtual Maybe<ResourceName> findName(ResourceId resId) override;
60 const CacheEntry* buildCacheEntry(const ResourceName& name);
64 std::map<ResourceName, CacheEntry> mCache;
DDebug.cpp116 ResourceName name = { table->getPackage(), type->type, entry->name }; in printTable()
133 static size_t getNodeIndex(const std::vector<ResourceName>& names, const ResourceName& name) { in getNodeIndex()
140 const ResourceName& targetStyle) { in printStyleGraph()
141 std::map<ResourceName, std::set<ResourceName>> graph; in printStyleGraph()
143 std::queue<ResourceName> stylesToVisit; in printStyleGraph()
146 const ResourceName& styleName = stylesToVisit.front(); in printStyleGraph()
147 std::set<ResourceName>& parents = graph[styleName]; in printStyleGraph()
168 std::vector<ResourceName> names; in printStyleGraph()
180 const ResourceName& styleName = entry.first; in printStyleGraph()
DResolver.h58 virtual Maybe<ResourceId> findId(const ResourceName& name) = 0;
64 virtual Maybe<Entry> findAttribute(const ResourceName& name) = 0;
70 virtual Maybe<ResourceName> findName(ResourceId resId) = 0;
DResourceTableResolver.cpp46 Maybe<ResourceId> ResourceTableResolver::findId(const ResourceName& name) { in findId()
54 Maybe<IResolver::Entry> ResourceTableResolver::findAttribute(const ResourceName& name) { in findAttribute()
60 ResourceName mangledName; in findAttribute()
61 const ResourceName* nameToSearch = &name; in findAttribute()
103 Maybe<ResourceName> ResourceTableResolver::findName(ResourceId resId) { in findName()
115 return ResourceName{ in findName()
129 const ResourceName& name) { in buildCacheEntry()
DResourceTable_test.cpp84 const ResourceName name = { kAndroidPackage, ResourceType::kAttr, u"id" }; in TEST()
113 ResourceName{ kAndroidPackage, ResourceType::kAttr, u"layout_width" }, in TEST()
118 ResourceName{ kAndroidPackage, ResourceType::kAttr, u"id" }, in TEST()
123 ResourceName{ kAndroidPackage, ResourceType::kString, u"ok" }, in TEST()
128 ResourceName{ kAndroidPackage, ResourceType::kString, u"ok" }, in TEST()
205 ResourceName{ kAndroid, ResourceType::kAttr, u"foo" }, in TEST()
217 ASSERT_TRUE(table.addResource(ResourceName{ kAndroid, ResourceType::kAttr, u"foo" }, {}, {}, in TEST()
DXmlFlattener_test.cpp41 std::map<ResourceName, ResourceId>({ in SetUp()
42 { ResourceName{ u"android", ResourceType::kAttr, u"attr" }, in SetUp()
44 { ResourceName{ u"android", ResourceType::kId, u"id" }, in SetUp()
46 { ResourceName{ u"com.lib", ResourceType::kAttr, u"attr" }, in SetUp()
48 { ResourceName{ u"com.lib", ResourceType::kId, u"id" }, in SetUp()
DResourceParser.h136 std::function<void(const ResourceName&)> onCreateReference = {});
140 std::function<void(const ResourceName&)> onCreateReference = {});
176 ResourceName* resourceName,
DLinker.h84 using ResourceNameToSourceMap = std::map<ResourceName, std::vector<SourceLine>>;
117 std::map<ResourceName, std::vector<SourceLine>> mUnresolvedSymbols;
DDebug.h30 const ResourceName& targetStyle);
DSdkConstants.h48 size_t findAttributeSdkLevel(const ResourceName& name);
DResourceParser.cpp217 const ResourceName& enumSymbolResourceName = entry.symbol.name; in tryParseEnumSymbol()
240 const ResourceName& flagSymbolResourceName = entry.symbol.name; in tryParseFlagSymbol()
394 std::function<void(const ResourceName&)> onCreateReference) { in parseItemForAttribute()
454 std::function<void(const ResourceName&)> onCreateReference) { in parseItemForAttribute()
764 auto onCreateReference = [&](const ResourceName& name) { in parseXml()
958 ResourceName actualName = resourceName.toResourceName(); in parseAttr()
967 ResourceName* resourceName, in parseAttrImpl()
1093 outSymbol->symbol.name = ResourceName { in parseEnumOrFlagItem()
1099 static bool parseXmlAttributeName(StringPiece16 str, ResourceName* outName) { in parseXmlAttributeName()
1136 ResourceName key; in parseUntypedItem()
[all …]
DBinaryResourceParser.cpp43 std::map<ResourceId, ResourceName>* cache) : in ReferenceIdToNameVisitor()
99 Maybe<ResourceName> result = mResolver->findName(reference.id); in idToName()
112 std::map<ResourceId, ResourceName>* mCache;
487 const ResourceName name = { in parsePublic()
594 const ResourceName name = { in parseType()
DBinaryResourceParser.h137 std::map<ResourceId, ResourceName> mIdIndex;
DMain.cpp207 ResourceName name;
214 ResourceName name;
318 ResourceName dumpStyleTarget;
397 const ResourceName& name, const ConfigDescription& config, in shouldGenerateVersionedResource()
702 ResourceName name = { package, type->type, entry->name }; in addApkFilesToLinkQueue()
983 ResourceName{ table->getPackage(), *type, pathData.name }, in compile()
DXmlFlattener.cpp264 ResourceName attrName = { package.value(), ResourceType::kAttr, attr.name }; in writeAttributes()
418 ResourceName realName = reference.name; in flattenItem()
DLinker.cpp194 auto onCreateReference = [&](const ResourceName& name) { in processAttributeValue()
DSdkConstants.cpp725 size_t findAttributeSdkLevel(const ResourceName& name) { in findAttributeSdkLevel()
DResourceValues.h125 ResourceName name;
DTableFlattener.cpp365 << ResourceName{ table.getPackage(), type->type, entry->name } in flatten()
/frameworks/base/core/java/android/app/
DApplicationPackageManager.java819 final ResourceName name = new ResourceName(packageName, resId); in getDrawable()
1130 private Drawable getCachedIcon(@NonNull ResourceName name) { in getCachedIcon()
1156 private void putCachedIcon(@NonNull ResourceName name, @NonNull Drawable dr) { in putCachedIcon()
1173 ResourceName nm = sIconCache.keyAt(i); in handlePackageBroadcast()
1181 ResourceName nm = sStringCache.keyAt(i); in handlePackageBroadcast()
1201 private static final class ResourceName { class in ApplicationPackageManager
1205 ResourceName(String _packageName, int _iconId) { in ResourceName() method in ApplicationPackageManager.ResourceName
1210 ResourceName(ApplicationInfo aInfo, int _iconId) { in ResourceName() method in ApplicationPackageManager.ResourceName
1214 ResourceName(ComponentInfo cInfo, int _iconId) { in ResourceName() method in ApplicationPackageManager.ResourceName
1218 ResourceName(ResolveInfo rInfo, int _iconId) { in ResourceName() method in ApplicationPackageManager.ResourceName
[all …]

12