/frameworks/base/libs/androidfw/include/androidfw/ |
H A D | ResourceUtils.h | 30 inline uint32_t fix_package_id(uint32_t resid, uint8_t package_id) { argument 31 return (resid & 0x00ffffffu) | (static_cast<uint32_t>(package_id) << 24); 34 inline uint8_t get_package_id(uint32_t resid) { argument 35 return static_cast<uint8_t>((resid >> 24) & 0x000000ffu); 39 inline uint8_t get_type_id(uint32_t resid) { argument 40 return static_cast<uint8_t>((resid >> 16) & 0x000000ffu); 43 inline uint16_t get_entry_id(uint32_t resid) { argument 44 return static_cast<uint16_t>(resid & 0x0000ffffu); 47 inline bool is_internal_resid(uint32_t resid) { argument 48 return (resid 51 is_valid_resid(uint32_t resid) argument [all...] |
H A D | AssetManager2.h | 178 bool GetResourceName(uint32_t resid, ResourceName* out_name) const; 183 bool GetResourceFlags(uint32_t resid, uint32_t* out_flags) const; 193 // Retrieves the best matching resource with ID `resid`. The resource value is filled into 202 ApkAssetsCookie GetResource(uint32_t resid, bool may_be_bag, uint16_t density_override, 222 // Retrieves the best matching bag/map resource with ID `resid`. 232 const ResolvedBag* GetBag(uint32_t resid); 250 // Finds the best entry for `resid` from the set of ApkAssets. The entry can be a simple 264 ApkAssetsCookie FindEntry(uint32_t resid, uint16_t density_override, bool stop_at_first_match, 279 // AssetManager2::GetBag(resid) wraps this function to track which resource ids have already 281 const ResolvedBag* GetBag(uint32_t resid, st [all...] |
/frameworks/base/libs/androidfw/tests/ |
H A D | BenchmarkHelpers.h | 31 uint32_t resid, ::benchmark::State& state); 34 uint32_t resid, benchmark::State& state);
|
H A D | SparseEntry_bench.cpp | 27 static void BM_SparseEntryGetResourceOldSparse(benchmark::State& state, uint32_t resid) { argument 31 GetResourceBenchmarkOld({GetTestDataPath() + "/sparse/sparse.apk"}, &config, resid, state); 36 static void BM_SparseEntryGetResourceOldNotSparse(benchmark::State& state, uint32_t resid) { argument 40 GetResourceBenchmarkOld({GetTestDataPath() + "/sparse/not_sparse.apk"}, &config, resid, state); 45 static void BM_SparseEntryGetResourceSparse(benchmark::State& state, uint32_t resid) { argument 49 GetResourceBenchmark({GetTestDataPath() + "/sparse/sparse.apk"}, &config, resid, state); 54 static void BM_SparseEntryGetResourceNotSparse(benchmark::State& state, uint32_t resid) { argument 58 GetResourceBenchmark({GetTestDataPath() + "/sparse/not_sparse.apk"}, &config, resid, state);
|
H A D | BenchmarkHelpers.cpp | 26 uint32_t resid, benchmark::State& state) { 48 ssize_t block = table.getResource(resid, &value, false /*may_be_bag*/, 0u /*density*/, &flags, 55 uint32_t resid, benchmark::State& state) { 81 resid, false /* may_be_bag */, 0u /* density_override */, &value, &selected_config, &flags); 25 GetResourceBenchmarkOld(const std::vector<std::string>& paths, const ResTable_config* config, uint32_t resid, benchmark::State& state) argument 54 GetResourceBenchmark(const std::vector<std::string>& paths, const ResTable_config* config, uint32_t resid, benchmark::State& state) argument
|
H A D | AssetManager2_bench.cpp | 84 static void BM_AssetManagerGetResource(benchmark::State& state, uint32_t resid) { argument 85 GetResourceBenchmark({GetTestDataPath() + "/basic/basic.apk"}, nullptr /*config*/, resid, state); 90 static void BM_AssetManagerGetResourceOld(benchmark::State& state, uint32_t resid) { argument 91 GetResourceBenchmarkOld({GetTestDataPath() + "/basic/basic.apk"}, nullptr /*config*/, resid,
|
/frameworks/support/asynclayoutinflater/src/main/java/androidx/asynclayoutinflater/view/ |
H A D | AsyncLayoutInflater.java | 82 public void inflate(@LayoutRes int resid, @Nullable ViewGroup parent, argument 89 request.resid = resid; 101 request.resid, request.parent, false); 104 request.view, request.resid, request.parent); 111 void onInflateFinished(@NonNull View view, @LayoutRes int resid, argument 118 int resid; field in class:AsyncLayoutInflater.InflateRequest 189 request.resid, request.parent, false); 218 obj.resid = 0;
|
/frameworks/base/core/java/android/widget/ |
H A D | ImageSwitcher.java | 58 * @param resid a Drawable resource id 62 public void setImageResource(@DrawableRes int resid) argument 65 image.setImageResource(resid);
|
/frameworks/base/core/java/com/google/android/util/ |
H A D | SmileyParser.java | 71 int resid = mRes.getSmileyRes(token.getRawText()); 72 if (resid != -1) { 73 builder.setSpan(new ImageSpan(context, resid),
|
/frameworks/support/v7/appcompat/src/main/java/androidx/appcompat/view/ |
H A D | ContextThemeWrapper.java | 125 public void setTheme(int resid) { argument 126 if (mThemeResource != resid) { 127 mThemeResource = resid; 172 * @param resid The theme style resource being applied to <var>theme</var>. 176 protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) { argument 177 theme.applyStyle(resid, true);
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
H A D | AnimatedImageView.java | 38 // the same as the previous one. If this is a resid, we track that. If it's a drawable, we 101 public void setImageResource(int resid) { argument 102 if (mDrawableId == resid) return; 104 mDrawableId = resid; 105 super.setImageResource(resid);
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/widget/ |
H A D | AnimatedImageView.java | 73 public void setImageResource(int resid) { argument 74 super.setImageResource(resid);
|
/frameworks/support/v7/appcompat/src/main/java/androidx/appcompat/widget/ |
H A D | ResourcesWrapper.java | 254 public String getResourceName(int resid) throws NotFoundException { argument 255 return mResources.getResourceName(resid); 259 public String getResourcePackageName(int resid) throws NotFoundException { argument 260 return mResources.getResourcePackageName(resid); 264 public String getResourceTypeName(int resid) throws NotFoundException { argument 265 return mResources.getResourceTypeName(resid); 269 public String getResourceEntryName(int resid) throws NotFoundException { argument 270 return mResources.getResourceEntryName(resid);
|
H A D | TintContextWrapper.java | 112 public void setTheme(int resid) { argument 114 super.setTheme(resid); 116 mTheme.applyStyle(resid, true);
|
/frameworks/support/navigation/common/src/main/java/androidx/navigation/ |
H A D | NavGraph.java | 174 * @param resid ID to locate 175 * @return the node with ID resid 177 public NavDestination findNode(@IdRes int resid) { argument 178 return findNode(resid, true); 181 NavDestination findNode(@IdRes int resid, boolean searchParents) { argument 182 NavDestination destination = mNodes.get(resid); 187 : searchParents && getParent() != null ? getParent().findNode(resid) : null;
|
/frameworks/base/libs/androidfw/ |
H A D | AssetManager2.cpp | 309 ApkAssetsCookie AssetManager2::FindEntry(uint32_t resid, uint16_t density_override, argument 323 if (!is_valid_resid(resid)) { 324 LOG(ERROR) << base::StringPrintf("Invalid ID 0x%08x.", resid); 328 const uint32_t package_id = get_package_id(resid); 329 const uint8_t type_idx = get_type_id(resid) - 1; 330 const uint16_t entry_idx = get_entry_id(resid); 334 LOG(ERROR) << base::StringPrintf("No package ID %02x found for ID 0x%08x.", package_id, resid); 458 bool AssetManager2::GetResourceName(uint32_t resid, ResourceName* out_name) const { argument 461 FindEntry(resid, 0u /* density_override */, true /* stop_at_first_match */, &entry); 467 apk_assets_[cookie]->GetLoadedArsc()->GetPackageById(get_package_id(resid)); 495 GetResourceFlags(uint32_t resid, uint32_t* out_flags) const argument 506 GetResource(uint32_t resid, bool may_be_bag, uint16_t density_override, Res_value* out_value, ResTable_config* out_selected_config, uint32_t* out_flags) const argument 570 GetBag(uint32_t resid) argument 575 GetBag(uint32_t resid, std::vector<uint32_t>& child_resids) argument 812 uint32_t resid = package->FindEntryByName(type16, entry16); local 904 ApplyStyle(uint32_t resid, bool force) argument 986 GetAttribute(uint32_t resid, Res_value* out_value, uint32_t* out_flags) const argument [all...] |
H A D | AttributeResolution.cpp | 139 uint32_t resid = 0; local 143 theme->ResolveAttributeReference(cookie, &value, &config, &type_set_flags, &resid); 158 assetmanager->ResolveReference(new_cookie, &value, &config, &type_set_flags, &resid); 186 out_values[STYLE_RESOURCE_ID] = resid; 332 uint32_t resid = 0u; local 336 theme->ResolveAttributeReference(cookie, &value, &config, &type_set_flags, &resid); 352 assetmanager->ResolveReference(new_cookie, &value, &config, &type_set_flags, &resid); 381 out_values[STYLE_RESOURCE_ID] = resid; 435 uint32_t resid = 0u; local 439 assetmanager->ResolveReference(cookie, &value, &config, &type_set_flags, &resid); [all...] |
/frameworks/base/services/core/java/com/android/server/am/ |
H A D | AppNotRespondingDialog.java | 60 int resid; 68 resid = com.android.internal.R.string.anr_activity_application; 72 resid = com.android.internal.R.string.anr_application_process; 77 resid = com.android.internal.R.string.anr_activity_process; 80 resid = com.android.internal.R.string.anr_process; 87 ? res.getString(resid, bidi.unicodeWrap(name1.toString()), bidi.unicodeWrap(name2.toString())) 88 : res.getString(resid, bidi.unicodeWrap(name1.toString())));
|
/frameworks/base/core/java/android/view/ |
H A D | ContextThemeWrapper.java | 137 public void setTheme(int resid) { argument 138 if (mThemeResource != resid) { 139 mThemeResource = resid;
|
/frameworks/base/test-mock/src/android/test/mock/ |
H A D | MockResources.java | 209 public String getResourceName(int resid) throws NotFoundException { argument 214 public String getResourcePackageName(int resid) throws NotFoundException { argument 219 public String getResourceTypeName(int resid) throws NotFoundException { argument 224 public String getResourceEntryName(int resid) throws NotFoundException { argument
|
/frameworks/layoutlib/bridge/src/android/content/res/ |
H A D | Resources_Theme_Delegate.java | 69 int resid, int[] attrs) 73 resid, attrs); 94 int resid, TypedValue outValue, 97 boolean found = RenderSessionImpl.getCurrentContext().resolveThemeAttribute(resid, 67 obtainStyledAttributes( Resources thisResources, Theme thisTheme, int resid, int[] attrs) argument 92 resolveAttribute( Resources thisResources, Theme thisTheme, int resid, TypedValue outValue, boolean resolveRefs) argument
|
/frameworks/support/media/src/androidTest/java/androidx/media/ |
H A D | MediaPlayer2TestBase.java | 159 protected MediaPlayer2 createMediaPlayer2(Context context, int resid) { argument 162 return createMediaPlayer2(context, resid, null, s > 0 ? s : 0); 165 protected MediaPlayer2 createMediaPlayer2(Context context, int resid, argument 168 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resid); 418 protected boolean loadResource(int resid) throws Exception { argument 420 if (!MediaUtils.hasCodecsForResource(mContext, resid)) { 425 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); 437 protected DataSourceDesc createDataSourceDesc(int resid) throws Exception { argument 439 if (!MediaUtils.hasCodecsForResource(mContext, resid)) { 444 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); 450 checkLoadResource(int resid) argument 490 playVideoTest(int resid, int width, int height) argument [all...] |
/frameworks/base/core/jni/ |
H A D | android_util_AssetManager.cpp | 586 static jint NativeGetResourceValue(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid, argument 594 assetmanager->GetResource(static_cast<uint32_t>(resid), false /*may_be_bag*/, 600 uint32_t ref = static_cast<uint32_t>(resid); 610 static jint NativeGetResourceBagValue(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid, argument 613 const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid)); 635 uint32_t ref = static_cast<uint32_t>(resid); 644 static jintArray NativeGetStyleAttributes(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid) { argument 646 const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid)); 664 jint resid) { 666 const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid)); 663 NativeGetResourceStringArray(JNIEnv* env, jclass , jlong ptr, jint resid) argument 719 NativeGetResourceStringArrayInfo(JNIEnv* env, jclass , jlong ptr, jint resid) argument 762 NativeGetResourceIntArray(JNIEnv* env, jclass , jlong ptr, jint resid) argument 800 NativeGetResourceArraySize(JNIEnv* , jclass , jlong ptr, jint resid) argument 809 NativeGetResourceArray(JNIEnv* env, jclass , jlong ptr, jint resid, jintArray out_data) argument 890 NativeGetResourceName(JNIEnv* env, jclass , jlong ptr, jint resid) argument 928 NativeGetResourcePackageName(JNIEnv* env, jclass , jlong ptr, jint resid) argument 941 NativeGetResourceTypeName(JNIEnv* env, jclass , jlong ptr, jint resid) argument 956 NativeGetResourceEntryName(JNIEnv* env, jclass , jlong ptr, jint resid) argument 1192 NativeThemeApplyStyle(JNIEnv* env, jclass , jlong ptr, jlong theme_ptr, jint resid, jboolean force) argument 1221 NativeThemeGetAttributeValue(JNIEnv* env, jclass , jlong ptr, jlong theme_ptr, jint resid, jobject typed_value, jboolean resolve_references) argument [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
H A D | RowInflaterTask.java | 64 public void onInflateFinished(View view, int resid, ViewGroup parent) { argument
|
/frameworks/base/core/java/android/content/res/ |
H A D | Resources.java | 1404 * specified by <var>resid</var> will be retrieved from this Theme's 1462 * resource <var>resid</var> which are listed in <var>attrs</var>. 1565 * @param resid The resource identifier of the desired theme 1577 public boolean resolveAttribute(int resid, TypedValue outValue, boolean resolveRefs) { argument 1578 return mThemeImpl.resolveAttribute(resid, outValue, resolveRefs); 1935 public static boolean resourceHasPackage(@AnyRes int resid) { argument 1936 return (resid >>> 24) != 0; 1943 * @param resid The resource identifier whose name is to be retrieved. 1953 public String getResourceName(@AnyRes int resid) throws NotFoundException { argument 1954 return mResourcesImpl.getResourceName(resid); 1969 getResourcePackageName(@nyRes int resid) argument 1985 getResourceTypeName(@nyRes int resid) argument 2001 getResourceEntryName(@nyRes int resid) argument [all...] |