summaryrefslogtreecommitdiff
path: root/java/dexpreopt_bootjars.go
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2021-09-23 07:36:57 +0000
committer Jiakai Zhang <jiakaiz@google.com> 2021-09-24 03:19:05 +0000
commit46eb0fd501cf2e9e391808b55a8c91d2364f10cc (patch)
treeb20f29e9fb68dcc49021aeaccd674bf2ba9f74a8 /java/dexpreopt_bootjars.go
parent66213a64b2dc1b5491dd127b35aa7b9c960ea6c7 (diff)
Remove updatable-bcp-packages.txt.
Historically, this file was used by the `--updatable-bcp-packages-file` flag for dex2oat. The flag is no longer needed and is being deprecated. Unfortunately, we cannot remove `permitted_packages` and all the code related to it because we still need it for checking the module compatibility with Q and R. Bug: 200241946 Test: m nothing Change-Id: Ie3be54fd47a847ba0caf627d12da76b415d99466
Diffstat (limited to 'java/dexpreopt_bootjars.go')
-rw-r--r--java/dexpreopt_bootjars.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index 946092cdb..284a19a1f 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -16,7 +16,6 @@ package java
import (
"path/filepath"
- "sort"
"strings"
"android/soong/android"
@@ -812,40 +811,6 @@ func bootFrameworkProfileRule(ctx android.ModuleContext, image *bootImageConfig)
return profile
}
-// generateUpdatableBcpPackagesRule generates the rule to create the updatable-bcp-packages.txt file
-// and returns a path to the generated file.
-func generateUpdatableBcpPackagesRule(ctx android.ModuleContext, image *bootImageConfig, apexModules []android.Module) android.WritablePath {
- // Collect `permitted_packages` for updatable boot jars.
- var updatablePackages []string
- for _, module := range apexModules {
- if j, ok := module.(PermittedPackagesForUpdatableBootJars); ok {
- pp := j.PermittedPackagesForUpdatableBootJars()
- if len(pp) > 0 {
- updatablePackages = append(updatablePackages, pp...)
- } else {
- ctx.OtherModuleErrorf(module, "Missing permitted_packages")
- }
- }
- }
-
- // Sort updatable packages to ensure deterministic ordering.
- sort.Strings(updatablePackages)
-
- updatableBcpPackagesName := "updatable-bcp-packages.txt"
- updatableBcpPackages := image.dir.Join(ctx, updatableBcpPackagesName)
-
- // WriteFileRule automatically adds the last end-of-line.
- android.WriteFileRule(ctx, updatableBcpPackages, strings.Join(updatablePackages, "\n"))
-
- rule := android.NewRuleBuilder(pctx, ctx)
- rule.Install(updatableBcpPackages, "/system/etc/"+updatableBcpPackagesName)
- // TODO: Rename `profileInstalls` to `extraInstalls`?
- // Maybe even move the field out of the bootImageConfig into some higher level type?
- image.profileInstalls = append(image.profileInstalls, rule.Installs()...)
-
- return updatableBcpPackages
-}
-
func dumpOatRules(ctx android.ModuleContext, image *bootImageConfig) {
var allPhonies android.Paths
for _, image := range image.variants {