Merge "Handle boot jars on /system_ext correctly."

This commit is contained in:
Treehugger Robot
2021-04-15 16:30:03 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 2 deletions

View File

@@ -484,7 +484,7 @@ func getBootJar(ctx android.SingletonContext, bootjars android.ConfiguredJarList
// Now match the apex part of the boot image configuration. // Now match the apex part of the boot image configuration.
requiredApex := bootjars.Apex(index) requiredApex := bootjars.Apex(index)
if requiredApex == "platform" { if requiredApex == "platform" || requiredApex == "system_ext" {
if len(apexInfo.InApexes) != 0 { if len(apexInfo.InApexes) != 0 {
// A platform variant is required but this is for an apex so ignore it. // A platform variant is required but this is for an apex so ignore it.
return -1, nil, nil return -1, nil, nil

View File

@@ -35,6 +35,7 @@ func testDexpreoptBoot(t *testing.T, ruleFile string, expectedInputs, expectedOu
name: "bar", name: "bar",
srcs: ["b.java"], srcs: ["b.java"],
installable: true, installable: true,
system_ext_specific: true,
} }
dex_import { dex_import {
@@ -47,7 +48,7 @@ func testDexpreoptBoot(t *testing.T, ruleFile string, expectedInputs, expectedOu
prepareForJavaTest, prepareForJavaTest,
PrepareForTestWithJavaSdkLibraryFiles, PrepareForTestWithJavaSdkLibraryFiles,
FixtureWithLastReleaseApis("foo"), FixtureWithLastReleaseApis("foo"),
dexpreopt.FixtureSetBootJars("platform:foo", "platform:bar", "platform:baz"), dexpreopt.FixtureSetBootJars("platform:foo", "system_ext:bar", "platform:baz"),
).RunTestWithBp(t, bp) ).RunTestWithBp(t, bp)
dexpreoptBootJars := result.SingletonForTests("dex_bootjars") dexpreoptBootJars := result.SingletonForTests("dex_bootjars")