Home | History | Annotate | Download | only in tests

Lines Matching full:assetmanager

18 #include "androidfw/AssetManager.h"
94 AssetManager2 assetmanager;
95 assetmanager.SetConfiguration(desired_config);
96 assetmanager.SetApkAssets({basic_assets_.get()});
103 assetmanager.GetResource(basic::R::string::test1, false /*may_be_bag*/,
124 AssetManager2 assetmanager;
125 assetmanager.SetConfiguration(desired_config);
126 assetmanager.SetApkAssets({basic_assets_.get(), basic_de_fr_assets_.get()});
133 assetmanager.GetResource(basic::R::string::test1, false /*may_be_bag*/,
149 AssetManager2 assetmanager;
153 assetmanager.SetApkAssets(
161 assetmanager.GetResource(libclient::R::string::foo_one, false /*may_be_bag*/,
170 cookie = assetmanager.GetResource(value.data, false /* may_be_bag */, 0 /* density_override*/,
176 GetStringFromPool(assetmanager.GetStringPoolForCookie(cookie), value.data));
178 cookie = assetmanager.GetResource(libclient::R::string::foo_two, false /*may_be_bag*/,
187 cookie = assetmanager.GetResource(value.data, false /* may_be_bag */, 0 /* density_override*/,
193 GetStringFromPool(assetmanager.GetStringPoolForCookie(cookie), value.data));
197 AssetManager2 assetmanager;
198 assetmanager.SetApkAssets({appaslib_assets_.get()});
205 ApkAssetsCookie cookie = assetmanager.GetResource(
214 AssetManager2 assetmanager;
215 assetmanager.SetApkAssets({basic_assets_.get()});
217 const ResolvedBag* bag = assetmanager.GetBag(basic::R::array::integerArray1);
237 AssetManager2 assetmanager;
241 assetmanager.SetApkAssets(
244 const ResolvedBag* bag = assetmanager.GetBag(fix_package_id(lib_one::R::style::Theme, 0x03));
256 AssetManager2 assetmanager;
260 assetmanager.SetApkAssets(
263 const ResolvedBag* bag = assetmanager.GetBag(libclient::R::style::Theme);
275 AssetManager2 assetmanager;
276 assetmanager.SetApkAssets({style_assets_.get()});
278 const ResolvedBag* bag_one = assetmanager.GetBag(app::R::style::StyleOne);
292 const ResolvedBag* bag_two = assetmanager.GetBag(app::R::style::StyleTwo);
306 EXPECT_EQ(std::string("string"), GetStringFromPool(assetmanager.GetStringPoolForCookie(0),
333 AssetManager2 assetmanager;
334 assetmanager.SetApkAssets({style_assets_.get()});
338 const ResolvedBag* bag_one = assetmanager.GetBag(app::R::style::StyleFour);
344 AssetManager2 assetmanager;
345 assetmanager.SetApkAssets({basic_assets_.get()});
351 assetmanager.GetResource(basic::R::integer::ref1, false /*may_be_bag*/,
359 cookie = assetmanager.ResolveReference(cookie, &value, &selected_config, &flags, &last_ref);
367 AssetManager2 assetmanager;
368 assetmanager.SetApkAssets({basic_assets_.get()});
374 assetmanager.GetResource(basic::R::integer::number2, true /*may_be_bag*/,
382 cookie = assetmanager.ResolveReference(cookie, &value, &selected_config, &flags, &last_ref);
390 AssetManager2 assetmanager;
391 assetmanager.SetApkAssets({basic_assets_.get()});
394 const uint32_t high_ref = assetmanager
397 const uint32_t middle_ref = assetmanager
400 const uint32_t low_ref = assetmanager
408 ApkAssetsCookie cookie = assetmanager.GetResource(high_ref, false /*may_be_bag*/,
417 assetmanager.ResolveReference(cookie, &value, &config, &flags, &last_ref);
422 AssetManager2 assetmanager;
423 assetmanager.SetApkAssets({basic_assets_.get()});
436 EXPECT_EQ(1, assetmanager.ResolveReference(1, &value, &selected_config, &flags, &last_ref));
446 AssetManager2 assetmanager;
447 assetmanager.SetApkAssets({system_assets_.get(), basic_de_fr_assets_.get()});
449 std::set<ResTable_config> configurations = assetmanager.GetResourceConfigurations();
470 configurations = assetmanager.GetResourceConfigurations(true /* exclude_system */);
489 AssetManager2 assetmanager;
490 assetmanager.SetApkAssets({system_assets_.get(), basic_de_fr_assets_.get()});
492 std::set<std::string> locales = assetmanager.GetResourceLocales();
500 locales = assetmanager.GetResourceLocales(true /*exclude_system*/);
508 AssetManager2 assetmanager;
509 assetmanager.SetApkAssets({basic_assets_.get()});
512 assetmanager.GetResourceId("com.android.basic:layout/main", "", ""));
514 assetmanager.GetResourceId("layout/main", "", "com.android.basic"));
516 assetmanager.GetResourceId("main", "layout", "com.android.basic"));
520 AssetManager2 assetmanager;
521 assetmanager.SetApkAssets({system_assets_.get()});
523 std::unique_ptr<Asset> asset = assetmanager.Open("file.txt", Asset::ACCESS_BUFFER);
532 AssetManager2 assetmanager;
533 assetmanager.SetApkAssets({system_assets_.get(), app_assets_.get()});
535 std::unique_ptr<Asset> asset = assetmanager.Open("file.txt", Asset::ACCESS_BUFFER);
544 AssetManager2 assetmanager;
545 assetmanager.SetApkAssets({system_assets_.get()});
547 std::unique_ptr<AssetDir> asset_dir = assetmanager.OpenDir("");
557 asset_dir = assetmanager.OpenDir("subdir");
566 AssetManager2 assetmanager;
567 assetmanager.SetApkAssets({system_assets_.get(), app_assets_.get()});
569 std::unique_ptr<AssetDir> asset_dir = assetmanager.OpenDir("");