/frameworks/base/tools/aapt2/ |
D | ResourceUtils.h | 153 std::unique_ptr<BinaryPrimitive> MakeEmpty(); 159 std::unique_ptr<BinaryPrimitive> TryParseColor(const android::StringPiece& str); 165 std::unique_ptr<BinaryPrimitive> TryParseBool(const android::StringPiece& str); 168 std::unique_ptr<BinaryPrimitive> MakeBool(bool val); 174 std::unique_ptr<BinaryPrimitive> TryParseInt(const android::StringPiece& str); 177 std::unique_ptr<BinaryPrimitive> MakeInt(uint32_t value); 183 std::unique_ptr<BinaryPrimitive> TryParseFloat(const android::StringPiece& str); 189 std::unique_ptr<BinaryPrimitive> TryParseEnumSymbol(const Attribute* enum_attr, 196 std::unique_ptr<BinaryPrimitive> TryParseFlagSymbol(const Attribute* enum_attr,
|
D | ResourceUtils.cpp | 367 std::unique_ptr<BinaryPrimitive> MakeEmpty() { in MakeEmpty() 368 return util::make_unique<BinaryPrimitive>(android::Res_value::TYPE_NULL, in MakeEmpty() 372 std::unique_ptr<BinaryPrimitive> TryParseEnumSymbol(const Attribute* enum_attr, in TryParseEnumSymbol() 383 return util::make_unique<BinaryPrimitive>(value); in TryParseEnumSymbol() 389 std::unique_ptr<BinaryPrimitive> TryParseFlagSymbol(const Attribute* flag_attr, in TryParseFlagSymbol() 397 return util::make_unique<BinaryPrimitive>(flags); in TryParseFlagSymbol() 420 return util::make_unique<BinaryPrimitive>(flags); in TryParseFlagSymbol() 436 std::unique_ptr<BinaryPrimitive> TryParseColor(const StringPiece& str) { in TryParseColor() 487 return error ? std::unique_ptr<BinaryPrimitive>() in TryParseColor() 488 : util::make_unique<BinaryPrimitive>(value); in TryParseColor() [all …]
|
D | ResourceValues_test.cpp | 238 EXPECT_TRUE(attr2.Matches(BinaryPrimitive(TYPE_INT_DEC, static_cast<uint32_t>(-1)))); in TEST() 239 EXPECT_TRUE(attr2.Matches(BinaryPrimitive(TYPE_INT_DEC, 1u))); in TEST() 240 EXPECT_FALSE(attr2.Matches(BinaryPrimitive(TYPE_INT_DEC, static_cast<uint32_t>(-2)))); in TEST() 253 EXPECT_TRUE(attr3.Matches(BinaryPrimitive(TYPE_INT_DEC, 0x01u | 0x02u))); in TEST() 254 EXPECT_TRUE(attr3.Matches(BinaryPrimitive(TYPE_INT_DEC, 0x01u | 0x02u | 0x80u))); in TEST() 257 EXPECT_TRUE(attr3.Matches(BinaryPrimitive(TYPE_INT_DEC, 0x08u))); in TEST() 260 EXPECT_FALSE(attr3.Matches(BinaryPrimitive(TYPE_INT_DEC, 127u))); in TEST() 265 EXPECT_TRUE(attr4.Matches(BinaryPrimitive(TYPE_INT_DEC, 0x01u))); in TEST() 266 EXPECT_FALSE(attr4.Matches(BinaryPrimitive(TYPE_INT_DEC, 0x02u))); in TEST()
|
D | ResourceUtils_test.cpp | 189 std::unique_ptr<BinaryPrimitive> result = ResourceUtils::TryParseFlagSymbol(attr.get(), ""); in TEST() 200 …ASSERT_THAT(ResourceUtils::MakeEmpty(), Pointee(ValueEq(BinaryPrimitive(Res_value::TYPE_NULL, Res_… in TEST() 201 …ASSERT_THAT(ResourceUtils::TryParseNullOrEmpty("@empty"), Pointee(ValueEq(BinaryPrimitive(Res_valu… in TEST() 206 Pointee(ValueEq(BinaryPrimitive(Res_value::TYPE_INT_DEC, 12u)))); in TEST() 208 Pointee(ValueEq(BinaryPrimitive(Res_value::TYPE_INT_BOOLEAN, 0xffffffffu)))); in TEST() 213 Pointee(ValueEq(BinaryPrimitive(Res_value::TYPE_FLOAT, expected_float_flattened)))); in TEST()
|
D | ResourceValues.h | 277 struct BinaryPrimitive : public BaseItem<BinaryPrimitive> { struct 280 BinaryPrimitive() = default; argument 281 explicit BinaryPrimitive(const android::Res_value& val); 282 BinaryPrimitive(uint8_t dataType, uint32_t data); 286 BinaryPrimitive* Clone(StringPool* new_pool) const override;
|
D | ResourceValues.cpp | 386 BinaryPrimitive::BinaryPrimitive(const android::Res_value& val) : value(val) { in BinaryPrimitive() function in aapt::BinaryPrimitive 389 BinaryPrimitive::BinaryPrimitive(uint8_t dataType, uint32_t data) { in BinaryPrimitive() function in aapt::BinaryPrimitive 394 bool BinaryPrimitive::Equals(const Value* value) const { in Equals() 395 const BinaryPrimitive* other = ValueCast<BinaryPrimitive>(value); in Equals() 403 bool BinaryPrimitive::Flatten(::android::Res_value* out_value) const { in Flatten() 409 BinaryPrimitive* BinaryPrimitive::Clone(StringPool* /*new_pool*/) const { in Clone() 410 return new BinaryPrimitive(*this); in Clone() 413 void BinaryPrimitive::Print(std::ostream* out) const { in Print() 474 void BinaryPrimitive::PrettyPrint(Printer* printer) const { in PrettyPrint()
|
D | ResourceTable_test.cpp | 92 test::ValueBuilder<BinaryPrimitive>(android::Res_value{}) in TEST() 100 …EXPECT_THAT(test::GetValueForConfig<BinaryPrimitive>(&table, "android:string/ok", language_config)… in TEST() 359 ASSERT_THAT(ValueCast<BinaryPrimitive>(entry1->values[0]->value.get()), NotNull()); in TEST() 360 ASSERT_THAT(ValueCast<BinaryPrimitive>(entry1->values[0]->value.get())->value.data, Eq(0u)); in TEST() 368 ASSERT_THAT(ValueCast<BinaryPrimitive>(entry2->values[0]->value.get()), NotNull()); in TEST() 369 ASSERT_THAT(ValueCast<BinaryPrimitive>(entry2->values[0]->value.get())->value.data, Eq(1u)); in TEST()
|
D | ValueVisitor.h | 39 virtual void Visit(BinaryPrimitive* value) { VisitItem(value); } in Visit() 76 virtual void Visit(const BinaryPrimitive* value) { in Visit()
|
D | Resources.proto | 399 INTEGER = 0x04; // Allows any integer BinaryPrimitive values. 400 BOOLEAN = 0x08; // Allows any boolean BinaryPrimitive values. 401 COLOR = 0x010; // Allows any color BinaryPrimitive values. 402 FLOAT = 0x020; // Allows any float BinaryPrimitive values. 403 DIMENSION = 0x040; // Allows any dimension BinaryPrimitive values. 404 FRACTION = 0x080; // Allows any fraction BinaryPrimitive values.
|
D | ResourceParser_test.cpp | 316 BinaryPrimitive* integer = test::GetValue<BinaryPrimitive>(&table_, "integer/foo"); in TEST_F() 453 std::unique_ptr<BinaryPrimitive> flag_value = in TEST_F() 890 BinaryPrimitive* val = test::GetValue<BinaryPrimitive>(&table_, "integer/foo"); in TEST_F() 901 BinaryPrimitive* val = test::GetValue<BinaryPrimitive>(&table_, "integer/foo"); in TEST_F()
|
/frameworks/base/tools/aapt2/format/proto/ |
D | ProtoSerialize_test.cpp | 132 BinaryPrimitive* prim = test::GetValueForConfigAndProduct<BinaryPrimitive>( in TEST() 137 prim = test::GetValueForConfigAndProduct<BinaryPrimitive>( in TEST() 245 const BinaryPrimitive* prim = ValueCast<BinaryPrimitive>(actual_attr.compiled_value.get()); in TEST() 340 BinaryPrimitive* bp = test::GetValueForConfigAndProduct<BinaryPrimitive>( in TEST() 346 bp = test::GetValueForConfigAndProduct<BinaryPrimitive>(&new_table, "android:bool/boolean_false", in TEST() 352 bp = test::GetValueForConfigAndProduct<BinaryPrimitive>(&new_table, "android:color/color_rgb8", in TEST() 358 bp = test::GetValueForConfigAndProduct<BinaryPrimitive>(&new_table, "android:color/color_argb8", in TEST() 364 bp = test::GetValueForConfigAndProduct<BinaryPrimitive>(&new_table, "android:color/color_rgb4", in TEST() 370 bp = test::GetValueForConfigAndProduct<BinaryPrimitive>(&new_table, "android:color/color_argb4", in TEST() 376 bp = test::GetValueForConfigAndProduct<BinaryPrimitive>(&new_table, "android:integer/integer_444", in TEST() [all …]
|
D | ProtoSerialize.cpp | 492 void Visit(const BinaryPrimitive* prim) override { in Visit()
|
/frameworks/base/tools/aapt2/cmd/ |
D | Util.cpp | 192 util::make_unique<BinaryPrimitive>(android::Res_value::TYPE_INT_DEC, version_code)}); in GenerateSplitManifest() 200 util::make_unique<BinaryPrimitive>(android::Res_value::TYPE_INT_DEC, version_code_major)}); in GenerateSplitManifest() 208 util::make_unique<BinaryPrimitive>(android::Res_value::TYPE_INT_DEC, revision_code)}); in GenerateSplitManifest() 239 util::make_unique<BinaryPrimitive>(android::Res_value::TYPE_INT_BOOLEAN, 0u)}); in GenerateSplitManifest() 274 const BinaryPrimitive* compiled_prim = ValueCast<BinaryPrimitive>(attr.compiled_value.get()); in ExtractCompiledInt() 298 const BinaryPrimitive* compiled_prim = ValueCast<BinaryPrimitive>(attr.compiled_value.get()); in ExtractSdkVersion()
|
D | Link.cpp | 778 if (BinaryPrimitive* prim = ValueCast<BinaryPrimitive>(attr->compiled_value.get())) { in ExtractCompileSdkVersions()
|
/frameworks/base/tools/aapt2/link/ |
D | TableMerger_test.cpp | 176 BinaryPrimitive* foo = test::GetValue<BinaryPrimitive>(&final_table, "com.app.a:bool/foo"); in TEST_F() 178 Pointee(Field(&BinaryPrimitive::value, Field(&android::Res_value::data, Eq(0u))))); in TEST_F() 216 BinaryPrimitive* foo = test::GetValue<BinaryPrimitive>(&final_table, "com.app.a:bool/foo"); in TEST_F() 217 EXPECT_THAT(foo, Pointee(Property(&BinaryPrimitive::GetComment, StrEq("Original foo comment")))); in TEST_F() 218 BinaryPrimitive* bar = test::GetValue<BinaryPrimitive>(&final_table, "com.app.a:bool/bar"); in TEST_F() 219 EXPECT_THAT(bar, Pointee(Property(&BinaryPrimitive::GetComment, StrEq("")))); in TEST_F() 220 BinaryPrimitive* baz = test::GetValue<BinaryPrimitive>(&final_table, "com.app.a:bool/baz"); in TEST_F() 221 EXPECT_THAT(baz, Pointee(Property(&BinaryPrimitive::GetComment, StrEq("Overlay baz comment")))); in TEST_F()
|
D | ReferenceLinker_test.cpp | 132 ASSERT_THAT(ValueCast<BinaryPrimitive>(style->entries[0].value.get()), NotNull()); in TEST() 136 ASSERT_THAT(ValueCast<BinaryPrimitive>(style->entries[1].value.get()), NotNull()); in TEST()
|
D | ManifestFixer_test.cpp | 589 EXPECT_THAT(ValueCast<BinaryPrimitive>(attr->compiled_value.get()), NotNull()); in TEST_F()
|
D | ManifestFixer.cpp | 177 std::unique_ptr<BinaryPrimitive> result = ResourceUtils::TryParseBool(attr->value); in FixCoreAppAttribute()
|
/frameworks/base/tools/aapt2/format/binary/ |
D | TableFlattener_test.cpp | 162 util::make_unique<BinaryPrimitive>(uint8_t(Res_value::TYPE_INT_DEC), 1u)) in TEST_F() 165 util::make_unique<BinaryPrimitive>(uint8_t(Res_value::TYPE_INT_DEC), 2u)) in TEST_F() 243 array->elements.push_back(util::make_unique<BinaryPrimitive>(uint8_t(Res_value::TYPE_INT_DEC), in TEST_F() 245 array->elements.push_back(util::make_unique<BinaryPrimitive>(uint8_t(Res_value::TYPE_INT_DEC), in TEST_F() 311 util::make_unique<BinaryPrimitive>(Res_value::TYPE_INT_DEC, static_cast<uint32_t>(i)); in BuildTableWithSparseEntries() 354 auto value = test::GetValueForConfig<BinaryPrimitive>(&sparse_table, "android:string/foo_0", in TEST_F() 359 ASSERT_THAT(test::GetValueForConfig<BinaryPrimitive>(&sparse_table, "android:string/foo_1", in TEST_F() 363 value = test::GetValueForConfig<BinaryPrimitive>(&sparse_table, "android:string/foo_4", in TEST_F() 530 util::make_unique<BinaryPrimitive>(uint8_t(Res_value::TYPE_INT_DEC), 1u)) in TEST_F() 533 util::make_unique<BinaryPrimitive>(uint8_t(Res_value::TYPE_INT_DEC), 2u)) in TEST_F() [all …]
|
D | TableFlattener.cpp | 93 BinaryPrimitive val(Res_value::TYPE_INT_DEC, attr->type_mask); in Visit() 99 BinaryPrimitive val(Res_value::TYPE_INT_DEC, static_cast<uint32_t>(attr->min_int)); in Visit() 105 BinaryPrimitive val(Res_value::TYPE_INT_DEC, static_cast<uint32_t>(attr->max_int)); in Visit() 110 BinaryPrimitive val(Res_value::TYPE_INT_DEC, s.value); in Visit() 132 BinaryPrimitive val(Res_value{}); in Visit()
|
/frameworks/base/tools/aapt2/optimize/ |
D | MultiApkGenerator.cpp | 287 auto version_code_value = ValueCast<BinaryPrimitive>(version_code->compiled_value.get()); in UpdateManifest() 295 BinaryPrimitive* version_code_major_value = nullptr; in UpdateManifest() 297 version_code_major_value = ValueCast<BinaryPrimitive>(version_code_major->compiled_value.get()); in UpdateManifest()
|
/frameworks/base/tools/aapt2/test/ |
D | Common.h | 125 template std::ostream& operator<<<BinaryPrimitive>(std::ostream&, const BinaryPrimitive&);
|
D | Builders.cpp | 160 std::unique_ptr<BinaryPrimitive> BuildPrimitive(uint8_t type, uint32_t data) { in BuildPrimitive() 165 return util::make_unique<BinaryPrimitive>(value); in BuildPrimitive()
|
D | Builders.h | 90 std::unique_ptr<BinaryPrimitive> BuildPrimitive(uint8_t type, uint32_t data);
|
/frameworks/base/tools/aapt2/dump/ |
D | DumpManifest.cpp | 245 if (BinaryPrimitive* intValue = ValueCast<BinaryPrimitive>(value)) { in GetAttributeInteger()
|