Merge "Apply EnforceRROExemptedTargets in Soong"
diff --git a/android/config.go b/android/config.go
index bbbe3c8..7953170 100644
--- a/android/config.go
+++ b/android/config.go
@@ -872,6 +872,13 @@
func (c *config) EnforceRROForModule(name string) bool {
enforceList := c.productVariables.EnforceRROTargets
+ // TODO(b/150820813) Some modules depend on static overlay, remove this after eliminating the dependency.
+ exemptedList := c.productVariables.EnforceRROExemptedTargets
+ if exemptedList != nil {
+ if InList(name, exemptedList) {
+ return false
+ }
+ }
if enforceList != nil {
if InList("*", enforceList) {
return true
diff --git a/android/variable.go b/android/variable.go
index 25c94bc..91de956 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -188,9 +188,11 @@
CrossHostArch *string `json:",omitempty"`
CrossHostSecondaryArch *string `json:",omitempty"`
- DeviceResourceOverlays []string `json:",omitempty"`
- ProductResourceOverlays []string `json:",omitempty"`
- EnforceRROTargets []string `json:",omitempty"`
+ DeviceResourceOverlays []string `json:",omitempty"`
+ ProductResourceOverlays []string `json:",omitempty"`
+ EnforceRROTargets []string `json:",omitempty"`
+ // TODO(b/150820813) Some modules depend on static overlay, remove this after eliminating the dependency.
+ EnforceRROExemptedTargets []string `json:",omitempty"`
EnforceRROExcludedOverlays []string `json:",omitempty"`
AAPTCharacteristics *string `json:",omitempty"`