Adds support for 'ignored-on-host'
Adds a filter mechanism that can exclude property values from being included in the common value extraction. That is needed to prevent the snapshot mechanism from generating invalid output for properties that are ignored on host (and have their values cleared) and which are not tagged with `android:"arch_variant"`. Changes: * Updates the documentation of SdkMemberType to explain what effect the 'ignored-on-host' tag has. * Adds some tests for this new mechanism. Bug: 155628860 Test: m nothing Change-Id: I7ebd333079619dba546bc8c4911d567e0287b676
This commit is contained in:
@@ -351,6 +351,15 @@ type SdkMemberType interface {
|
||||
// values that differ by arch, fields not tagged as such must have common values across
|
||||
// all variants.
|
||||
//
|
||||
// * Additional field tags can be specified on a field that will ignore certain values
|
||||
// for the purpose of common value optimization. A value that is ignored must have the
|
||||
// default value for the property type. This is to ensure that significant value are not
|
||||
// ignored by accident. The purpose of this is to allow the snapshot generation to reflect
|
||||
// the behavior of the runtime. e.g. if a property is ignored on the host then a property
|
||||
// that is common for android can be treated as if it was common for android and host as
|
||||
// the setting for host is ignored anyway.
|
||||
// * `sdk:"ignored-on-host" - this indicates the property is ignored on the host variant.
|
||||
//
|
||||
// * The sdk module type populates the BpModule structure, creating the arch specific
|
||||
// structure and calls AddToPropertySet(...) on the properties struct to add the member
|
||||
// specific properties in the correct place in the structure.
|
||||
|
Reference in New Issue
Block a user