/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 | 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() 257 base::expected<SelectedValue, NullOrIOError> GetResource(uint32_t resid, bool may_be_bag = false, 286 base::expected<const ResolvedBag*, NullOrIOError> GetBag(uint32_t resid) const; 301 base::expected<uint32_t, NullOrIOError> GetResourceTypeSpecFlags(uint32_t resid) const; 303 const std::vector<uint32_t> GetBagResIdStack(uint32_t resid) const; 393 base::expected<FindEntryResult, NullOrIOError> FindEntry(uint32_t resid, [all …]
|
/frameworks/base/libs/androidfw/tests/ |
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()
|
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()
|
D | BenchmarkHelpers.h | 31 uint32_t resid, ::benchmark::State& state); 34 uint32_t resid, benchmark::State& state);
|
D | AssetManager2_test.cpp | 426 EXPECT_EQ(basic::R::integer::ref2, value->resid); in TEST_F() 442 EXPECT_EQ(basic::R::array::integerArray1, 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() 523 EXPECT_EQ(basic::R::string::test1, value.resid); in TEST_F() 536 EXPECT_EQ(basic::R::string::test1, value.resid); in TEST_F() 554 EXPECT_EQ(kMissingResId, value.resid); in TEST_F() 571 EXPECT_EQ(libclient::R::string::foo_one, value.resid); in TEST_F() 649 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/cmds/idmap2/include/idmap2/ |
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);
|
/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() 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()
|
/frameworks/base/libs/androidfw/ |
D | AssetManager2.cpp | 560 uint32_t resid, uint16_t density_override, bool stop_at_first_match, in FindEntry() argument 566 last_resolution_.resid = resid; in FindEntry() 581 if (UNLIKELY(!is_valid_resid(resid))) { in FindEntry() 582 LOG(ERROR) << base::StringPrintf("Invalid ID 0x%08x.", resid); in FindEntry() 586 const uint32_t package_id = get_package_id(resid); in FindEntry() 587 const uint8_t type_idx = get_type_id(resid) - 1; in FindEntry() 588 const uint16_t entry_idx = get_entry_id(resid); in FindEntry() 592 package_id, resid); in FindEntry() 605 auto overlay_entry = id_map.overlay_res_maps_.Lookup(resid); in FindEntry() 805 last_resolution_.resid = 0; in ResetResourceResolution() [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
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()
|
/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/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 | 733 static String getResourceEntryName(Resources resources, int resid) throws NotFoundException { in getResourceEntryName() argument 734 ResourceReference resourceInfo = getResourceInfo(resources, resid); in getResourceEntryName() 738 throwException(resid, null); in getResourceEntryName() 743 static String getResourceName(Resources resources, int resid) throws NotFoundException { in getResourceName() argument 744 ResourceReference resourceInfo = getResourceInfo(resources, resid); in getResourceName() 750 throwException(resid, null); in getResourceName() 755 static String getResourcePackageName(Resources resources, int resid) throws NotFoundException { in getResourcePackageName() argument 756 ResourceReference resourceInfo = getResourceInfo(resources, resid); in getResourcePackageName() 760 throwException(resid, null); in getResourcePackageName() 765 static String getResourceTypeName(Resources resources, int resid) throws NotFoundException { in getResourceTypeName() argument [all …]
|
/frameworks/base/core/jni/ |
D | android_util_AssetManager.cpp | 123 env->SetIntField(out_typed_value, gTypedValueOffsets.mResourceId, value.resid); in CopyValue() 628 static jint NativeGetResourceValue(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid, in NativeGetResourceValue() argument 632 auto value = assetmanager->GetResource(static_cast<uint32_t>(resid), false /*may_be_bag*/, in NativeGetResourceValue() 647 static jint NativeGetResourceBagValue(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid, in NativeGetResourceBagValue() argument 650 auto bag = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetResourceBagValue() 675 static jintArray NativeGetStyleAttributes(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid) { in NativeGetStyleAttributes() argument 677 auto bag_result = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetStyleAttributes() 696 jint resid) { in NativeGetResourceStringArray() argument 698 auto bag_result = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetResourceStringArray() 749 jint resid) { in NativeGetResourceStringArrayInfo() 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/content/res/ |
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() 268 String getResourcePackageName(@AnyRes int resid) throws NotFoundException { in getResourcePackageName() argument 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 [all …]
|
D | Resources.java | 1714 public boolean resolveAttribute(int resid, TypedValue outValue, boolean resolveRefs) { in resolveAttribute() argument 1716 return mThemeImpl.resolveAttribute(resid, outValue, resolveRefs); in resolveAttribute() 2210 public static boolean resourceHasPackage(@AnyRes int resid) { in resourceHasPackage() argument 2211 return (resid >>> 24) != 0; in resourceHasPackage() 2228 public String getResourceName(@AnyRes int resid) throws NotFoundException { in getResourceName() argument 2229 return mResourcesImpl.getResourceName(resid); in getResourceName() 2244 public String getResourcePackageName(@AnyRes int resid) throws NotFoundException { in getResourcePackageName() argument 2245 return mResourcesImpl.getResourcePackageName(resid); in getResourcePackageName() 2260 public String getResourceTypeName(@AnyRes int resid) throws NotFoundException { in getResourceTypeName() argument 2261 return mResourcesImpl.getResourceTypeName(resid); in getResourceTypeName() [all …]
|
/frameworks/base/core/java/android/app/ |
D | DisabledWallpaperManager.java | 206 public void setResource(int resid) throws IOException { in setResource() argument 211 public int setResource(int resid, int which) throws IOException { in setResource() argument 256 public boolean hasResourceWallpaper(int resid) { in hasResourceWallpaper() argument
|