You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
AssetManager.loadThemeAttributeValue(): don't return attributeId as resourceId
If the value has no resourceId, it should be resourceId=0 instead of setting it to the attributeId.
This commit is contained in:
@@ -234,11 +234,11 @@ JNIEXPORT jint JNICALL Java_android_content_res_AssetManager_loadThemeAttributeV
|
|||||||
struct AssetManager *asset_manager = _PTR(_GET_LONG_FIELD(this, "mObject"));
|
struct AssetManager *asset_manager = _PTR(_GET_LONG_FIELD(this, "mObject"));
|
||||||
const struct ResTable *res_table = AssetManager_getResources(asset_manager, true);
|
const struct ResTable *res_table = AssetManager_getResources(asset_manager, true);
|
||||||
struct Theme *theme = _PTR(theme_ptr);
|
struct Theme *theme = _PTR(theme_ptr);
|
||||||
uint32_t resId = ident;
|
uint32_t resId = 0;
|
||||||
struct Res_value value;
|
struct Res_value value;
|
||||||
uint32_t outSpecFlags;
|
uint32_t outSpecFlags;
|
||||||
struct ResTable_config outConfig;
|
struct ResTable_config outConfig;
|
||||||
int block = Theme_getAttribute(theme, resId, &value, &outSpecFlags);
|
int block = Theme_getAttribute(theme, ident, &value, &outSpecFlags);
|
||||||
if (resolve) {
|
if (resolve) {
|
||||||
block = Theme_resolveAttributeReference(theme, &value, block, &resId, &outSpecFlags, &outConfig);
|
block = Theme_resolveAttributeReference(theme, &value, block, &resId, &outSpecFlags, &outConfig);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user