Home
last modified time | relevance | path

Searched refs:resid (Results 1 – 25 of 62) sorted by relevance

123

/frameworks/base/libs/androidfw/include/androidfw/
DResourceUtils.h41 inline uint32_t fix_package_id(uint32_t resid, uint8_t package_id) { in fix_package_id() argument
42 return (resid & 0x00ffffffu) | (static_cast<uint32_t>(package_id) << 24); in fix_package_id()
45 inline uint8_t get_package_id(uint32_t resid) { in get_package_id() argument
46 return static_cast<uint8_t>((resid >> 24) & 0x000000ffu); in get_package_id()
50 inline uint8_t get_type_id(uint32_t resid) { in get_type_id() argument
51 return static_cast<uint8_t>((resid >> 16) & 0x000000ffu); in get_type_id()
54 inline uint16_t get_entry_id(uint32_t resid) { in get_entry_id() argument
55 return static_cast<uint16_t>(resid & 0x0000ffffu); in get_entry_id()
58 inline bool is_internal_resid(uint32_t resid) { in is_internal_resid() argument
59 return (resid & 0xffff0000u) != 0 && (resid & 0x00ff0000u) == 0; in is_internal_resid()
[all …]
DAssetManager2.h191 bool GetResourceName(uint32_t resid, ResourceName* out_name) const;
196 bool GetResourceFlags(uint32_t resid, uint32_t* out_flags) const;
215 ApkAssetsCookie GetResource(uint32_t resid, bool may_be_bag, uint16_t density_override,
243 const std::vector<uint32_t> GetBagResIdStack(uint32_t resid);
255 const ResolvedBag* GetBag(uint32_t resid);
291 ApkAssetsCookie FindEntry(uint32_t resid, uint16_t density_override, bool stop_at_first_match,
308 const ResolvedBag* GetBag(uint32_t resid, std::vector<uint32_t>& child_resids);
395 uint32_t resid; member
426 bool ApplyStyle(uint32_t resid, bool force = false);
461 ApkAssetsCookie GetAttribute(uint32_t resid, Res_value* out_value, uint32_t* out_flags) const;
/frameworks/base/libs/androidfw/tests/
DSparseEntry_bench.cpp27 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()
DBenchmarkHelpers.cpp26 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
81 resid, false /* may_be_bag */, 0u /* density_override */, &value, &selected_config, &flags); in GetResourceBenchmark()
DBenchmarkHelpers.h31 uint32_t resid, ::benchmark::State& state);
34 uint32_t resid, benchmark::State& state);
DAssetManager2_bench.cpp84 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/idmap2/
DLookup.cpp72 ResourceId resid; in ParseResReference() local
73 resid = strtol(res.c_str(), &endptr, kBaseHex); in ParseResReference()
75 return resid; in ParseResReference()
79 resid = am.GetResourceId(res, "", fallback_package); in ParseResReference()
80 if (is_valid_resid(resid)) { in ParseResReference()
81 return resid; in ParseResReference()
88 Result<std::string> WARN_UNUSED GetValue(const AssetManager2& am, ResourceId resid) { in GetValue() argument
92 ApkAssetsCookie cookie = am.GetResource(resid, false, 0, &value, &config, &flags); in GetValue()
94 return Error("no resource 0x%08x in asset manager", resid); in GetValue()
233 const Result<ResourceId> resid = ParseResReference(am, resid_str, target_package_name); in Lookup() local
[all …]
/frameworks/base/libs/androidfw/
DAssetManager2.cpp373 ApkAssetsCookie AssetManager2::FindEntry(uint32_t resid, uint16_t density_override, in FindEntry() argument
388 if (!is_valid_resid(resid)) { in FindEntry()
389 LOG(ERROR) << base::StringPrintf("Invalid ID 0x%08x.", resid); in FindEntry()
393 const uint32_t package_id = get_package_id(resid); in FindEntry()
394 const uint8_t type_idx = get_type_id(resid) - 1; in FindEntry()
395 const uint16_t entry_idx = get_entry_id(resid); in FindEntry()
400 package_id, resid); in FindEntry()
561 last_resolution.resid = resid; in FindEntry()
580 last_resolution.resid = 0; in SetResourceResolutionLoggingEnabled()
599 uint32_t resid = last_resolution.resid; in GetLastResourceResolution() local
[all …]
DAttributeResolution.cpp139 uint32_t resid = 0; in ResolveAttrs() local
143 theme->ResolveAttributeReference(cookie, &value, &config, &type_set_flags, &resid); in ResolveAttrs()
158 assetmanager->ResolveReference(new_cookie, &value, &config, &type_set_flags, &resid); in ResolveAttrs()
186 out_values[STYLE_RESOURCE_ID] = resid; in ResolveAttrs()
338 uint32_t resid = 0u; in ApplyStyle() local
342 theme->ResolveAttributeReference(cookie, &value, &config, &type_set_flags, &resid); in ApplyStyle()
359 assetmanager->ResolveReference(new_cookie, &value, &config, &type_set_flags, &resid); in ApplyStyle()
388 out_values[STYLE_RESOURCE_ID] = resid; in ApplyStyle()
442 uint32_t resid = 0u; in RetrieveAttributes() local
446 assetmanager->ResolveReference(cookie, &value, &config, &type_set_flags, &resid); in RetrieveAttributes()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DAppNotRespondingDialog.java61 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/
DAnimatedImageView.java101 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/
DSmileyParser.java71 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/layoutlib/bridge/src/android/content/res/
DResources_Theme_Delegate.java69 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()
DResources_Delegate.java733 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/test-mock/src/android/test/mock/
DMockResources.java209 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/jni/
Dandroid_util_AssetManager.cpp743 static jint NativeGetResourceValue(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid, in NativeGetResourceValue() argument
751 assetmanager->GetResource(static_cast<uint32_t>(resid), false /*may_be_bag*/, in NativeGetResourceValue()
757 uint32_t ref = static_cast<uint32_t>(resid); in NativeGetResourceValue()
767 static jint NativeGetResourceBagValue(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid, in NativeGetResourceBagValue() argument
770 const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetResourceBagValue()
792 uint32_t ref = static_cast<uint32_t>(resid); in NativeGetResourceBagValue()
801 static jintArray NativeGetStyleAttributes(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid) { in NativeGetStyleAttributes() argument
803 const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetStyleAttributes()
821 jint resid) { in NativeGetResourceStringArray() argument
823 const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid)); in NativeGetResourceStringArray()
[all …]
/frameworks/base/cmds/idmap2/libidmap2/
DResourceUtils.cpp36 Result<std::string> ResToTypeEntryName(const AssetManager2& am, ResourceId resid) { in ResToTypeEntryName() argument
38 if (!am.GetResourceName(resid, &name)) { in ResToTypeEntryName()
39 return Error("no resource 0x%08x in asset manager", resid); in ResToTypeEntryName()
DIdmap.cpp44 #define EXTRACT_TYPE(resid) ((0x00ff0000 & (resid)) >> 16) argument
46 #define EXTRACT_ENTRY(resid) (0x0000ffff & (resid)) argument
212 ResourceId resid; in FromBinaryStream() local
213 if (!Read32(stream, &resid)) { in FromBinaryStream()
216 data->entries_.push_back(resid); in FromBinaryStream()
283 const PolicyBitmask& fulfilled_policies, const ResourceId& resid) { in CheckOverlayable() argument
299 const OverlayableInfo* overlayable_info = target_package.GetOverlayableInfo(resid); in CheckOverlayable()
/frameworks/base/core/java/android/view/
DContextThemeWrapper.java144 public void setTheme(int resid) { in setTheme() argument
145 if (mThemeResource != resid) { in setTheme()
146 mThemeResource = resid; in setTheme()
/frameworks/base/core/java/android/widget/
DImageSwitcher.java62 public void setImageResource(@DrawableRes int resid) in setImageResource() argument
65 image.setImageResource(resid); in setImageResource()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/widget/
DAnimatedImageView.java73 public void setImageResource(int resid) { in setImageResource() argument
74 super.setImageResource(resid); in setImageResource()
/frameworks/base/core/java/android/content/res/
DResources.java1617 public boolean resolveAttribute(int resid, TypedValue outValue, boolean resolveRefs) { in resolveAttribute() argument
1618 return mThemeImpl.resolveAttribute(resid, outValue, resolveRefs); in resolveAttribute()
2045 public static boolean resourceHasPackage(@AnyRes int resid) { in resourceHasPackage() argument
2046 return (resid >>> 24) != 0; in resourceHasPackage()
2063 public String getResourceName(@AnyRes int resid) throws NotFoundException { in getResourceName() argument
2064 return mResourcesImpl.getResourceName(resid); in getResourceName()
2079 public String getResourcePackageName(@AnyRes int resid) throws NotFoundException { in getResourcePackageName() argument
2080 return mResourcesImpl.getResourcePackageName(resid); in getResourcePackageName()
2095 public String getResourceTypeName(@AnyRes int resid) throws NotFoundException { in getResourceTypeName() argument
2096 return mResourcesImpl.getResourceTypeName(resid); in getResourceTypeName()
[all …]
DResourcesImpl.java272 String getResourceName(@AnyRes int resid) throws NotFoundException { in getResourceName() argument
273 String str = mAssets.getResourceName(resid); in getResourceName()
276 + Integer.toHexString(resid)); in getResourceName()
280 String getResourcePackageName(@AnyRes int resid) throws NotFoundException { in getResourcePackageName() argument
281 String str = mAssets.getResourcePackageName(resid); in getResourcePackageName()
284 + Integer.toHexString(resid)); in getResourcePackageName()
288 String getResourceTypeName(@AnyRes int resid) throws NotFoundException { in getResourceTypeName() argument
289 String str = mAssets.getResourceTypeName(resid); in getResourceTypeName()
292 + Integer.toHexString(resid)); in getResourceTypeName()
296 String getResourceEntryName(@AnyRes int resid) throws NotFoundException { in getResourceEntryName() argument
[all …]
/frameworks/base/core/java/android/app/
DDisabledWallpaperManager.java207 public void setResource(int resid) throws IOException { in setResource() argument
212 public int setResource(int resid, int which) throws IOException { in setResource() argument
257 public boolean hasResourceWallpaper(int resid) { in hasResourceWallpaper() argument
/frameworks/base/core/java/android/content/pm/
DPackageItemInfo.java384 int resid = metaData.getInt(name); in loadXmlMetaData() local
385 if (resid != 0) { in loadXmlMetaData()
386 return pm.getXml(packageName, resid, getApplicationInfo()); in loadXmlMetaData()

123