diff options
| author | 2019-01-16 21:48:46 +0000 | |
|---|---|---|
| committer | 2019-01-16 21:48:46 +0000 | |
| commit | 428ddacfa410898fca9838bf2b5b342b1d4f030a (patch) | |
| tree | 4801af84b24f35f46b0e17e3382db48e0ca93378 /libs/androidfw/AttributeResolution.cpp | |
| parent | 7650ea6378af91eb136c491bb147ef969f0ea13a (diff) | |
| parent | ce7c99c6617bd8a577126386a37060d356b5d1d4 (diff) | |
Merge "Add source style for each TypedValue."
Diffstat (limited to 'libs/androidfw/AttributeResolution.cpp')
| -rw-r--r-- | libs/androidfw/AttributeResolution.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/androidfw/AttributeResolution.cpp b/libs/androidfw/AttributeResolution.cpp index 3dc1f2cd56c5..18d74efdbacf 100644 --- a/libs/androidfw/AttributeResolution.cpp +++ b/libs/androidfw/AttributeResolution.cpp @@ -286,6 +286,7 @@ void ApplyStyle(Theme* theme, ResXMLParser* xml_parser, uint32_t def_style_attr, value.dataType = Res_value::TYPE_NULL; value.data = Res_value::DATA_NULL_UNDEFINED; config.density = 0; + uint32_t source_style_resid = 0; // Try to find a value for this attribute... we prioritize values // coming from, first XML attributes, then XML style, then default @@ -309,6 +310,7 @@ void ApplyStyle(Theme* theme, ResXMLParser* xml_parser, uint32_t def_style_attr, cookie = entry->cookie; type_set_flags = style_flags; value = entry->value; + source_style_resid = entry->style; if (kDebugStyles) { ALOGI("-> From style: type=0x%x, data=0x%08x, style=0x%08x", value.dataType, value.data, entry->style); @@ -325,8 +327,10 @@ void ApplyStyle(Theme* theme, ResXMLParser* xml_parser, uint32_t def_style_attr, type_set_flags = def_style_flags; value = entry->value; if (kDebugStyles) { - ALOGI("-> From def style: type=0x%x, data=0x%08x", value.dataType, value.data); + ALOGI("-> From def style: type=0x%x, data=0x%08x, style=0x%08x", value.dataType, value.data, + entry->style); } + source_style_resid = entry->style; } } @@ -382,6 +386,7 @@ void ApplyStyle(Theme* theme, ResXMLParser* xml_parser, uint32_t def_style_attr, out_values[STYLE_RESOURCE_ID] = resid; out_values[STYLE_CHANGING_CONFIGURATIONS] = type_set_flags; out_values[STYLE_DENSITY] = config.density; + out_values[SYTLE_SOURCE_STYLE] = source_style_resid; if (value.dataType != Res_value::TYPE_NULL || value.data == Res_value::DATA_NULL_EMPTY) { indices_idx++; |