diff options
| author | 2020-12-14 22:25:06 +0000 | |
|---|---|---|
| committer | 2020-12-14 22:25:06 +0000 | |
| commit | ccd5ca9bc42ace7291c970b0412445e7d433c219 (patch) | |
| tree | 0a4ff5fb5a18d27f8e8cbc7867900b9f933d3bfe /libs/androidfw/AttributeResolution.cpp | |
| parent | c85f216055409b1b2408d2261eaec0dda661d663 (diff) | |
| parent | 9e78098e8526b7171ba31297960da0c7806a424e (diff) | |
Set resource id correctly when resolve fails am: e7ab62723a am: 9e78098e85
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519910
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I25318a316ae24d3f587009c688f7e830b7c00c2b
Diffstat (limited to 'libs/androidfw/AttributeResolution.cpp')
| -rw-r--r-- | libs/androidfw/AttributeResolution.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/androidfw/AttributeResolution.cpp b/libs/androidfw/AttributeResolution.cpp index 71919fdbb736..d07b452ad40e 100644 --- a/libs/androidfw/AttributeResolution.cpp +++ b/libs/androidfw/AttributeResolution.cpp @@ -265,7 +265,7 @@ base::expected<std::monostate, IOError> ApplyStyle(Theme* theme, ResXMLParser* x const size_t xml_attr_idx = xml_attr_finder.Find(cur_ident); if (xml_attr_idx != xml_attr_finder.end()) { // We found the attribute we were looking for. - Res_value attribute_value; + Res_value attribute_value{}; xml_parser->getAttributeValue(xml_attr_idx, &attribute_value); value.type = attribute_value.dataType; value.data = attribute_value.data; @@ -377,7 +377,7 @@ base::expected<std::monostate, IOError> RetrieveAttributes(AssetManager2* assetm // Retrieve the current XML attribute if it matches, and step to next. if (ix < xml_attr_count && cur_ident == cur_xml_attr) { - Res_value attribute_value; + Res_value attribute_value{}; xml_parser->getAttributeValue(ix, &attribute_value); value.type = attribute_value.dataType; value.data = attribute_value.data; |