diff options
author | 2020-05-27 16:36:07 -0700 | |
---|---|---|
committer | 2020-06-04 20:25:53 -0700 | |
commit | 18d98bc3e0d50801b76ba53a2c9a445c16e8c57f (patch) | |
tree | 50b21e03df2120314b3aa1b5b22a11eb7cc87196 /apex/apex.go | |
parent | c55b679e7bbd2bd64c39464f030fc9b427ec7363 (diff) |
Allow apex module to have android_app_set as its constituent.
Fixes: 157166068
Test: treehugger & manual
Change-Id: I9f91f1b761286f489d175eb0772f78f702e8a2d6
Diffstat (limited to 'apex/apex.go')
-rw-r--r-- | apex/apex.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apex/apex.go b/apex/apex.go index 8fd80fcaf..67bec0629 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1115,6 +1115,7 @@ const ( javaSharedLib nativeTest app + appSet ) func (class apexFileClass) NameInMake() string { @@ -1129,7 +1130,7 @@ func (class apexFileClass) NameInMake() string { return "JAVA_LIBRARIES" case nativeTest: return "NATIVE_TESTS" - case app: + case app, appSet: // b/142537672 Why isn't this APP? We want to have full control over // the paths and file names of the apk file under the flattend APEX. // If this is set to APP, then the paths and file names are modified @@ -1998,6 +1999,15 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { filesInfo = append(filesInfo, apexFileForAndroidApp(ctx, ap)) } else if ap, ok := child.(*java.AndroidTestHelperApp); ok { filesInfo = append(filesInfo, apexFileForAndroidApp(ctx, ap)) + } else if ap, ok := child.(*java.AndroidAppSet); ok { + appDir := "app" + if ap.Privileged() { + appDir = "priv-app" + } + af := newApexFile(ctx, ap.OutputFile(), ap.Name(), + filepath.Join(appDir, ap.BaseModuleName()), appSet, ap) + af.certificate = java.PresignedCertificate + filesInfo = append(filesInfo, af) } else { ctx.PropertyErrorf("apps", "%q is not an android_app module", depName) } |