Remove EnforceRROExemptedTargets

There is no more target relying on EnforceRROExemptedTargets

Bug: 150820813
Test: m
Change-Id: If50d22c0e4f99e8c50d6a30cb94a0c3a5646b6fa
This commit is contained in:
Jeongik Cha
2021-02-19 12:11:51 +09:00
parent abf3f3c0ef
commit cee5ba973d
4 changed files with 21 additions and 52 deletions

View File

@@ -160,8 +160,8 @@ func (a *aapt) SetRROEnforcedForDependent(enforce bool) {
func (a *aapt) IsRROEnforced(ctx android.BaseModuleContext) bool {
// True if RRO is enforced for this module or...
return ctx.Config().EnforceRROForModule(ctx.ModuleName()) ||
// if RRO is enforced for any of its dependents, and this module is not exempted.
(a.aaptProperties.RROEnforcedForDependent && !ctx.Config().EnforceRROExemptedForModule(ctx.ModuleName()))
// if RRO is enforced for any of its dependents.
a.aaptProperties.RROEnforcedForDependent
}
func (a *aapt) aapt2Flags(ctx android.ModuleContext, sdkContext sdkContext,
@@ -443,16 +443,14 @@ func aaptLibs(ctx android.ModuleContext, sdkContext sdkContext, classLoaderConte
assets = append(assets, aarDep.ExportedAssets().Path())
}
if !ctx.Config().EnforceRROExemptedForModule(ctx.ModuleName()) {
outer:
for _, d := range aarDep.ExportedRRODirs() {
for _, e := range staticRRODirs {
if d.path == e.path {
continue outer
}
outer:
for _, d := range aarDep.ExportedRRODirs() {
for _, e := range staticRRODirs {
if d.path == e.path {
continue outer
}
staticRRODirs = append(staticRRODirs, d)
}
staticRRODirs = append(staticRRODirs, d)
}
}
}