/frameworks/base/libs/androidfw/include/androidfw/ |
D | ResourceUtils.h | 40 inline uint32_t fix_package_id(uint32_t resid, uint8_t package_id) { in fix_package_id() argument 41 return (resid & 0x00ffffffu) | (static_cast<uint32_t>(package_id) << 24); in fix_package_id() 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() [all …]
|
D | AssetManager2.h | 227 base::expected<uint32_t, NullOrIOError> GetParentThemeResourceId(uint32_t resid) const; 235 base::expected<ResourceName, NullOrIOError> GetResourceName(uint32_t resid) const; 258 resid(0U), in SelectedValue() 276 uint32_t resid; member 283 uint32_t type_flags, uint32_t resid, const ResTable_config& config) : in SelectedValue() 285 resid(resid), config(config) {}; in SelectedValue() 296 base::expected<SelectedValue, NullOrIOError> GetResource(uint32_t resid, bool may_be_bag = false, 325 base::expected<const ResolvedBag*, NullOrIOError> GetBag(uint32_t resid) const; 340 base::expected<uint32_t, NullOrIOError> GetResourceTypeSpecFlags(uint32_t resid) const; 343 uint32_t resid) const; [all …]
|
/frameworks/base/libs/androidfw/tests/ |
D | SparseEntry_bench.cpp | 29 uint32_t resid, benchmark::State& state, void (*GetResourceBenchmarkFunc)( in BM_SparseEntryGetResourceHelper() argument 35 GetResourceBenchmarkFunc(paths, &config, resid, state); in BM_SparseEntryGetResourceHelper() 38 static void BM_SparseEntryGetResourceOldSparse(benchmark::State& state, uint32_t resid) { in BM_SparseEntryGetResourceOldSparse() argument 39 BM_SparseEntryGetResourceHelper({GetTestDataPath() + "/sparse/sparse.apk"}, resid, in BM_SparseEntryGetResourceOldSparse() 45 static void BM_SparseEntryGetResourceOldNotSparse(benchmark::State& state, uint32_t resid) { in BM_SparseEntryGetResourceOldNotSparse() argument 46 BM_SparseEntryGetResourceHelper({GetTestDataPath() + "/sparse/not_sparse.apk"}, resid, in BM_SparseEntryGetResourceOldNotSparse() 52 static void BM_SparseEntryGetResourceSparse(benchmark::State& state, uint32_t resid) { in BM_SparseEntryGetResourceSparse() argument 53 BM_SparseEntryGetResourceHelper({GetTestDataPath() + "/sparse/sparse.apk"}, resid, in BM_SparseEntryGetResourceSparse() 59 static void BM_SparseEntryGetResourceNotSparse(benchmark::State& state, uint32_t resid) { in BM_SparseEntryGetResourceNotSparse() argument 60 BM_SparseEntryGetResourceHelper({GetTestDataPath() + "/sparse/not_sparse.apk"}, resid, in BM_SparseEntryGetResourceNotSparse() [all …]
|
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 73 auto value = assetmanager.GetResource(resid); in GetResourceBenchmark()
|
D | BenchmarkHelpers.h | 31 uint32_t resid, ::benchmark::State& state); 34 uint32_t resid, benchmark::State& state);
|
D | AssetManager2_test.cpp | 421 EXPECT_EQ(basic::R::integer::ref2, value->resid); in TEST_F() 437 EXPECT_EQ(basic::R::array::integerArray1, value->resid); in TEST_F() 463 EXPECT_EQ(*low_ref, value->resid); in TEST_F() 496 value.resid = basic::R::string::test1; in TEST_F() 501 EXPECT_EQ(basic::R::string::test1, value.resid); in TEST_F() 517 EXPECT_EQ(basic::R::string::test1, value.resid); in TEST_F() 530 EXPECT_EQ(basic::R::string::test1, value.resid); in TEST_F() 548 EXPECT_EQ(kMissingResId, value.resid); in TEST_F() 565 EXPECT_EQ(libclient::R::string::foo_one, value.resid); in TEST_F() 643 auto resid = assetmanager.GetResourceId("com.android.basic:layout/main", "", ""); in TEST_F() local [all …]
|
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()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/utils/ |
D | CustomDialogHelper.java | 99 public CustomDialogHelper setPositiveButton(@StringRes int resid, in setPositiveButton() argument 101 setButton(POSITIVE_BUTTON, resid, onClickListener); in setPositiveButton() 108 public CustomDialogHelper setPositiveButtonText(@StringRes int resid) { in setPositiveButtonText() argument 109 mPositiveButton.setText(resid); in setPositiveButtonText() 116 public CustomDialogHelper setNegativeButton(@StringRes int resid, in setNegativeButton() argument 118 setButton(NEGATIVE_BUTTON, resid, onClickListener); in setNegativeButton() 125 public CustomDialogHelper setNegativeButtonText(@StringRes int resid) { in setNegativeButtonText() argument 126 mNegativeButton.setText(resid); in setNegativeButtonText() 133 public CustomDialogHelper setBackButton(@StringRes int resid, in setBackButton() argument 135 setButton(BACK_BUTTON, resid, onClickListener); in setBackButton() [all …]
|
/frameworks/base/cmds/idmap2/idmap2/ |
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() 224 const Result<ResourceId> resid = ParseResReference(am, resid_str, target_package_name); in Lookup() local 225 if (!resid) { in Lookup() 226 return Error(resid.GetError(), "failed to parse resource ID"); in Lookup() 229 const Result<std::string> value = GetValue(&am, *resid); in Lookup() 231 return Error(value.GetError(), "resource 0x%08x not found", *resid); in Lookup()
|
/frameworks/base/cmds/idmap2/include/idmap2/ |
D | ResourceUtils.h | 29 #define EXTRACT_TYPE(resid) ((0x00ff0000 & (resid)) >> 16) argument 30 #define EXTRACT_ENTRY(resid) (0x0000ffff & (resid)) argument 69 Result<std::string> ResToTypeEntryName(const AssetManager2& am, ResourceId resid);
|
/frameworks/base/libs/androidfw/ |
D | AssetManager2.cpp | 639 uint32_t resid, uint16_t density_override, bool stop_at_first_match, in FindEntry() argument 645 last_resolution_.resid = resid; in FindEntry() 652 if (UNLIKELY(!is_valid_resid(resid))) { in FindEntry() 653 LOG(ERROR) << base::StringPrintf("Invalid resource ID 0x%08x.", resid); in FindEntry() 657 const uint32_t package_id = get_package_id(resid); in FindEntry() 658 const uint8_t type_idx = get_type_id(resid) - 1; in FindEntry() 659 const uint16_t entry_idx = get_entry_id(resid); in FindEntry() 663 package_id, resid); in FindEntry() 692 ALOGE("Found expired ApkAssets #%d for resource ID 0x%08x.", result->cookie, resid); in FindEntry() 697 auto overlay_entry = id_map.overlay_res_maps_.Lookup(resid); in FindEntry() [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | AppNotRespondingDialog.java | 63 int resid; in AppNotRespondingDialog() local 71 resid = com.android.internal.R.string.anr_activity_application; in AppNotRespondingDialog() 75 resid = com.android.internal.R.string.anr_application_process; in AppNotRespondingDialog() 80 resid = com.android.internal.R.string.anr_activity_process; in AppNotRespondingDialog() 83 resid = com.android.internal.R.string.anr_process; in AppNotRespondingDialog() 90 … ? res.getString(resid, bidi.unicodeWrap(name1.toString()), bidi.unicodeWrap(name2.toString())) in AppNotRespondingDialog() 91 : res.getString(resid, bidi.unicodeWrap(name1.toString()))); in AppNotRespondingDialog()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
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()
|
/frameworks/base/core/java/com/google/android/util/ |
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()
|
/frameworks/base/cmds/idmap2/libidmap2/ |
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()
|
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()
|
/frameworks/base/core/jni/ |
D | android_util_AssetManager.cpp | 127 env->SetIntField(out_typed_value, gTypedValueOffsets.mResourceId, value.resid); in CopyValue() 686 static jint NativeGetResourceValue(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid, in NativeGetResourceValue() argument 692 auto value = assetmanager->GetResource(static_cast<uint32_t>(resid), false /*may_be_bag*/, in NativeGetResourceValue() 707 static jint NativeGetResourceBagValue(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid, in NativeGetResourceBagValue() argument 711 auto bag = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetResourceBagValue() 736 static jintArray NativeGetStyleAttributes(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid) { in NativeGetStyleAttributes() argument 739 auto bag_result = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetStyleAttributes() 758 jint resid) { in NativeGetResourceStringArray() argument 761 auto bag_result = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetResourceStringArray() 817 jint resid) { in NativeGetResourceStringArrayInfo() argument [all …]
|
/frameworks/layoutlib/bridge/src/android/content/res/ |
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()
|
D | Resources_Delegate.java | 741 static String getResourceEntryName(Resources resources, int resid) throws NotFoundException { in getResourceEntryName() argument 742 ResourceReference resourceInfo = getResourceInfo(resources, resid); in getResourceEntryName() 746 throwException(resid, null); in getResourceEntryName() 751 static String getResourceName(Resources resources, int resid) throws NotFoundException { in getResourceName() argument 752 ResourceReference resourceInfo = getResourceInfo(resources, resid); in getResourceName() 758 throwException(resid, null); in getResourceName() 763 static String getResourcePackageName(Resources resources, int resid) throws NotFoundException { in getResourcePackageName() argument 764 ResourceReference resourceInfo = getResourceInfo(resources, resid); in getResourcePackageName() 768 throwException(resid, null); in getResourcePackageName() 773 static String getResourceTypeName(Resources resources, int resid) throws NotFoundException { in getResourceTypeName() argument [all …]
|
/frameworks/base/test-mock/src/android/test/mock/ |
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
|
/frameworks/base/core/java/android/widget/ |
D | ImageSwitcher.java | 62 public void setImageResource(@DrawableRes int resid) in setImageResource() argument 65 image.setImageResource(resid); in setImageResource()
|
/frameworks/base/core/java/android/view/ |
D | ContextThemeWrapper.java | 144 public void setTheme(int resid) { in setTheme() argument 145 if (mThemeResource != resid) { in setTheme() 146 mThemeResource = resid; in setTheme()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/widget/ |
D | AnimatedImageView.java | 73 public void setImageResource(int resid) { in setImageResource() argument 74 super.setImageResource(resid); in setImageResource()
|
/frameworks/base/core/java/android/app/ |
D | DisabledWallpaperManager.java | 231 public void setResource(int resid) throws IOException { in setResource() argument 236 public int setResource(int resid, int which) throws IOException { in setResource() argument 287 public boolean hasResourceWallpaper(int resid) { in hasResourceWallpaper() argument
|
/frameworks/base/core/java/android/content/res/ |
D | ResourcesImpl.java | 314 String getResourceName(@AnyRes int resid) throws NotFoundException { in getResourceName() argument 315 String str = mAssets.getResourceName(resid); in getResourceName() 318 + Integer.toHexString(resid)); in getResourceName() 322 String getResourcePackageName(@AnyRes int resid) throws NotFoundException { in getResourcePackageName() argument 323 String str = mAssets.getResourcePackageName(resid); in getResourcePackageName() 326 + Integer.toHexString(resid)); in getResourcePackageName() 330 String getResourceTypeName(@AnyRes int resid) throws NotFoundException { in getResourceTypeName() argument 331 String str = mAssets.getResourceTypeName(resid); in getResourceTypeName() 334 + Integer.toHexString(resid)); in getResourceTypeName() 338 String getResourceEntryName(@AnyRes int resid) throws NotFoundException { in getResourceEntryName() argument [all …]
|