Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6526d23e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Collect permitted packages from java_sdk_library instances" into...

Merge "Collect permitted packages from java_sdk_library instances" into rvc-dev am: 5cfbb433 am: 648b9b2b am: 7aa739ae

Change-Id: Ia4080b8a126d542d32456463c1bb9dc592390ee8
parents 0c7d98b5 7aa739ae
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -619,10 +619,10 @@ func updatableBcpPackagesRule(ctx android.SingletonContext, image *bootImageConf
		// Collect `permitted_packages` for updatable boot jars.
		// Collect `permitted_packages` for updatable boot jars.
		var updatablePackages []string
		var updatablePackages []string
		ctx.VisitAllModules(func(module android.Module) {
		ctx.VisitAllModules(func(module android.Module) {
			if j, ok := module.(*Library); ok {
			if j, ok := module.(PermittedPackagesForUpdatableBootJars); ok {
				name := ctx.ModuleName(module)
				name := ctx.ModuleName(module)
				if i := android.IndexList(name, updatableModules); i != -1 {
				if i := android.IndexList(name, updatableModules); i != -1 {
					pp := j.properties.Permitted_packages
					pp := j.PermittedPackagesForUpdatableBootJars()
					if len(pp) > 0 {
					if len(pp) > 0 {
						updatablePackages = append(updatablePackages, pp...)
						updatablePackages = append(updatablePackages, pp...)
					} else {
					} else {
+11 −0
Original line number Original line Diff line number Diff line
@@ -1843,6 +1843,17 @@ type Library struct {
	InstallMixin func(ctx android.ModuleContext, installPath android.Path) (extraInstallDeps android.Paths)
	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 {
func shouldUncompressDex(ctx android.ModuleContext, dexpreopter *dexpreopter) bool {
	// Store uncompressed (and aligned) any dex files from jars in APEXes.
	// Store uncompressed (and aligned) any dex files from jars in APEXes.
	if am, ok := ctx.Module().(android.ApexModule); ok && !am.IsForPlatform() {
	if am, ok := ctx.Module().(android.ApexModule); ok && !am.IsForPlatform() {