Fix the problem of resource integration confusion caused by not adding regional configuration tailoring.

An android app is automatically creating a corresponding "product
characteristics" RRO. The app's resources are filtered by the aapt
product config, but the rro resources are not. This cl makes the RRO
resources also filtered.

When building the CN version, it was expected that only the resources
corresponding to the CN version would be retained, but the actual result
was that other unexpected areas appeared on the region setting interface
in boot interface. After investigation, it was found that the
framework-res__nosdcard__auto_generated_characteristics_rro.apk apk
integrated resources other than the CN version that caused this problem,
and the integration of this apk was not filtered by aaptconfig.
The purpose of this modification is to add aaptconfig filtering, and it
has been verified that this problem can be fixed.

Change-Id: I85d5d07397bd2b0759d35b9f3a07f015346af4e9
Signed-off-by: wybxyx <wybxyx@gmail.com>
This commit is contained in:
优秀 2024-05-09 07:15:55 +00:00 committed by Cole Faust
parent a6ecdd39c8
commit d75e99859b

View file

@ -1232,6 +1232,11 @@ func AndroidAppFactory() android.Module {
Manifest: proptools.StringPtr(":" + rroManifestName),
Resource_dirs: a.aaptProperties.Resource_dirs,
}
if !Bool(a.aaptProperties.Aapt_include_all_resources) {
for _, aaptConfig := range ctx.Config().ProductAAPTConfig() {
rroProperties.Aaptflags = append(rroProperties.Aaptflags, "-c", aaptConfig)
}
}
ctx.CreateModule(RuntimeResourceOverlayFactory, &rroProperties)
})