Home
last modified time | relevance | path

Searched refs:bag (Results 1 – 13 of 13) sorted by relevance

/frameworks/base/libs/androidfw/tests/
DAssetManager2_test.cpp258 auto bag = assetmanager.GetBag(basic::R::array::integerArray1); in TEST_F() local
259 ASSERT_TRUE(bag.has_value()); in TEST_F()
261 ASSERT_EQ(3u, (*bag)->entry_count); in TEST_F()
263 EXPECT_EQ(static_cast<uint8_t>(Res_value::TYPE_INT_DEC), (*bag)->entries[0].value.dataType); in TEST_F()
264 EXPECT_EQ(1u, (*bag)->entries[0].value.data); in TEST_F()
265 EXPECT_EQ(0, (*bag)->entries[0].cookie); in TEST_F()
267 EXPECT_EQ(static_cast<uint8_t>(Res_value::TYPE_INT_DEC), (*bag)->entries[1].value.dataType); in TEST_F()
268 EXPECT_EQ(2u, (*bag)->entries[1].value.data); in TEST_F()
269 EXPECT_EQ(0, (*bag)->entries[1].cookie); in TEST_F()
271 EXPECT_EQ(static_cast<uint8_t>(Res_value::TYPE_INT_DEC), (*bag)->entries[2].value.dataType); in TEST_F()
[all …]
DAssetManager2_bench.cpp142 auto bag = assets.GetBag(app::R::style::StyleTwo); in BM_AssetManagerGetBag() local
143 if (!bag.has_value()) { in BM_AssetManagerGetBag()
147 const auto bag_end = end(*bag); in BM_AssetManagerGetBag()
148 for (auto iter = begin(*bag); iter != bag_end; ++iter) { in BM_AssetManagerGetBag()
/frameworks/base/core/jni/
Dandroid_util_AssetManager.cpp652 auto bag = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetResourceBagValue() local
653 if (!bag.has_value()) { in NativeGetResourceBagValue()
659 const auto rbegin = reverse_bag_iterator(end(*bag)); in NativeGetResourceBagValue()
660 const auto rend = reverse_bag_iterator(begin(*bag)); in NativeGetResourceBagValue()
669 AssetManager2::SelectedValue attr_value(*bag, *entry); in NativeGetResourceBagValue()
684 const ResolvedBag* bag = *bag_result; in NativeGetStyleAttributes() local
685 jintArray array = env->NewIntArray(bag->entry_count); in NativeGetStyleAttributes()
690 for (uint32_t i = 0; i < bag->entry_count; i++) { in NativeGetStyleAttributes()
691 jint attr_resid = bag->entries[i].key; in NativeGetStyleAttributes()
705 const ResolvedBag* bag = *bag_result; in NativeGetResourceStringArray() local
[all …]
/frameworks/base/libs/androidfw/include/androidfw/
DAssetManager2.h225 SelectedValue(const ResolvedBag* bag, const ResolvedBag::Entry& entry) : in SelectedValue()
227 flags(bag->type_spec_flags), resid(0U), config({}) {}; in SelectedValue()
578 inline const ResolvedBag::Entry* begin(const ResolvedBag* bag) { in begin() argument
579 return bag->entries; in begin()
582 inline const ResolvedBag::Entry* end(const ResolvedBag* bag) { in end() argument
583 return bag->entries + bag->entry_count; in end()
DResourceTypes.h1924 void unlockBag(const bag_entry* bag) const;
/frameworks/base/cmds/idmap2/idmap2/
DLookup.cpp130 const android::ResolvedBag* bag = bag_result.value(); in GetValue() local
131 for (size_t i = 0; i < bag->entry_count; ++i) { in GetValue()
132 AssetManager2::SelectedValue entry(bag, bag->entries[i]); in GetValue()
138 if (i != bag->entry_count - 1) { in GetValue()
/frameworks/base/libs/androidfw/
DAttributeResolution.cpp56 explicit BagAttributeFinder(const ResolvedBag* bag) in BagAttributeFinder() argument
57 : BackTrackingAttributeFinder(bag != nullptr ? bag->entries : nullptr, in BagAttributeFinder()
58 bag != nullptr ? bag->entries + bag->entry_count : nullptr) { in BagAttributeFinder()
DAssetManager2.cpp1047 auto bag = GetBag(value.data); in ResolveBag() local
1048 if (bag.has_value()) { in ResolveBag()
1049 value.flags |= (*bag)->type_spec_flags; in ResolveBag()
1051 return bag; in ResolveBag()
1056 const auto bag = GetBag(resid, found_resids); in GetBag() local
1058 return bag; in GetBag()
1432 auto bag = asset_manager_->GetBag(resid); in ApplyStyle() local
1433 if (!bag.has_value()) { in ApplyStyle()
1434 return base::unexpected(bag.error()); in ApplyStyle()
1438 type_spec_flags_ |= (*bag)->type_spec_flags; in ApplyStyle()
[all …]
DResourceTypes.cpp3799 const bag_entry* bag; in applyStyle() local
3802 const ssize_t N = mTable.getBagLocked(resID, &bag, &bagTypeSpecFlags); in applyStyle()
3820 const bag_entry* end = bag + N; in applyStyle()
3821 while (bag < end) { in applyStyle()
3822 const uint32_t attrRes = bag->map.name.ident; in applyStyle()
3831 bag++; in applyStyle()
3847 bag++; in applyStyle()
3868 bag++; in applyStyle()
3874 attrRes, bag->map.value.dataType, bag->map.value.data, in applyStyle()
3879 curEntry->stringBlock = bag->stringBlock; in applyStyle()
[all …]
/frameworks/base/tools/aapt2/process/
DSymbolTable.cpp280 const ResolvedBag* bag = *bag_result; in LookupAttributeInTable() local
281 const size_t count = bag->entry_count; in LookupAttributeInTable()
283 if (bag->entries[i].key == ResTable_map::ATTR_TYPE) { in LookupAttributeInTable()
284 s->attribute = std::make_shared<Attribute>(bag->entries[i].value.data); in LookupAttributeInTable()
291 const ResolvedBag::Entry& map_entry = bag->entries[i]; in LookupAttributeInTable()
/frameworks/base/tools/aapt2/
Dreadme.md127 - Support `<bag>` tag and treat as `<style>` regardless of type.
DResourceParser_test.cpp1017 <bag name="bag" type="configVarying"> in TEST_F()
/frameworks/base/tools/aapt/
DResourceTable.cpp4659 const KeyedVector<String16, Item>& bag = e->getBag(); in modifyForCompat() local
4660 const size_t bagCount = bag.size(); in modifyForCompat()
4662 const uint32_t attrId = getResId(bag.keyAt(bi), &attr16); in modifyForCompat()
4665 AaptUtil::appendValue(attributesToRemove, sdkLevel, bag.keyAt(bi)); in modifyForCompat()