Convert RRO enforcement to transition mutator
Convert propagateRROEnforcementMutator to a transition mutator.
Bug: 367784740
Test: TestEnforceRRO_propagatesToDependencies
Test: TestAndroidResourceOverlays
Flag: EXEMPT refactor
Change-Id: I06c887f7203f3961f57bcaf458a191813e167561
diff --git a/android/config.go b/android/config.go
index 368e573..1cb2393 100644
--- a/android/config.go
+++ b/android/config.go
@@ -1273,6 +1273,7 @@
}
return false
}
+
func (c *config) EnforceRROExcludedOverlay(path string) bool {
excluded := c.productVariables.EnforceRROExcludedOverlays
if len(excluded) > 0 {
@@ -1281,6 +1282,11 @@
return false
}
+func (c *config) EnforceRROGlobally() bool {
+ enforceList := c.productVariables.EnforceRROTargets
+ return InList("*", enforceList)
+}
+
func (c *config) ExportedNamespaces() []string {
return append([]string(nil), c.productVariables.NamespacesToExport...)
}