/frameworks/base/cmds/idmap2/tests/ |
D | R.h | 24 static std::string hexify(ResourceId id) { in hexify() 33 constexpr ResourceId int1 = 0x7f010000; 41 constexpr ResourceId not_overlayable = 0x7f020003; 42 constexpr ResourceId other = 0x7f020004; 43 constexpr ResourceId policy_actor = 0x7f020005; 44 constexpr ResourceId policy_odm = 0x7f020006; 45 constexpr ResourceId policy_oem = 0x7f020007; 46 constexpr ResourceId policy_product = 0x7f020008; 47 constexpr ResourceId policy_public = 0x7f020009; 48 constexpr ResourceId policy_signature = 0x7f02000a; [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/notblacklisted", ResourceId{}, default_config, "value") in TEST() 35 .AddString("android:string/blacklisted", ResourceId{}, default_config, "value") in TEST() 36 .AddString("android:string/notblacklisted2", ResourceId{}, default_config, "value") in TEST() 37 .AddString("android:string/blacklisted2", ResourceId{}, default_config, "value") in TEST() 58 .AddString("android:string/notblacklisted", ResourceId{}, default_config, "value") in TEST() 59 .AddString("android:string/blacklisted", ResourceId{}, default_config, "value") in TEST() 60 .AddString("android:drawable/notblacklisted", ResourceId{}, default_config, "value") in TEST() 61 .AddString("android:drawable/blacklisted", ResourceId{}, default_config, "value") in TEST()
|
/frameworks/base/tools/aapt2/ |
D | Resource.h | 142 struct ResourceId { struct 145 ResourceId(); argument 146 ResourceId(const ResourceId& rhs); 147 ResourceId(uint32_t res_id); // NOLINT(google-explicit-constructor) 148 ResourceId(uint8_t p, uint8_t t, uint16_t e); 228 inline ResourceId::ResourceId() : id(0) {} in ResourceId() function 230 inline ResourceId::ResourceId(const ResourceId& rhs) : id(rhs.id) {} in ResourceId() function 232 inline ResourceId::ResourceId(uint32_t res_id) : id(res_id) {} in ResourceId() function 234 inline ResourceId::ResourceId(uint8_t p, uint8_t t, uint16_t e) in ResourceId() function 237 inline bool ResourceId::is_valid_static() const { in is_valid_static() [all …]
|
D | SdkConstants_test.cpp | 24 EXPECT_EQ(1, FindAttributeSdkLevel(ResourceId(0x01010000))); in TEST() 28 EXPECT_EQ(0, FindAttributeSdkLevel(ResourceId(0x7f010345))); in TEST()
|
D | ResourceTable.h | 217 bool AddResourceWithId(const ResourceNameRef& name, const ResourceId& res_id, 228 bool AddResourceWithIdMangled(const ResourceNameRef& name, const ResourceId& id, 237 const ResourceId& res_id, IDiagnostics* diag); 239 const ResourceId& res_id, IDiagnostics* diag); 299 bool AddResourceImpl(const ResourceNameRef& name, const ResourceId& res_id, 306 const ResourceId& res_id, NameValidator name_validator,
|
/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 | 32 .AddReference("com.app.test:string/foo", ResourceId(0x7f020000), in TEST() 36 .AddReference("com.app.test:string/bar", ResourceId(0x7f020001), in TEST() 39 .AddReference("com.app.test:string/baz", ResourceId(0x7f020002), in TEST() 52 .AddPublicSymbol("android:string/ok", ResourceId(0x01040034)) in TEST() 62 EXPECT_EQ(ResourceId(0x7f020001), ref->id.value()); in TEST() 67 EXPECT_EQ(ResourceId(0x7f020002), ref->id.value()); in TEST() 72 EXPECT_EQ(ResourceId(0x01040034), ref->id.value()); in TEST() 105 ResourceId(0x01060000)) in TEST() 106 .AddPublicSymbol("android:attr/foo", ResourceId(0x01010001), in TEST() 110 .AddPublicSymbol("android:attr/bar", ResourceId(0x01010002), in TEST() [all …]
|
D | AutoVersioner_test.cpp | 60 ResourceId(0x7f020000), in TEST() 62 .AddItem("android:attr/onClick", ResourceId(0x0101026f), in TEST() 64 .AddItem("android:attr/paddingStart", ResourceId(0x010103b3), in TEST() 67 ResourceId(0x01010364), util::make_unique<Id>()) in TEST() 68 .AddItem("android:attr/colorAccent", ResourceId(0x01010435), in TEST() 73 ResourceId(0x7f020000), in TEST() 75 .AddItem("android:attr/paddingEnd", ResourceId(0x010103b4), in TEST()
|
D | TableMerger_test.cpp | 230 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0001), Visibility::Level::kPublic) in TEST_F() 235 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0001), Visibility::Level::kPublic) in TEST_F() 251 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0001), Visibility::Level::kPublic) in TEST_F() 256 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x02, 0x0001), Visibility::Level::kPublic) in TEST_F() 272 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0001), Visibility::Level::kPublic) in TEST_F() 277 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0002), Visibility::Level::kPublic) in TEST_F() 293 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0001), Visibility::Level::kPublic) in TEST_F() 298 .SetSymbolState("bool/foo", ResourceId(0x7f, 0x01, 0x0001), Visibility::Level::kPrivate) in TEST_F() 382 .AddItem("com.app.a:attr/foo", ResourceId(0x01010000)) in TEST_F() 403 .AddItem("com.app.a:attr/foo", ResourceId(0x01010000), in TEST_F() [all …]
|
D | PrivateAttributeMover_test.cpp | 32 .SetSymbolState("android:attr/publicA", ResourceId(0x01010000), in TEST() 34 .SetSymbolState("android:attr/publicB", ResourceId(0x01010000), in TEST() 84 .SetSymbolState("android:attr/pub", ResourceId(0x01010000), Visibility::Level::kPublic) in TEST()
|
/frameworks/base/tools/aapt2/format/binary/ |
D | TableFlattener_test.cpp | 88 const ResourceId& expected_id, in Exists() 159 .AddSimple("com.app.test:id/one", ResourceId(0x7f020000)) in TEST_F() 160 .AddSimple("com.app.test:id/two", ResourceId(0x7f020001)) in TEST_F() 161 .AddValue("com.app.test:id/three", ResourceId(0x7f020002), in TEST_F() 162 test::BuildReference("com.app.test:id/one", ResourceId(0x7f020000))) in TEST_F() 163 .AddValue("com.app.test:integer/one", ResourceId(0x7f030000), in TEST_F() 166 ResourceId(0x7f030000), in TEST_F() 168 .AddString("com.app.test:string/test", ResourceId(0x7f040000), "foo") in TEST_F() 169 .AddString("com.app.test:layout/bar", ResourceId(0x7f050000), "res/layout/bar.xml") in TEST_F() 175 EXPECT_TRUE(Exists(&res_table, "com.app.test:id/one", ResourceId(0x7f020000), {}, in TEST_F() [all …]
|
/frameworks/base/tools/aapt2/java/ |
D | JavaClassGenerator_test.cpp | 38 .AddSimple("android:id/class", ResourceId(0x01020000)) in TEST() 58 .AddSimple("android:id/hey-man", ResourceId(0x01020000)) in TEST() 59 .AddValue("android:attr/cool.attr", ResourceId(0x01010000), in TEST() 61 .AddValue("android:styleable/hey.dude", ResourceId(0x01030000), in TEST() 63 .AddItem("android:attr/cool.attr", ResourceId(0x01010000)) in TEST() 88 .AddSimple("android:id/one", ResourceId(0x01020000)) in TEST() 89 .AddSimple("android:id/com.foo$two", ResourceId(0x01020001)) in TEST() 115 .AddValue("app:attr/foo", ResourceId(0x7f010000), in TEST() 117 .AddValue("app:attr/bar", ResourceId(0x7f010001), in TEST() 119 .AddValue("android:attr/baz", ResourceId(0x01010000), in TEST() [all …]
|
D | JavaClassGenerator.cpp | 219 const ResourceId lhs_id = lhs.attr_ref->id.value_or_default(ResourceId(0)); in operator <() 220 const ResourceId rhs_id = rhs.attr_ref->id.value_or_default(ResourceId(0)); in operator <() 230 void JavaClassGenerator::ProcessStyleable(const ResourceNameRef& name, const ResourceId& id, in ProcessStyleable() 346 const ResourceId id = sorted_attributes[i].attr_ref->id.value_or_default(ResourceId(0)); in ProcessStyleable() 440 void JavaClassGenerator::ProcessResource(const ResourceNameRef& name, const ResourceId& id, in ProcessResource() 444 ResourceId real_id = id; in ProcessResource() 449 real_id = ResourceId(kAppPackageId, id.package_id(), id.entry_id()); in ProcessResource() 536 ResourceId id; in ProcessType() 538 id = ResourceId(package.id.value(), type.id.value(), entry->id.value()); in ProcessType()
|
/frameworks/base/cmds/idmap2/include/idmap2/ |
D | ResourceMapping.h | 44 using TargetResourceMap = std::map<ResourceId, TargetValue>; 45 using OverlayResourceMap = std::map<ResourceId, ResourceId>; 95 Result<Unit> AddMapping(ResourceId target_resource, TargetValue::DataType data_type, 99 void RemoveMapping(ResourceId target_resource); 125 std::multimap<ResourceId, ResourceId> overlay_map_;
|
D | Idmap.h | 84 static constexpr const ResourceId kPadding = 0xffffffffu; 215 ResourceId target_id; 221 ResourceId overlay_id; 222 ResourceId target_id;
|
/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 Maybe<ResourceId>& i, const std::shared_ptr<Attribute>& attr = {}, 69 Maybe<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() 201 symbol->id = ResourceId(sr.package->id.value(), sr.type->id.value(), sr.entry->id.value()); in FindByName() 267 android::AssetManager2& am, ResourceId id) { in LookupAttributeInTable() 315 symbol.symbol.id = ResourceId(map_entry.key); in LookupAttributeInTable() 330 ResourceId res_id = 0; in FindByName() 362 s->is_dynamic = IsPackageDynamic(ResourceId(res_id).package_id(), real_name.package); in FindByName() 373 ResourceId id) { in GetResourceName() 382 ResourceId id) { in FindById() 410 s->is_dynamic = IsPackageDynamic(ResourceId(id).package_id(), name.package); in FindById()
|
/frameworks/base/tools/aapt2/compile/ |
D | IdAssigner.cpp | 34 static bool AssignId(IDiagnostics* diag, const ResourceId& id, in AssignId() 48 const ResourceId existing_id(pkg->id.value(), type->id ? type->id.value() : 0, in AssignId() 56 std::map<ResourceId, ResourceName> assigned_ids; in Consume() 69 const ResourceId assigned_id = iter->second; in Consume() 81 ResourceId resource_id(package->id.value(), type->id.value(), in Consume() 102 const ResourceId& pre_assigned_id = stable_id_entry.second; in Consume() 128 ResourceId resource_id(package->id.value(), 0, 0); in Consume() 169 resource_id = ResourceId(package->id.value(), type->id.value(), 0); in Consume()
|
D | IdAssigner_test.cpp | 43 .AddSimple("android:id/foo", ResourceId(0x01010000)) in TEST() 47 .AddSimple("android:attr/fun", ResourceId(0x01040000)) in TEST() 48 .AddSimple("android:attr/foo", ResourceId(0x01040006)) in TEST() 97 .AddSimple("android:attr/foo", ResourceId(0x01040006)) in TEST() 98 .AddSimple("android:attr/bar", ResourceId(0x01040006)) in TEST() 117 std::unordered_map<ResourceName, ResourceId> id_map = { in TEST() 118 {test::ParseNameOrDie("android:attr/foo"), ResourceId(0x01010002)}}; in TEST()
|
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/test/ |
D | Builders.h | 43 ResourceTableBuilder& AddSimple(const android::StringPiece& name, const ResourceId& id = {}); 46 const ResourceId& id = {}); 49 ResourceTableBuilder& AddReference(const android::StringPiece& name, const ResourceId& id, 53 ResourceTableBuilder& AddString(const android::StringPiece& name, const ResourceId& id, 55 ResourceTableBuilder& AddString(const android::StringPiece& name, const ResourceId& id, 61 ResourceTableBuilder& AddFileReference(const android::StringPiece& name, const ResourceId& id, 69 ResourceTableBuilder& AddValue(const android::StringPiece& name, const ResourceId& id, 73 const ResourceId& id, std::unique_ptr<Value> value); 74 ResourceTableBuilder& SetSymbolState(const android::StringPiece& name, const ResourceId& id, 89 const Maybe<ResourceId>& id = {}); [all …]
|
D | Builders.cpp | 45 const ResourceId& id) { in AddSimple() 51 const ResourceId& id) { in AddSimple() 61 const ResourceId& id, in AddReference() 71 ResourceTableBuilder& ResourceTableBuilder::AddString(const StringPiece& name, const ResourceId& id, in AddString() 76 ResourceTableBuilder& ResourceTableBuilder::AddString(const StringPiece& name, const ResourceId& id, in AddString() 89 const ResourceId& id, in AddFileReference() 111 ResourceTableBuilder& ResourceTableBuilder::AddValue(const StringPiece& name, const ResourceId& id, in AddValue() 118 const ResourceId& id, in AddValue() 127 const ResourceId& id, in SetSymbolState() 154 std::unique_ptr<Reference> BuildReference(const StringPiece& ref, const Maybe<ResourceId>& id) { in BuildReference() [all …]
|
/frameworks/base/cmds/idmap2/libidmap2/ |
D | ResourceMapping.cpp | 61 const ResourceId& target_resource) { in CheckOverlayable() 117 Result<std::unique_ptr<Asset>> OpenNonAssetFromResource(const ResourceId& resource_id, in OpenNonAssetFromResource() 190 ResourceId target_id = in CreateResourceMapping() 230 const ResourceId overlay_resid = *iter; in CreateResourceMappingLegacy() 239 ResourceId target_resource = target_am->GetResourceId(full_name); in CreateResourceMappingLegacy() 260 std::set<ResourceId> remove_ids; in FilterOverlayableResources() 262 const ResourceId target_resid = target_map.first; in FilterOverlayableResources() 283 for (const ResourceId target_resid : remove_ids) { in FilterOverlayableResources() 396 Result<Unit> ResourceMapping::AddMapping(ResourceId target_resource, in AddMapping() 416 void ResourceMapping::RemoveMapping(ResourceId target_resource) { in RemoveMapping()
|