summaryrefslogtreecommitdiff
path: root/libs/androidfw/AttributeResolution.cpp
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2019-01-31 11:53:41 -0800
committerScott Lobdell <slobdell@google.com>2019-02-01 14:08:42 -0800
commit88b45c586d461df38b866d529bc98d1dfa3e8838 (patch)
treeae57a86275dac94c0899015923778f3016c865b2 /libs/androidfw/AttributeResolution.cpp
parent067596650927fa91a97355e84b152b21826f7ae2 (diff)
parent9b9ca46fc2d3da231bf9ef6ff630105720f94cf2 (diff)
Merge QP1A.190122.001
Conflicts: api/system-current.txt core/java/android/bluetooth/BluetoothAdapter.java core/jni/android_util_Process.cpp core/jni/com_android_internal_os_Zygote.cpp core/res/res/values/config.xml core/res/res/values/symbols.xml media/java/android/media/MediaCodecInfo.java packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java services/core/java/com/android/server/ConnectivityService.java services/core/java/com/android/server/LocationManagerService.java services/core/java/com/android/server/am/ActivityManagerService.java services/core/java/com/android/server/connectivity/NetworkAgentInfo.java services/core/java/com/android/server/location/GnssLocationProvider.java services/core/java/com/android/server/wm/ActivityStack.java services/net/java/android/net/ip/IpClient.java telecomm/java/android/telecom/Connection.java telephony/java/android/telephony/ims/ImsCallSession.java telephony/java/android/telephony/ims/ImsCallSessionListener.java telephony/java/android/telephony/ims/aidl/IImsCallSessionListener.aidl telephony/java/android/telephony/ims/compat/stub/ImsCallSessionImplBase.java telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl wifi/java/android/net/wifi/WifiConfiguration.java Change-Id: I367301986f2ae80a528050c3d78776b5a4c6b5ee
Diffstat (limited to 'libs/androidfw/AttributeResolution.cpp')
-rw-r--r--libs/androidfw/AttributeResolution.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/libs/androidfw/AttributeResolution.cpp b/libs/androidfw/AttributeResolution.cpp
index 57e3491895e6..18d74efdbacf 100644
--- a/libs/androidfw/AttributeResolution.cpp
+++ b/libs/androidfw/AttributeResolution.cpp
@@ -51,7 +51,7 @@ class XmlAttributeFinder
class BagAttributeFinder
: public BackTrackingAttributeFinder<BagAttributeFinder, const ResolvedBag::Entry*> {
public:
- BagAttributeFinder(const ResolvedBag* bag)
+ explicit BagAttributeFinder(const ResolvedBag* bag)
: BackTrackingAttributeFinder(bag != nullptr ? bag->entries : nullptr,
bag != nullptr ? bag->entries + bag->entry_count : nullptr) {
}
@@ -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++;