aboutsummaryrefslogtreecommitdiffstats
path: root/java/java.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2020-05-29 11:24:51 +0100
committerPaul Duffin <paulduffin@google.com>2020-05-29 12:35:18 +0100
commita105cf99d0efb05f186cf07b1e34cb3f79694664 (patch)
tree2d9c7aeb1d13f39bcde9408b59f12663a9a0aa87 /java/java.go
parentc55242703210fbd46faa7b0b5607509778aa9eac (diff)
downloadbuild_soong-a105cf99d0efb05f186cf07b1e34cb3f79694664.tar.gz
build_soong-a105cf99d0efb05f186cf07b1e34cb3f79694664.tar.bz2
build_soong-a105cf99d0efb05f186cf07b1e34cb3f79694664.zip
Collect permitted packages from java_sdk_library instances
Switching an updatable boot jar from java_library to java_sdk_library changed the contents of the updatable-bcp-packages.txt due to the code requiring the module to be *Library. This change updates that to allow it to be any module that implements the PermittedPackagesForUpdatableBootJars interface which is *Library and anything that embeds that like *SdkLibrary. Bug: 155164730 Test: m droid and check the contents of system/etc/updatable-bcp-packages.txt Change-Id: I464af74628da311734f102f77ec8158daec5b32d
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go
index c30dc4e5..e01d1099 100644
--- a/java/java.go
+++ b/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() {