/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); 227 inline ResourceId::ResourceId() : id(0) {} in ResourceId() function 229 inline ResourceId::ResourceId(const ResourceId& rhs) : id(rhs.id) {} in ResourceId() function 231 inline ResourceId::ResourceId(uint32_t res_id) : id(res_id) {} in ResourceId() function 233 inline ResourceId::ResourceId(uint8_t p, uint8_t t, uint16_t e) in ResourceId() function 236 inline bool ResourceId::is_valid() const { in is_valid() [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 | 243 bool AddResourceWithId(const ResourceNameRef& name, const ResourceId& res_id, 254 bool AddResourceWithIdMangled(const ResourceNameRef& name, const ResourceId& id, 263 const ResourceId& res_id, IDiagnostics* diag); 265 const ResourceId& res_id, IDiagnostics* diag); 325 bool AddResourceImpl(const ResourceNameRef& name, const ResourceId& res_id, 332 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 | 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 | 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() 52 .AddPublicSymbol("android:attr/colorAccent", ResourceId(0x01010435), in SetUp() 56 .AddSymbol("android:color/hidden", ResourceId(0x01020001)) in SetUp() 58 .AddPublicSymbol("android:id/id", ResourceId(0x01030000)) in SetUp() 59 .AddSymbol("com.app.test:id/id", ResourceId(0x7f030000)) in SetUp() 60 .AddSymbol("com.app.test:color/green", ResourceId(0x7f020000)) in SetUp() 61 .AddSymbol("com.app.test:color/red", ResourceId(0x7f020001)) in SetUp() [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 | 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 | 86 const ResourceId& expected_id, in Exists() 157 .AddSimple("com.app.test:id/one", ResourceId(0x7f020000)) in TEST_F() 158 .AddSimple("com.app.test:id/two", ResourceId(0x7f020001)) in TEST_F() 159 .AddValue("com.app.test:id/three", ResourceId(0x7f020002), in TEST_F() 160 test::BuildReference("com.app.test:id/one", ResourceId(0x7f020000))) in TEST_F() 161 .AddValue("com.app.test:integer/one", ResourceId(0x7f030000), in TEST_F() 164 ResourceId(0x7f030000), in TEST_F() 166 .AddString("com.app.test:string/test", ResourceId(0x7f040000), "foo") in TEST_F() 167 .AddString("com.app.test:layout/bar", ResourceId(0x7f050000), "res/layout/bar.xml") in TEST_F() 173 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() 344 const ResourceId id = sorted_attributes[i].attr_ref->id.value_or_default(ResourceId(0)); in ProcessStyleable() 438 void JavaClassGenerator::ProcessResource(const ResourceNameRef& name, const ResourceId& id, in ProcessResource() 442 ResourceId real_id = id; in ProcessResource() 447 real_id = ResourceId(kAppPackageId, id.package_id(), id.entry_id()); in ProcessResource() 534 ResourceId id; in ProcessType() 536 id = ResourceId(package.id.value(), type.id.value(), entry->id.value()); in ProcessType()
|
/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() 266 android::AssetManager2& am, ResourceId id) { in LookupAttributeInTable() 314 symbol.symbol.id = ResourceId(map_entry.key); in LookupAttributeInTable() 328 ResourceId res_id = 0; in FindByName() 360 s->is_dynamic = IsPackageDynamic(ResourceId(res_id).package_id()); in FindByName() 371 ResourceId id) { in GetResourceName() 380 ResourceId id) { in FindById() 408 s->is_dynamic = IsPackageDynamic(ResourceId(id).package_id()); in FindById()
|
D | SymbolTable_test.cpp | 34 .AddSimple("android:id/foo", ResourceId(0x01020000)) in TEST() 36 .AddValue("android:attr/foo", ResourceId(0x01010000), in TEST() 53 .AddValue("android:^attr-private/foo", ResourceId(0x01010000), in TEST()
|
/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 …]
|
D | Context.h | 138 StaticSymbolSourceBuilder& AddPublicSymbol(const android::StringPiece& name, ResourceId id, 148 StaticSymbolSourceBuilder& AddSymbol(const android::StringPiece& name, ResourceId id, 175 std::unique_ptr<SymbolTable::Symbol> FindById(ResourceId id) override { in FindById() 185 std::map<ResourceId, SymbolTable::Symbol*> id_map_;
|
/frameworks/base/cmds/idmap2/libidmap2/ |
D | Idmap.cpp | 50 void Add(ResourceId target_resid, ResourceId overlay_resid) { in Add() 53 map_.emplace(target_typeid, std::set<std::pair<ResourceId, ResourceId>>()); in Add() 58 inline const std::map<TypeId, std::set<std::pair<ResourceId, ResourceId>>>& WARN_UNUSED 65 std::map<TypeId, std::set<std::pair<ResourceId, ResourceId>>> map_; 100 ResourceId NameToResid(const AssetManager2& am, const std::string& name) { in NameToResid() 212 ResourceId resid; in FromBinaryStream() 283 const PolicyBitmask& fulfilled_policies, const ResourceId& resid) { in CheckOverlayable() 411 const ResourceId overlay_resid = *iter; in FromApkAssets() 419 const ResourceId target_resid = NameToResid(target_asset_manager, full_name); in FromApkAssets()
|
/frameworks/base/cmds/idmap2/idmap2/ |
D | Lookup.cpp | 57 using android::idmap2::ResourceId; 66 Result<ResourceId> WARN_UNUSED ParseResReference(const AssetManager2& am, const std::string& res, in ParseResReference() 72 ResourceId resid; in ParseResReference() 88 Result<std::string> WARN_UNUSED GetValue(const AssetManager2& am, ResourceId resid) { in GetValue() 233 const Result<ResourceId> resid = ParseResReference(am, resid_str, target_package_name); in Lookup()
|
/frameworks/base/core/java/android/content/pm/ |
D | SuspendDialogInfo.java | 26 import android.content.res.ResourceId; 295 Preconditions.checkArgument(ResourceId.isValid(resId), "Invalid resource id provided"); in setIcon() 309 Preconditions.checkArgument(ResourceId.isValid(resId), "Invalid resource id provided"); in setTitle() 350 Preconditions.checkArgument(ResourceId.isValid(resId), "Invalid resource id provided"); in setMessage() 365 Preconditions.checkArgument(ResourceId.isValid(resId), "Invalid resource id provided"); in setNeutralButtonText()
|