Home
last modified time | relevance | path

Searched refs:Res_value (Results 1 – 25 of 58) sorted by relevance

123

/frameworks/base/libs/androidfw/tests/
DDynamicRefTable_test.cpp27 Res_value value; in TEST()
28 value.dataType = Res_value::TYPE_REFERENCE; in TEST()
36 Res_value value2; in TEST()
37 value2.dataType = Res_value::TYPE_REFERENCE; in TEST()
47 Res_value value; in TEST()
48 value.dataType = Res_value::TYPE_ATTRIBUTE; in TEST()
56 Res_value value2; in TEST()
57 value2.dataType = Res_value::TYPE_ATTRIBUTE; in TEST()
68 Res_value value; in TEST()
69 value.dataType = Res_value::TYPE_DYNAMIC_REFERENCE; in TEST()
[all …]
DAttributeResolution_test.cpp87 EXPECT_EQ(Res_value::TYPE_INT_DEC, values_cursor[STYLE_TYPE]); in TEST()
95 EXPECT_EQ(Res_value::TYPE_INT_DEC, values_cursor[STYLE_TYPE]); in TEST()
118 EXPECT_EQ(Res_value::TYPE_INT_DEC, values_cursor[STYLE_TYPE]); in TEST_F()
126 EXPECT_EQ(Res_value::TYPE_STRING, values_cursor[STYLE_TYPE]); in TEST_F()
133 EXPECT_EQ(Res_value::TYPE_INT_DEC, values_cursor[STYLE_TYPE]); in TEST_F()
141 EXPECT_EQ(Res_value::TYPE_NULL, values_cursor[STYLE_TYPE]); in TEST_F()
142 EXPECT_EQ(Res_value::DATA_NULL_UNDEFINED, values_cursor[STYLE_DATA]); in TEST_F()
151 EXPECT_EQ(Res_value::TYPE_NULL, values_cursor[STYLE_TYPE]); in TEST_F()
152 EXPECT_EQ(Res_value::DATA_NULL_EMPTY, values_cursor[STYLE_DATA]); in TEST_F()
168 EXPECT_EQ(Res_value::TYPE_NULL, values_cursor[STYLE_TYPE]); in TEST_F()
[all …]
DResTable_test.cpp63 Res_value val; in TEST()
68 EXPECT_EQ(Res_value::TYPE_INT_DEC, val.dataType); in TEST()
111 Res_value val; in TEST()
115 ASSERT_EQ(Res_value::TYPE_INT_DEC, val.dataType); in TEST()
120 ASSERT_EQ(Res_value::TYPE_REFERENCE, val.dataType); in TEST()
135 Res_value val; in TEST()
139 ASSERT_EQ(Res_value::TYPE_INT_DEC, val.dataType); in TEST()
144 ASSERT_EQ(Res_value::TYPE_REFERENCE, val.dataType); in TEST()
159 Res_value val; in TEST()
163 ASSERT_EQ(Res_value::TYPE_INT_DEC, val.dataType); in TEST()
[all …]
DTheme_test.cpp71 Res_value value; in TEST_F()
83 Res_value value; in TEST_F()
89 EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType); in TEST_F()
95 EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType); in TEST_F()
107 Res_value value; in TEST_F()
113 EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType); in TEST_F()
119 EXPECT_EQ(Res_value::TYPE_STRING, value.dataType); in TEST_F()
128 EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType); in TEST_F()
140 Res_value value; in TEST_F()
153 Res_value value; in TEST_F()
[all …]
DAssetManager2_test.cpp102 Res_value value; in TEST_F()
119 EXPECT_EQ(Res_value::TYPE_STRING, value.dataType); in TEST_F()
132 Res_value value; in TEST_F()
149 EXPECT_EQ(Res_value::TYPE_STRING, value.dataType); in TEST_F()
160 Res_value value; in TEST_F()
171 EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType); in TEST_F()
178 EXPECT_EQ(Res_value::TYPE_STRING, value.dataType); in TEST_F()
188 EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType); in TEST_F()
195 EXPECT_EQ(Res_value::TYPE_STRING, value.dataType); in TEST_F()
206 Res_value value; in TEST_F()
[all …]
DAppAsLib_test.cpp37 Res_value val; in TEST()
40 ASSERT_EQ(Res_value::TYPE_REFERENCE, val.dataType); in TEST()
56 Res_value val; in TEST()
59 ASSERT_EQ(Res_value::TYPE_REFERENCE, val.dataType); in TEST()
75 Res_value val; in TEST()
78 ASSERT_EQ(Res_value::TYPE_REFERENCE, val.dataType); in TEST()
DSplit_test.cpp85 Res_value val; in TEST_F()
98 EXPECT_EQ(Res_value::TYPE_STRING, val.dataType); in TEST_F()
113 Res_value val; in TEST_F()
122 EXPECT_EQ(Res_value::TYPE_STRING, val.dataType); in TEST_F()
162 Res_value val; in TEST_F()
218 Res_value val; in TEST_F()
228 EXPECT_EQ(Res_value::TYPE_STRING, val.dataType); in TEST_F()
DIdmap_test.cpp63 Res_value val; in TEST_F()
66 ASSERT_EQ(Res_value::TYPE_STRING, val.dataType); in TEST_F()
82 ASSERT_EQ(Res_value::TYPE_STRING, val.dataType); in TEST_F()
116 Res_value val; in TEST_F()
/frameworks/base/libs/androidfw/
DAttributeResolution.cpp74 Res_value value; in ResolveAttrs()
81 Res_value value; in ResolveAttrs()
83 if (value.dataType == Res_value::TYPE_REFERENCE) { in ResolveAttrs()
112 value.dataType = Res_value::TYPE_NULL; in ResolveAttrs()
113 value.data = Res_value::DATA_NULL_UNDEFINED; in ResolveAttrs()
122 value.dataType = Res_value::TYPE_ATTRIBUTE; in ResolveAttrs()
140 if (value.dataType != Res_value::TYPE_NULL) { in ResolveAttrs()
150 } else if (value.data != Res_value::DATA_NULL_EMPTY) { in ResolveAttrs()
169 if (value.dataType == Res_value::TYPE_REFERENCE && value.data == 0) { in ResolveAttrs()
173 value.dataType = Res_value::TYPE_NULL; in ResolveAttrs()
[all …]
DResourceTypes.cpp145 void Res_value::copyFrom_dtoh(const Res_value& src) in copyFrom_dtoh()
1142 ssize_t ResXMLParser::getTextValue(Res_value* outValue) const in getTextValue()
1146 return sizeof(Res_value); in getTextValue()
1340 if (type != Res_value::TYPE_DYNAMIC_REFERENCE) { in getAttributeDataType()
1346 return Res_value::TYPE_REFERENCE; in getAttributeDataType()
1349 return Res_value::TYPE_NULL; in getAttributeDataType()
1361 if (attr->typedValue.dataType != Res_value::TYPE_DYNAMIC_REFERENCE || in getAttributeData()
1375 ssize_t ResXMLParser::getAttributeValue(size_t idx, Res_value* outValue) const in getAttributeValue()
1389 return sizeof(Res_value); in getAttributeValue()
3747 memset(curEntries, Res_value::TYPE_NULL, buff_size); in applyStyle()
[all …]
DAssetManager2.cpp692 uint16_t density_override, Res_value* out_value, in GetResource()
709 out_value->dataType = Res_value::TYPE_REFERENCE; in GetResource()
716 const Res_value* device_value = reinterpret_cast<const Res_value*>( in GetResource()
728 ApkAssetsCookie AssetManager2::ResolveReference(ApkAssetsCookie cookie, Res_value* in_out_value, in ResolveReference()
734 for (size_t iteration = 0u; in_out_value->dataType == Res_value::TYPE_REFERENCE && in ResolveReference()
1107 Res_value value;
1197 if (force || (entry.value.dataType == Res_value::TYPE_NULL && in ApplyStyle()
1198 entry.value.data != Res_value::DATA_NULL_EMPTY)) { in ApplyStyle()
1207 ApkAssetsCookie Theme::GetAttribute(uint32_t resid, Res_value* out_value, in GetAttribute()
1226 if (entry.value.dataType == Res_value::TYPE_ATTRIBUTE) { in GetAttribute()
[all …]
/frameworks/base/tools/aapt/
DAaptXml.cpp28 Res_value value; in getStringAttributeAtIndex()
36 if (value.dataType != Res_value::TYPE_STRING) { in getStringAttributeAtIndex()
50 Res_value value; in getIntegerAttributeAtIndex()
58 if (value.dataType < Res_value::TYPE_FIRST_INT in getIntegerAttributeAtIndex()
59 || value.dataType > Res_value::TYPE_LAST_INT) { in getIntegerAttributeAtIndex()
103 Res_value value; in getResolvedAttribute()
112 if (value.dataType == Res_value::TYPE_STRING) { in getResolvedAttribute()
127 if (value.dataType != Res_value::TYPE_STRING) { in getResolvedAttribute()
163 Res_value value; in getResolvedIntegerAttribute()
165 if (value.dataType == Res_value::TYPE_REFERENCE) { in getResolvedIntegerAttribute()
[all …]
DXMLNode.h80 value.dataType = Res_value::TYPE_NULL; in attribute_entry()
85 || value.dataType == Res_value::TYPE_NULL in needStringValue()
86 || value.dataType == Res_value::TYPE_STRING; in needStringValue()
92 Res_value value;
203 Res_value mCharsValue;
/frameworks/base/tools/aapt2/
DResourceUtils.cpp368 return util::make_unique<BinaryPrimitive>(android::Res_value::TYPE_NULL, in MakeEmpty()
369 android::Res_value::DATA_NULL_EMPTY); in MakeEmpty()
380 android::Res_value value = {}; in TryParseEnumSymbol()
381 value.dataType = android::Res_value::TYPE_INT_DEC; in TryParseEnumSymbol()
391 android::Res_value flags = {}; in TryParseFlagSymbol()
392 flags.dataType = android::Res_value::TYPE_INT_HEX; in TryParseFlagSymbol()
444 android::Res_value value = {}; in TryParseColor()
447 value.dataType = android::Res_value::TYPE_INT_COLOR_RGB4; in TryParseColor()
456 value.dataType = android::Res_value::TYPE_INT_COLOR_ARGB4; in TryParseColor()
466 value.dataType = android::Res_value::TYPE_INT_COLOR_RGB8; in TryParseColor()
[all …]
DResourceValues.cpp87 bool RawString::Flatten(android::Res_value* out_value) const { in Flatten()
88 out_value->dataType = android::Res_value::TYPE_STRING; in Flatten()
118 bool Reference::Flatten(android::Res_value* out_value) const { in Flatten()
124 out_value->dataType = android::Res_value::TYPE_DYNAMIC_REFERENCE; in Flatten()
126 out_value->dataType = android::Res_value::TYPE_REFERENCE; in Flatten()
130 out_value->dataType = android::Res_value::TYPE_DYNAMIC_ATTRIBUTE; in Flatten()
132 out_value->dataType = android::Res_value::TYPE_ATTRIBUTE; in Flatten()
217 bool Id::Flatten(android::Res_value* out) const { in Flatten()
218 out->dataType = android::Res_value::TYPE_INT_BOOLEAN; in Flatten()
258 bool String::Flatten(android::Res_value* out_value) const { in Flatten()
[all …]
DResourceValues.h137 virtual bool Flatten(android::Res_value* out_value) const = 0;
168 bool Flatten(android::Res_value* out_value) const override;
187 bool Flatten(android::Res_value* out) const override;
200 bool Flatten(android::Res_value* out_value) const override;
234 bool Flatten(android::Res_value* out_value) const override;
251 bool Flatten(android::Res_value* out_value) const override;
271 bool Flatten(android::Res_value* out_value) const override;
278 android::Res_value value;
281 explicit BinaryPrimitive(const android::Res_value& val);
285 bool Flatten(android::Res_value* out_value) const override;
DResourceUtils_test.cpp24 using ::android::Res_value;
200 …(ResourceUtils::MakeEmpty(), Pointee(ValueEq(BinaryPrimitive(Res_value::TYPE_NULL, Res_value::DATA… in TEST()
201 …yParseNullOrEmpty("@empty"), Pointee(ValueEq(BinaryPrimitive(Res_value::TYPE_NULL, Res_value::DATA… 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()
/frameworks/base/tools/aapt2/format/binary/
DTableFlattener_test.cpp95 Res_value val; in Exists()
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()
174 Res_value::TYPE_INT_BOOLEAN, 0u, 0u)); in TEST_F()
177 Res_value::TYPE_INT_BOOLEAN, 0u, 0u)); in TEST_F()
180 Res_value::TYPE_REFERENCE, 0x7f020000u, 0u)); in TEST_F()
183 Res_value::TYPE_INT_DEC, 1u, ResTable_config::CONFIG_VERSION)); in TEST_F()
186 test::ParseConfigOrDie("v1"), Res_value::TYPE_INT_DEC, 2u, in TEST_F()
193 Res_value::TYPE_STRING, (uint32_t)idx, 0u)); in TEST_F()
199 Res_value::TYPE_STRING, (uint32_t)idx, 0u)); in TEST_F()
[all …]
/frameworks/base/cmds/idmap2/libidmap2/
DXml.cpp52 case Res_value::TYPE_STRING: { in FindTag()
56 case Res_value::TYPE_INT_DEC: in FindTag()
57 case Res_value::TYPE_INT_HEX: in FindTag()
58 case Res_value::TYPE_INT_BOOLEAN: { in FindTag()
59 Res_value resValue; in FindTag()
/frameworks/base/libs/androidfw/include/androidfw/
DResourceTypes.h264 struct Res_value struct
388 void copyFrom_dtoh(const Res_value& src); argument
611 struct Res_value typedData;
688 struct Res_value typedValue;
736 ssize_t getTextValue(Res_value* outValue) const;
772 ssize_t getAttributeValue(size_t idx, Res_value* outValue) const;
1582 Res_value value;
1728 status_t lookupResourceValue(Res_value* value) const;
1741 bool U16StringToInt(const char16_t* s, size_t len, Res_value* outValue);
1812 ssize_t getResource(uint32_t resID, Res_value* outValue, bool mayBeBag = false,
[all …]
DAssetManager2.h50 Res_value value;
216 Res_value* out_value, ResTable_config* out_selected_config,
231 ApkAssetsCookie ResolveReference(ApkAssetsCookie cookie, Res_value* in_out_value,
461 ApkAssetsCookie GetAttribute(uint32_t resid, Res_value* out_value, uint32_t* out_flags) const;
465 ApkAssetsCookie ResolveAttributeReference(ApkAssetsCookie cookie, Res_value* in_out_value,
/frameworks/base/cmds/idmap2/idmap2/
DLookup.cpp49 using android::Res_value;
89 Res_value value; in GetValue()
108 case Res_value::TYPE_INT_DEC: in GetValue()
111 case Res_value::TYPE_INT_HEX: in GetValue()
114 case Res_value::TYPE_INT_BOOLEAN: in GetValue()
117 case Res_value::TYPE_STRING: { in GetValue()
/frameworks/base/tools/aapt2/format/proto/
DProtoSerialize_test.cpp80 test::BuildPrimitive(android::Res_value::TYPE_INT_DEC, 123u), context->GetDiagnostics())); in TEST()
83 test::BuildPrimitive(android::Res_value::TYPE_INT_DEC, 321u), context->GetDiagnostics())); in TEST()
247 EXPECT_THAT(prim->value.dataType, Eq(android::Res_value::TYPE_DIMENSION)); in TEST()
311 test::BuildPrimitive(android::Res_value::TYPE_INT_BOOLEAN, true)) in TEST()
313 test::BuildPrimitive(android::Res_value::TYPE_INT_BOOLEAN, false)) in TEST()
343 EXPECT_THAT(bp->value.dataType, Eq(android::Res_value::TYPE_INT_BOOLEAN)); in TEST()
349 EXPECT_THAT(bp->value.dataType, Eq(android::Res_value::TYPE_INT_BOOLEAN)); in TEST()
355 EXPECT_THAT(bp->value.dataType, Eq(android::Res_value::TYPE_INT_COLOR_RGB8)); in TEST()
361 EXPECT_THAT(bp->value.dataType, Eq(android::Res_value::TYPE_INT_COLOR_ARGB8)); in TEST()
367 EXPECT_THAT(bp->value.dataType, Eq(android::Res_value::TYPE_INT_COLOR_RGB4)); in TEST()
[all …]
DProtoSerialize.cpp493 android::Res_value val = {}; in Visit()
499 case android::Res_value::TYPE_NULL: { in Visit()
500 if (val.data == android::Res_value::DATA_NULL_UNDEFINED) { in Visit()
502 } else if (val.data == android::Res_value::DATA_NULL_EMPTY) { in Visit()
508 case android::Res_value::TYPE_FLOAT: { in Visit()
511 case android::Res_value::TYPE_DIMENSION: { in Visit()
514 case android::Res_value::TYPE_FRACTION: { in Visit()
517 case android::Res_value::TYPE_INT_DEC: { in Visit()
520 case android::Res_value::TYPE_INT_HEX: { in Visit()
523 case android::Res_value::TYPE_INT_BOOLEAN: { in Visit()
[all …]
/frameworks/base/tools/aapt2/cmd/
DUtil.cpp192 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()
276 if (compiled_prim->value.dataType >= android::Res_value::TYPE_FIRST_INT && in ExtractCompiledInt()
277 compiled_prim->value.dataType <= android::Res_value::TYPE_LAST_INT) { in ExtractCompiledInt()
300 if (compiled_prim->value.dataType >= android::Res_value::TYPE_FIRST_INT && in ExtractSdkVersion()
301 compiled_prim->value.dataType <= android::Res_value::TYPE_LAST_INT) { in ExtractSdkVersion()

123