diff options
author | 2021-11-12 17:41:02 -0800 | |
---|---|---|
committer | 2021-11-17 19:55:33 -0800 | |
commit | 50ed1f9ccb42ce2faaf652fe1819dbd57f35b44d (patch) | |
tree | db3bafe39d558460e412bcd0b1d87038f604f3f0 /java/app_set.go | |
parent | ffbcd1d8a086c581a14a42e54fa0019c637f56e6 (diff) |
Install android_app_set modules in Soong
Add support for installing extra files from a zip file when installing
a primary file, and use it to support installing android_app_set modules,
which install a primary APK and then an unknown set of additional splits
APKs.
Test: app_set_test.go
Test: install test android_app_set
Bug: 204136549
Change-Id: Ia92f7e5c427adcef3bcf59c82a2f83450905c01d
Diffstat (limited to 'java/app_set.go')
-rw-r--r-- | java/app_set.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/java/app_set.go b/java/app_set.go index 2e9a4abdc..694b1670e 100644 --- a/java/app_set.go +++ b/java/app_set.go @@ -143,8 +143,18 @@ func (as *AndroidAppSet) GenerateAndroidBuildActions(ctx android.ModuleContext) "zip": as.packedOutput.String(), }, }) + + var installDir android.InstallPath + if as.Privileged() { + installDir = android.PathForModuleInstall(ctx, "priv-app", as.BaseModuleName()) + } else { + installDir = android.PathForModuleInstall(ctx, "app", as.BaseModuleName()) + } + ctx.InstallFileWithExtraFilesZip(installDir, as.BaseModuleName()+".apk", as.primaryOutput, as.packedOutput) } +func (as *AndroidAppSet) InstallBypassMake() bool { return true } + // android_app_set extracts a set of APKs based on the target device // configuration and installs this set as "split APKs". // The extracted set always contains an APK whose name is |