/aosp12/frameworks/base/libs/androidfw/include/androidfw/ |
H A D | ResourceUtils.h | 40 inline uint32_t fix_package_id(uint32_t resid, uint8_t package_id) { in fix_package_id() argument 44 inline uint8_t get_package_id(uint32_t resid) { in get_package_id() argument 45 return static_cast<uint8_t>((resid >> 24) & 0x000000ffu); in get_package_id() 49 inline uint8_t get_type_id(uint32_t resid) { in get_type_id() argument 50 return static_cast<uint8_t>((resid >> 16) & 0x000000ffu); in get_type_id() 53 inline uint16_t get_entry_id(uint32_t resid) { in get_entry_id() argument 54 return static_cast<uint16_t>(resid & 0x0000ffffu); in get_entry_id() 57 inline bool is_internal_resid(uint32_t resid) { in is_internal_resid() argument 58 return (resid & 0xffff0000u) != 0 && (resid & 0x00ff0000u) == 0; in is_internal_resid() 61 inline bool is_valid_resid(uint32_t resid) { in is_valid_resid() argument [all …]
|
H A D | AssetManager2.h | 201 base::expected<ResourceName, NullOrIOError> GetResourceName(uint32_t resid) const; 221 flags(bag->type_spec_flags), resid(0U), config({}) {}; in SelectedValue() 237 uint32_t resid; member 244 uint32_t type_flags, uint32_t resid, const ResTable_config& config) : in SelectedValue() 246 resid(resid), config(config) {}; in SelectedValue() 286 base::expected<const ResolvedBag*, NullOrIOError> GetBag(uint32_t resid) const; 303 const std::vector<uint32_t> GetBagResIdStack(uint32_t resid) const; 393 base::expected<FindEntryResult, NullOrIOError> FindEntry(uint32_t resid, 421 uint32_t resid, std::vector<uint32_t>& child_resids) const; 476 uint32_t resid; member [all …]
|
/aosp12/frameworks/base/libs/androidfw/tests/ |
H A D | SparseEntry_bench.cpp | 27 static void BM_SparseEntryGetResourceOldSparse(benchmark::State& state, uint32_t resid) { in BM_SparseEntryGetResourceOldSparse() argument 31 GetResourceBenchmarkOld({GetTestDataPath() + "/sparse/sparse.apk"}, &config, resid, state); in BM_SparseEntryGetResourceOldSparse() 36 static void BM_SparseEntryGetResourceOldNotSparse(benchmark::State& state, uint32_t resid) { in BM_SparseEntryGetResourceOldNotSparse() argument 40 GetResourceBenchmarkOld({GetTestDataPath() + "/sparse/not_sparse.apk"}, &config, resid, state); in BM_SparseEntryGetResourceOldNotSparse() 45 static void BM_SparseEntryGetResourceSparse(benchmark::State& state, uint32_t resid) { in BM_SparseEntryGetResourceSparse() argument 49 GetResourceBenchmark({GetTestDataPath() + "/sparse/sparse.apk"}, &config, resid, state); in BM_SparseEntryGetResourceSparse() 54 static void BM_SparseEntryGetResourceNotSparse(benchmark::State& state, uint32_t resid) { in BM_SparseEntryGetResourceNotSparse() argument 58 GetResourceBenchmark({GetTestDataPath() + "/sparse/not_sparse.apk"}, &config, resid, state); in BM_SparseEntryGetResourceNotSparse()
|
H A D | BenchmarkHelpers.cpp | 26 uint32_t resid, benchmark::State& state) { in GetResourceBenchmarkOld() argument 48 ssize_t block = table.getResource(resid, &value, false /*may_be_bag*/, 0u /*density*/, &flags, in GetResourceBenchmarkOld() 55 uint32_t resid, benchmark::State& state) { in GetResourceBenchmark() argument 75 auto value = assetmanager.GetResource(resid); in GetResourceBenchmark()
|
H A D | AssetManager2_test.cpp | 426 EXPECT_EQ(basic::R::integer::ref2, value->resid); in TEST_F() 468 EXPECT_EQ(*low_ref, value->resid); in TEST_F() 502 value.resid = basic::R::string::test1; in TEST_F() 507 EXPECT_EQ(basic::R::string::test1, value.resid); in TEST_F() 554 EXPECT_EQ(kMissingResId, value.resid); in TEST_F() 650 ASSERT_TRUE(resid.has_value()); in TEST_F() 651 EXPECT_EQ(basic::R::layout::main, *resid); in TEST_F() 654 ASSERT_TRUE(resid.has_value()); in TEST_F() 655 EXPECT_EQ(basic::R::layout::main, *resid); in TEST_F() 658 ASSERT_TRUE(resid.has_value()); in TEST_F() [all …]
|
H A D | BenchmarkHelpers.h | 31 uint32_t resid, ::benchmark::State& state); 34 uint32_t resid, benchmark::State& state);
|
H A D | AssetManager2_bench.cpp | 84 static void BM_AssetManagerGetResource(benchmark::State& state, uint32_t resid) { in BM_AssetManagerGetResource() argument 85 GetResourceBenchmark({GetTestDataPath() + "/basic/basic.apk"}, nullptr /*config*/, resid, state); in BM_AssetManagerGetResource() 90 static void BM_AssetManagerGetResourceOld(benchmark::State& state, uint32_t resid) { in BM_AssetManagerGetResourceOld() argument 91 GetResourceBenchmarkOld({GetTestDataPath() + "/basic/basic.apk"}, nullptr /*config*/, resid, in BM_AssetManagerGetResourceOld()
|
/aosp12/frameworks/base/libs/androidfw/ |
H A D | AssetManager2.cpp | 566 last_resolution_.resid = resid; in FindEntry() 805 last_resolution_.resid = 0; in ResetResourceResolution() 830 const uint32_t resid = last_resolution_.resid; in GetLastResourceResolution() local 872 uint32_t resid) const { in GetResourceName() 885 uint32_t resid) const { in GetResourceTypeSpecFlags() 981 GetBag(resid, found_resids); in GetBagResIdStack() 1030 child_resids.push_back(resid); in GetBag() 1062 new_entry->style = resid; in GetBag() 1135 new_entry->style = resid; in GetBag() 1178 new_entry->style = resid; in GetBag() [all …]
|
/aosp12/frameworks/base/cmds/idmap2/idmap2/ |
H A D | Lookup.cpp | 73 if (auto resid = am.GetResourceId(res, "", fallback_package); resid.ok()) { in ParseResReference() local 74 return *resid; in ParseResReference() 106 Result<std::string> WARN_UNUSED GetValue(AssetManager2* const am, ResourceId resid) { in GetValue() argument 107 auto value = am->GetResource(resid); in GetValue() 109 return Error("no resource 0x%08x in asset manager", resid); in GetValue() 228 const Result<ResourceId> resid = ParseResReference(am, resid_str, target_package_name); in Lookup() local 229 if (!resid) { in Lookup() 230 return Error(resid.GetError(), "failed to parse resource ID"); in Lookup() 233 const Result<std::string> value = GetValue(&am, *resid); in Lookup() 235 return Error(value.GetError(), "resource 0x%08x not found", *resid); in Lookup()
|
/aosp12/frameworks/base/cmds/idmap2/include/idmap2/ |
H A D | ResourceUtils.h | 28 #define EXTRACT_TYPE(resid) ((0x00ff0000 & (resid)) >> 16) argument 29 #define EXTRACT_ENTRY(resid) (0x0000ffff & (resid)) argument 54 Result<std::string> ResToTypeEntryName(const AssetManager2& am, ResourceId resid);
|
/aosp12/frameworks/base/services/core/java/com/android/server/am/ |
H A D | AppNotRespondingDialog.java | 61 int resid; in AppNotRespondingDialog() local 69 resid = com.android.internal.R.string.anr_activity_application; in AppNotRespondingDialog() 73 resid = com.android.internal.R.string.anr_application_process; in AppNotRespondingDialog() 78 resid = com.android.internal.R.string.anr_activity_process; in AppNotRespondingDialog() 81 resid = com.android.internal.R.string.anr_process; in AppNotRespondingDialog() 88 … ? res.getString(resid, bidi.unicodeWrap(name1.toString()), bidi.unicodeWrap(name2.toString())) in AppNotRespondingDialog() 89 : res.getString(resid, bidi.unicodeWrap(name1.toString()))); in AppNotRespondingDialog()
|
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
H A D | AnimatedImageView.java | 101 public void setImageResource(int resid) { in setImageResource() argument 102 if (mDrawableId == resid) return; in setImageResource() 104 mDrawableId = resid; in setImageResource() 105 super.setImageResource(resid); in setImageResource()
|
/aosp12/frameworks/base/core/jni/ |
H A D | android_util_AssetManager.cpp | 651 auto bag = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetResourceBagValue() 678 auto bag_result = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetStyleAttributes() 697 jint resid) { in NativeGetResourceStringArray() argument 750 jint resid) { in NativeGetResourceStringArrayInfo() argument 825 auto bag = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetResourceArraySize() 875 cursor[STYLE_RESOURCE_ID] = static_cast<jint>(attr_value.resid); in NativeGetResourceArray() 908 if (!resid.has_value()) { in NativeGetResourceIdentifier() 912 return static_cast<jint>(*resid); in NativeGetResourceIdentifier() 1258 jint resid, jboolean force) { in NativeThemeApplyStyle() argument 1265 theme->ApplyStyle(static_cast<uint32_t>(resid), force); in NativeThemeApplyStyle() [all …]
|
/aosp12/packages/apps/Calendar/src/com/android/calendar/ |
H A D | MultiStateButton.java | 123 public void setButtonDrawable(int resid) { in setButtonDrawable() argument 124 if (resid != 0 && resid == mButtonResource) { in setButtonDrawable() 128 mButtonResource = resid; in setButtonDrawable()
|
/aosp12/frameworks/base/core/java/com/google/android/util/ |
H A D | SmileyParser.java | 71 int resid = mRes.getSmileyRes(token.getRawText()); in getSpannableString() local 72 if (resid != -1) { in getSpannableString() 73 builder.setSpan(new ImageSpan(context, resid), in getSpannableString()
|
/aosp12/frameworks/base/cmds/idmap2/libidmap2/ |
H A D | ResourceUtils.cpp | 70 Result<std::string> ResToTypeEntryName(const AssetManager2& am, uint32_t resid) { in ResToTypeEntryName() argument 71 const auto name = am.GetResourceName(resid); in ResToTypeEntryName() 73 return Error("no resource 0x%08x in asset manager", resid); in ResToTypeEntryName()
|
H A D | ResourceMapping.cpp | 105 std::string GetDebugResourceName(const ResourceContainer& container, ResourceId resid) { in GetDebugResourceName() argument 106 auto name = container.GetResourceName(resid); in GetDebugResourceName() 110 return StringPrintf("0x%08x", resid); in GetDebugResourceName()
|
/aosp12/frameworks/layoutlib/bridge/src/android/content/res/ |
H A D | Resources_Theme_Delegate.java | 69 int resid, int[] attrs) in obtainStyledAttributes() argument 73 resid, attrs); in obtainStyledAttributes() 94 int resid, TypedValue outValue, in resolveAttribute() argument 97 boolean found = RenderSessionImpl.getCurrentContext().resolveThemeAttribute(resid, in resolveAttribute()
|
/aosp12/frameworks/base/test-mock/src/android/test/mock/ |
H A D | MockResources.java | 209 public String getResourceName(int resid) throws NotFoundException { in getResourceName() argument 214 public String getResourcePackageName(int resid) throws NotFoundException { in getResourcePackageName() argument 219 public String getResourceTypeName(int resid) throws NotFoundException { in getResourceTypeName() argument 224 public String getResourceEntryName(int resid) throws NotFoundException { in getResourceEntryName() argument
|
/aosp12/system/extras/ioshark/ |
H A D | ioshark_bench_mmap.c | 54 size_t resid; member 64 mio->resid = total_len; in setup_mmap_io_state() 87 if (mio->resid == 0) in mmap_getnext_off_len() 101 mio->resid -= iolength; in mmap_getnext_off_len()
|
/aosp12/frameworks/base/core/java/android/view/ |
H A D | ContextThemeWrapper.java | 144 public void setTheme(int resid) { in setTheme() argument 145 if (mThemeResource != resid) { in setTheme() 146 mThemeResource = resid; in setTheme()
|
/aosp12/packages/apps/LegacyCamera/src/com/android/camera/ui/ |
H A D | FocusIndicatorView.java | 31 private void setDrawable(int resid) { in setDrawable() argument 32 setBackgroundDrawable(getResources().getDrawable(resid)); in setDrawable()
|
/aosp12/frameworks/base/core/java/android/widget/ |
H A D | ImageSwitcher.java | 62 public void setImageResource(@DrawableRes int resid) in setImageResource() argument 65 image.setImageResource(resid); in setImageResource()
|
/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/widget/ |
H A D | AnimatedImageView.java | 73 public void setImageResource(int resid) { in setImageResource() argument 74 super.setImageResource(resid); in setImageResource()
|
/aosp12/frameworks/base/core/java/android/content/res/ |
H A D | ResourcesImpl.java | 260 String getResourceName(@AnyRes int resid) throws NotFoundException { in getResourceName() argument 261 String str = mAssets.getResourceName(resid); in getResourceName() 264 + Integer.toHexString(resid)); in getResourceName() 269 String str = mAssets.getResourcePackageName(resid); in getResourcePackageName() 272 + Integer.toHexString(resid)); in getResourcePackageName() 276 String getResourceTypeName(@AnyRes int resid) throws NotFoundException { in getResourceTypeName() argument 277 String str = mAssets.getResourceTypeName(resid); in getResourceTypeName() 280 + Integer.toHexString(resid)); in getResourceTypeName() 284 String getResourceEntryName(@AnyRes int resid) throws NotFoundException { in getResourceEntryName() argument 285 String str = mAssets.getResourceEntryName(resid); in getResourceEntryName() [all …]
|