/frameworks/base/cmds/idmap2/tests/ |
D | R.h | 29 constexpr ResourceId int1 = 0x7f020000; 32 constexpr ResourceId dr1 = 0x7f010000; 35 constexpr ResourceId not_overlayable = 0x7f030003; 36 constexpr ResourceId other = 0x7f030004; 37 constexpr ResourceId policy_actor = 0x7f030005; 38 constexpr ResourceId policy_config_signature = 0x7f030006; 39 constexpr ResourceId policy_odm = 0x7f030007; 40 constexpr ResourceId policy_oem = 0x7f030008; 41 constexpr ResourceId policy_product = 0x7f030009; 42 constexpr ResourceId policy_public = 0x7f03000a; [all …]
|
/frameworks/base/tools/aapt2/optimize/ |
D | ResourceDeduper_test.cpp | 40 .AddString("android:string/dedupe", ResourceId{}, default_config, "dedupe") in TEST() 41 .AddString("android:string/dedupe", ResourceId{}, ldrtl_config, "dedupe") in TEST() 42 .AddString("android:string/dedupe", ResourceId{}, land_config, "dedupe") in TEST() 44 .AddString("android:string/dedupe2", ResourceId{}, default_config, "dedupe") in TEST() 45 .AddString("android:string/dedupe2", ResourceId{}, ldrtl_config, "dedupe") in TEST() 46 .AddString("android:string/dedupe2", ResourceId{}, ldrtl_v21_config, "keep") in TEST() 47 .AddString("android:string/dedupe2", ResourceId{}, land_config, "dedupe") in TEST() 49 .AddString("android:string/dedupe3", ResourceId{}, default_config, "dedupe") in TEST() 50 .AddString("android:string/dedupe3", ResourceId{}, en_config, "dedupe") in TEST() 51 .AddString("android:string/dedupe3", ResourceId{}, en_v21_config, "dedupe") in TEST() [all …]
|
D | ResourceFilter_test.cpp | 34 .AddString("android:string/notexclude_listed", ResourceId{}, default_config, "value") in TEST() 35 .AddString("android:string/exclude_listed", ResourceId{}, default_config, "value") in TEST() 36 .AddString("android:string/notexclude_listed2", ResourceId{}, default_config, "value") in TEST() 37 .AddString("android:string/exclude_listed2", ResourceId{}, default_config, "value") in TEST() 58 .AddString("android:string/notexclude_listed", ResourceId{}, default_config, "value") in TEST() 59 .AddString("android:string/exclude_listed", ResourceId{}, default_config, "value") in TEST() 60 .AddString("android:drawable/notexclude_listed", ResourceId{}, default_config, "value") in TEST() 61 .AddString("android:drawable/exclude_listed", ResourceId{}, default_config, "value") in TEST()
|
/frameworks/base/tools/aapt2/format/binary/ |
D | TableFlattener_test.cpp | 88 const ResourceId& expected_id, in Exists() 158 .AddSimple("com.app.test:id/one", ResourceId(0x7f020000)) in TEST_F() 159 .AddSimple("com.app.test:id/two", ResourceId(0x7f020001)) in TEST_F() 160 .AddValue("com.app.test:id/three", ResourceId(0x7f020002), in TEST_F() 161 test::BuildReference("com.app.test:id/one", ResourceId(0x7f020000))) in TEST_F() 162 .AddValue("com.app.test:integer/one", ResourceId(0x7f030000), in TEST_F() 165 ResourceId(0x7f030000), in TEST_F() 167 .AddString("com.app.test:string/test", ResourceId(0x7f040000), "foo") in TEST_F() 168 .AddString("com.app.test:layout/bar", ResourceId(0x7f050000), "res/layout/bar.xml") in TEST_F() 174 EXPECT_TRUE(Exists(&res_table, "com.app.test:id/one", ResourceId(0x7f020000), {}, in TEST_F() [all …]
|
D | ResEntryWriter_test.cpp | 54 .AddSimple("com.app.test:id/id1", ResourceId(0x7f010000)) in TEST_F() 55 .AddSimple("com.app.test:id/id2", ResourceId(0x7f010001)) in TEST_F() 56 .AddSimple("com.app.test:id/id3", ResourceId(0x7f010002)) in TEST_F() 125 .AddSimple("com.app.test:id/id1", ResourceId(0x7f010000)) in TEST_F() 126 .AddSimple("com.app.test:id/id2", ResourceId(0x7f010001)) in TEST_F() 127 .AddSimple("com.app.test:id/id3", ResourceId(0x7f010002)) in TEST_F()
|
/frameworks/base/tools/aapt2/link/ |
D | ResourceExcluder_test.cpp | 51 .AddString("android:string/test", ResourceId{}, default_config, "default") in TEST() 52 .AddString("android:string/test", ResourceId{}, fr_config, "fr") in TEST() 69 .AddString("android:string/test", ResourceId{}, default_config, "default") in TEST() 70 .AddString("android:string/test", ResourceId{}, fr_config, "fr") in TEST() 87 .AddString("android:string/test", ResourceId{}, default_config, "default") in TEST() 88 .AddString("android:string/test", ResourceId{}, fr_land_config, "fr-land") in TEST() 108 .AddString("android:string/test", ResourceId{}, default_config, "default") in TEST() 109 .AddString("android:string/test", ResourceId{}, night_config, "night") in TEST() 110 .AddString("android:string/test", ResourceId{}, fr_config, "fr") in TEST() 111 .AddString("android:string/test", ResourceId{}, fr_land_config, "fr-land") in TEST() [all …]
|
D | XmlReferenceLinker_test.cpp | 34 .AddPublicSymbol("android:attr/layout_width", ResourceId(0x01010000), in SetUp() 40 .AddPublicSymbol("android:attr/background", ResourceId(0x01010001), in SetUp() 44 .AddPublicSymbol("android:attr/attr", ResourceId(0x01010002), in SetUp() 46 .AddPublicSymbol("android:attr/text", ResourceId(0x01010003), in SetUp() 50 .AddPublicSymbol("android:attr/angle", ResourceId(0x01010004), in SetUp() 54 .AddPublicSymbol("android:attr/colorAccent", ResourceId(0x01010435), in SetUp() 58 .AddSymbol("android:color/hidden", ResourceId(0x01020001)) in SetUp() 60 .AddPublicSymbol("android:id/id", ResourceId(0x01030000)) in SetUp() 61 .AddSymbol("com.app.test:id/id", ResourceId(0x7f030000)) in SetUp() 62 .AddSymbol("com.app.test:color/green", ResourceId(0x7f020000)) in SetUp() [all …]
|
D | ReferenceLinker_test.cpp | 31 .AddReference("com.app.test:string/foo", ResourceId(0x7f020000), in TEST() 35 .AddReference("com.app.test:string/bar", ResourceId(0x7f020001), in TEST() 38 .AddReference("com.app.test:string/baz", ResourceId(0x7f020002), in TEST() 51 .AddPublicSymbol("android:string/ok", ResourceId(0x01040034)) in TEST() 61 EXPECT_EQ(ResourceId(0x7f020001), ref->id.value()); in TEST() 66 EXPECT_EQ(ResourceId(0x7f020002), ref->id.value()); in TEST() 71 EXPECT_EQ(ResourceId(0x01040034), ref->id.value()); in TEST() 103 ResourceId(0x01060000)) in TEST() 104 .AddPublicSymbol("android:attr/foo", ResourceId(0x01010001), in TEST() 108 .AddPublicSymbol("android:attr/bar", ResourceId(0x01010002), in TEST() [all …]
|
D | AutoVersioner_test.cpp | 59 ResourceId(0x7f020000), in TEST() 61 .AddItem("android:attr/onClick", ResourceId(0x0101026f), in TEST() 63 .AddItem("android:attr/paddingStart", ResourceId(0x010103b3), in TEST() 66 ResourceId(0x01010364), util::make_unique<Id>()) in TEST() 67 .AddItem("android:attr/colorAccent", ResourceId(0x01010435), in TEST() 72 ResourceId(0x7f020000), in TEST() 74 .AddItem("android:attr/paddingEnd", ResourceId(0x010103b4), in TEST()
|
D | TableMerger_test.cpp | 220 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0001), Visibility::Level::kPublic) in TEST_F() 224 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0001), Visibility::Level::kPublic) in TEST_F() 239 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0001), Visibility::Level::kPublic) in TEST_F() 243 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x02, 0x0001), Visibility::Level::kPublic) in TEST_F() 258 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0001), Visibility::Level::kPublic) in TEST_F() 262 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0002), Visibility::Level::kPublic) in TEST_F() 277 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0001), Visibility::Level::kPublic) in TEST_F() 281 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0001), Visibility::Level::kPrivate) in TEST_F() 358 .AddItem("com.app.a:attr/foo", ResourceId(0x01010000)) in TEST_F() 378 .AddItem("com.app.a:attr/foo", ResourceId(0x01010000), in TEST_F() [all …]
|
/frameworks/base/tools/aapt2/java/ |
D | JavaClassGenerator_test.cpp | 37 .AddSimple("android:id/class", ResourceId(0x01020000)) in TEST() 56 .AddSimple("android:id/hey-man", ResourceId(0x01020000)) in TEST() 57 .AddValue("android:attr/cool.attr", ResourceId(0x01010000), in TEST() 59 .AddValue("android:styleable/hey.dude", ResourceId(0x01030000), in TEST() 61 .AddItem("android:attr/cool.attr", ResourceId(0x01010000)) in TEST() 85 .AddSimple("android:id/one", ResourceId(0x01020000)) in TEST() 86 .AddSimple("android:id/com.foo$two", ResourceId(0x01020001)) in TEST() 110 .AddValue("app:attr/foo", ResourceId(0x7f010000), in TEST() 112 .AddValue("app:attr/bar", ResourceId(0x7f010001), in TEST() 114 .AddValue("android:attr/baz", ResourceId(0x01010000), in TEST() [all …]
|
/frameworks/base/tools/aapt2/ |
D | Resource.h | 185 struct ResourceId { struct 188 ResourceId(); argument 189 ResourceId(const ResourceId& rhs) = default; 190 ResourceId(uint32_t res_id); // NOLINT(google-explicit-constructor) 191 ResourceId(uint8_t p, uint8_t t, uint16_t e); 271 inline ResourceId::ResourceId() : id(0) {} in ResourceId() function 273 inline ResourceId::ResourceId(uint32_t res_id) : id(res_id) {} in ResourceId() function 275 inline ResourceId::ResourceId(uint8_t p, uint8_t t, uint16_t e) in ResourceId() function 278 inline bool ResourceId::is_valid_static() const { in is_valid_static() 282 inline bool ResourceId::is_valid() const { in is_valid() [all …]
|
/frameworks/base/tools/aapt2/compile/ |
D | IdAssigner_test.cpp | 46 .AddSimple("android:id/foo", ResourceId(0x01010000)) in TEST_F() 50 .AddSimple("android:attr/fun", ResourceId(0x01040000)) in TEST_F() 51 .AddSimple("android:attr/foo", ResourceId(0x01040006)) in TEST_F() 94 .AddSimple("android:attr/foo", ResourceId(0x01040006)) in TEST_F() 95 .AddSimple("android:attr/bar", ResourceId(0x01040006)) in TEST_F() 103 .AddSimple("android:string/foo", ResourceId(0x01040000)) in TEST_F() 104 .AddSimple("android:attr/bar", ResourceId(0x01040006)) in TEST_F() 112 .AddSimple("android:attr/foo", ResourceId(0x01050000)) in TEST_F() 113 .AddSimple("android:attr/bar", ResourceId(0x01040006)) in TEST_F() 122 .AddSimple("android:attr/foo", ResourceId(0x01050000)) in TEST_F() [all …]
|
D | IdAssigner.cpp | 69 Result<std::monostate> ReserveId(const ResourceName& name, ResourceId id); 72 Result<ResourceId> NextId(); 109 bool ReserveId(const ResourceName& name, ResourceId id, const Visibility& visibility, 113 std::optional<ResourceId> NextId(const ResourceName& name, android::IDiagnostics* diag); 148 const ResourceId assigned_id = iter->second; in Consume() 165 const ResourceId& pre_assigned_id = stable_id_entry.second; in Consume() 246 Result<std::monostate> TypeGroup::ReserveId(const ResourceName& name, ResourceId id) { in ReserveId() 263 Result<ResourceId> TypeGroup::NextId() { in NextId() 271 return ResourceId(package_id_, type_id_, entry_id.value()); in NextId() 274 bool IdAssignerContext::ReserveId(const ResourceName& name, ResourceId id, in ReserveId() [all …]
|
D | IdAssigner.h | 34 explicit IdAssigner(const std::unordered_map<ResourceName, ResourceId>* map) in IdAssigner() 40 const std::unordered_map<ResourceName, ResourceId>* assigned_id_map_ = nullptr;
|
/frameworks/base/tools/aapt2/process/ |
D | SymbolTable.h | 46 inline android::hash_t hash_type(const ResourceId& id) { in hash_type() 59 explicit Symbol(const std::optional<ResourceId>& i, const std::shared_ptr<Attribute>& attr = {}, 69 std::optional<ResourceId> id; 95 const Symbol* FindById(const ResourceId& id); 111 android::LruCache<ResourceId, std::shared_ptr<Symbol>> id_cache_; 128 ResourceId id, const std::vector<std::unique_ptr<ISymbolSource>>& sources) = 0; 143 ResourceId id, const std::vector<std::unique_ptr<ISymbolSource>>& sources) override; 157 virtual std::unique_ptr<SymbolTable::Symbol> FindById(ResourceId id) = 0; 181 std::unique_ptr<SymbolTable::Symbol> FindById(ResourceId id) override { in FindById() 201 std::unique_ptr<SymbolTable::Symbol> FindById(ResourceId id) override;
|
D | SymbolTable.cpp | 122 const SymbolTable::Symbol* SymbolTable::FindById(const ResourceId& id) { in FindById() 174 ResourceId id, const std::vector<std::unique_ptr<ISymbolSource>>& sources) { in FindById() 261 android::AssetManager2& am, ResourceId id) { in LookupAttributeInTable() 311 symbol.symbol.id = ResourceId(map_entry.key); in LookupAttributeInTable() 326 ResourceId res_id = 0; in FindByName() 373 s->is_dynamic = IsPackageDynamic(ResourceId(res_id).package_id(), real_name.package) || in FindByName() 380 static std::optional<ResourceName> GetResourceName(android::AssetManager2& am, ResourceId id) { in GetResourceName() 389 ResourceId id) { in FindById() 420 s->is_dynamic = IsPackageDynamic(ResourceId(id).package_id(), name.package) || in FindById()
|
/frameworks/base/cmds/idmap2/include/idmap2/ |
D | ResourceMapping.h | 37 using TargetResourceMap = std::map<ResourceId, std::variant<ResourceId, ConfigMap>>; 38 using OverlayResourceMap = std::map<ResourceId, ResourceId>; 72 Result<Unit> AddMapping(ResourceId target_resource,
|
D | ResourceContainer.h | 33 WARN_UNUSED virtual Result<std::string> GetResourceName(ResourceId id) const = 0; 43 ResourceId id) const = 0; 44 WARN_UNUSED virtual Result<ResourceId> GetResourceId(const std::string& name) const = 0; 52 ResourceId overlay_id;
|
D | ResourceUtils.h | 33 using ResourceId = android::ResourceId; // 0xpptteeee variable 69 Result<std::string> ResToTypeEntryName(const AssetManager2& am, ResourceId resid);
|
D | Idmap.h | 220 ResourceId target_id; 221 ResourceId overlay_id; 225 ResourceId target_id; 230 ResourceId overlay_id; 231 ResourceId target_id;
|
/frameworks/base/tools/aapt2/test/ |
D | Builders.h | 41 ResourceTableBuilder& AddSimple(android::StringPiece name, const ResourceId& id = {}); 44 const ResourceId& id = {}); 46 ResourceTableBuilder& AddReference(android::StringPiece name, const ResourceId& id, 49 ResourceTableBuilder& AddString(android::StringPiece name, const ResourceId& id, 51 ResourceTableBuilder& AddString(android::StringPiece name, const ResourceId& id, 56 ResourceTableBuilder& AddFileReference(android::StringPiece name, const ResourceId& id, 62 ResourceTableBuilder& AddValue(android::StringPiece name, const ResourceId& id, 65 const android::ConfigDescription& config, const ResourceId& id, 67 ResourceTableBuilder& SetSymbolState(android::StringPiece name, const ResourceId& id, 83 const std::optional<ResourceId>& id = {}); [all …]
|
D | Builders.cpp | 37 ResourceTableBuilder& ResourceTableBuilder::AddSimple(StringPiece name, const ResourceId& id) { in AddSimple() 43 const ResourceId& id) { in AddSimple() 51 ResourceTableBuilder& ResourceTableBuilder::AddReference(StringPiece name, const ResourceId& id, in AddReference() 60 ResourceTableBuilder& ResourceTableBuilder::AddString(StringPiece name, const ResourceId& id, in AddString() 65 ResourceTableBuilder& ResourceTableBuilder::AddString(StringPiece name, const ResourceId& id, in AddString() 76 ResourceTableBuilder& ResourceTableBuilder::AddFileReference(StringPiece name, const ResourceId& id, in AddFileReference() 96 ResourceTableBuilder& ResourceTableBuilder::AddValue(StringPiece name, const ResourceId& id, in AddValue() 103 const ResourceId& id, in AddValue() 116 ResourceTableBuilder& ResourceTableBuilder::SetSymbolState(StringPiece name, const ResourceId& id, in SetSymbolState() 152 std::unique_ptr<Reference> BuildReference(StringPiece ref, const std::optional<ResourceId>& id) { in BuildReference() [all …]
|
/frameworks/base/cmds/idmap2/libidmap2/ |
D | ResourceContainer.cpp | 37 constexpr ResourceId kAttrName = 0x01010003; 38 constexpr ResourceId kAttrResourcesMap = 0x01010609; 39 constexpr ResourceId kAttrTargetName = 0x0101044d; 40 constexpr ResourceId kAttrTargetPackage = 0x01010021; 88 Result<XmlParser> OpenXmlParser(ResourceId id, const ZipAssetsProvider* zip, in OpenXmlParser() 176 Result<OverlayData> CreateResourceMapping(ResourceId id, const ZipAssetsProvider* zip, in CreateResourceMapping() 253 for (const ResourceId overlay_resid : *overlay_package) { in CreateResourceMappingLegacy() 303 Result<const android::OverlayableInfo*> GetOverlayableInfo(ResourceId id) const override; 304 Result<ResourceId> GetResourceId(const std::string& name) const override; 312 Result<std::string> GetResourceName(ResourceId id) const override; [all …]
|
/frameworks/base/cmds/idmap2/idmap2/ |
D | Lookup.cpp | 55 using android::idmap2::ResourceId; 61 Result<ResourceId> WARN_UNUSED ParseResReference(const AssetManager2& am, const std::string& res, in ParseResReference() 67 const ResourceId parsed_resid = strtol(res.c_str(), &endptr, kBaseHex); in ParseResReference() 106 Result<std::string> WARN_UNUSED GetValue(AssetManager2* const am, ResourceId resid) { in GetValue() 224 const Result<ResourceId> resid = ParseResReference(am, resid_str, target_package_name); in Lookup()
|