From 7f51107ee6a7666cbb7d7340c7e08655e767a9a2 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Mon, 12 Oct 2020 15:10:36 +0100 Subject: [PATCH] Rename ART release APEX to com.android.art. Test: See https://r.android.com/1457217 Bug: 169639321 Change-Id: I6800c7a382486b4e50945cc8b789f4be16482fe6 Merged-In: I6800c7a382486b4e50945cc8b789f4be16482fe6 --- apex/vndk.go | 2 +- cc/androidmk.go | 9 +++++---- java/dexpreopt_bootjars.go | 4 ++-- scripts/build-mainline-modules.sh | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/apex/vndk.go b/apex/vndk.go index 93265c4ac..f4b12b564 100644 --- a/apex/vndk.go +++ b/apex/vndk.go @@ -152,7 +152,7 @@ func makeCompatSymlinks(name string, ctx android.ModuleContext) (symlinks []stri } // TODO(b/124106384): Clean up compat symlinks for ART binaries. - if strings.HasPrefix(name, "com.android.art.") { + if name == "com.android.art" || strings.HasPrefix(name, "com.android.art.") { addSymlink("/apex/com.android.art/bin/dalvikvm", "$(TARGET_OUT)/bin", "dalvikvm") dex2oat := "dex2oat32" if ctx.Config().Android64() { diff --git a/cc/androidmk.go b/cc/androidmk.go index e58a172b8..846efc4d1 100644 --- a/cc/androidmk.go +++ b/cc/androidmk.go @@ -71,10 +71,11 @@ func (c *Module) AndroidMkEntries() []android.AndroidMkEntries { entries := android.AndroidMkEntries{ OutputFile: c.outputFile, - // TODO(jiyong): add the APEXes providing shared libs to the required modules - // Currently, adding c.Properties.ApexesProvidingSharedLibs is causing multiple - // ART APEXes (com.android.art.debug|release) to be installed. And this - // is breaking some older devices (like marlin) where system.img is small. + // TODO(jiyong): add the APEXes providing shared libs to the required + // modules Currently, adding c.Properties.ApexesProvidingSharedLibs is + // causing multiple ART APEXes (com.android.art and com.android.art.debug) + // to be installed. And this is breaking some older devices (like marlin) + // where system.img is small. Required: c.Properties.AndroidMkRuntimeLibs, Include: "$(BUILD_SYSTEM)/soong_cc_prebuilt.mk", diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go index 9f49786ba..629d34f25 100644 --- a/java/dexpreopt_bootjars.go +++ b/java/dexpreopt_bootjars.go @@ -270,7 +270,7 @@ func getBootImageJar(ctx android.SingletonContext, image *bootImageConfig, modul apexInfo := ctx.ModuleProvider(module, android.ApexInfoProvider).(android.ApexInfo) fromUpdatableApex := isApexModule && apexInfo.Updatable if image.name == artBootImageName { - if isApexModule && len(apexInfo.InApexes) > 0 && allHavePrefix(apexInfo.InApexes, "com.android.art.") { + if isApexModule && len(apexInfo.InApexes) > 0 && allHavePrefix(apexInfo.InApexes, "com.android.art") { // ok: found the jar in the ART apex } else if isApexModule && apexInfo.IsForPlatform() && isHostdex(module) { // exception (skip and continue): special "hostdex" platform variant @@ -301,7 +301,7 @@ func getBootImageJar(ctx android.SingletonContext, image *bootImageConfig, modul func allHavePrefix(list []string, prefix string) bool { for _, s := range list { - if !strings.HasPrefix(s, prefix) { + if s != prefix && !strings.HasPrefix(s, prefix+".") { return false } } diff --git a/scripts/build-mainline-modules.sh b/scripts/build-mainline-modules.sh index c5ec8d19c..b8dd7aaa5 100755 --- a/scripts/build-mainline-modules.sh +++ b/scripts/build-mainline-modules.sh @@ -3,13 +3,13 @@ # Non exhaustive list of modules where we want prebuilts. More can be added as # needed. MAINLINE_MODULES=( + com.android.art com.android.art.debug - com.android.art.release com.android.art.testing com.android.conscrypt + com.android.i18n com.android.runtime com.android.tzdata - com.android.i18n ) # List of SDKs and module exports we know of.