From 50ed1f9ccb42ce2faaf652fe1819dbd57f35b44d Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 12 Nov 2021 17:41:02 -0800 Subject: 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 --- java/app_set.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'java/app_set.go') 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 -- cgit v1.2.3-59-g8ed1b