Merge "Collect permitted packages from java_sdk_library instances" into rvc-dev
This commit is contained in:
commit
5cfbb4332f
|
@ -611,10 +611,10 @@ func updatableBcpPackagesRule(ctx android.SingletonContext, image *bootImageConf
|
|||
// Collect `permitted_packages` for updatable boot jars.
|
||||
var updatablePackages []string
|
||||
ctx.VisitAllModules(func(module android.Module) {
|
||||
if j, ok := module.(*Library); ok {
|
||||
if j, ok := module.(PermittedPackagesForUpdatableBootJars); ok {
|
||||
name := ctx.ModuleName(module)
|
||||
if i := android.IndexList(name, updatableModules); i != -1 {
|
||||
pp := j.properties.Permitted_packages
|
||||
pp := j.PermittedPackagesForUpdatableBootJars()
|
||||
if len(pp) > 0 {
|
||||
updatablePackages = append(updatablePackages, pp...)
|
||||
} else {
|
||||
|
|
11
java/java.go
11
java/java.go
|
@ -1839,6 +1839,17 @@ type Library struct {
|
|||
InstallMixin func(ctx android.ModuleContext, installPath android.Path) (extraInstallDeps android.Paths)
|
||||
}
|
||||
|
||||
// Provides access to the list of permitted packages from updatable boot jars.
|
||||
type PermittedPackagesForUpdatableBootJars interface {
|
||||
PermittedPackagesForUpdatableBootJars() []string
|
||||
}
|
||||
|
||||
var _ PermittedPackagesForUpdatableBootJars = (*Library)(nil)
|
||||
|
||||
func (j *Library) PermittedPackagesForUpdatableBootJars() []string {
|
||||
return j.properties.Permitted_packages
|
||||
}
|
||||
|
||||
func shouldUncompressDex(ctx android.ModuleContext, dexpreopter *dexpreopter) bool {
|
||||
// Store uncompressed (and aligned) any dex files from jars in APEXes.
|
||||
if am, ok := ctx.Module().(android.ApexModule); ok && !am.IsForPlatform() {
|
||||
|
|
Loading…
Reference in New Issue