bootclasspath_fragment: Always output contents property in snapshot

Bug: 177892522
Test: m art-module-sdk
      - check generated snapshot contains contents property
Change-Id: I122dedba6600a199bfd83b01988da36ddfd09d63
This commit is contained in:
Paul Duffin 2021-04-23 16:58:51 +01:00
parent e95b53a55d
commit 2dc665bb48
2 changed files with 3 additions and 6 deletions

View File

@ -428,12 +428,7 @@ func (b *bootclasspathFragmentSdkMemberProperties) PopulateFromVariant(ctx andro
module := variant.(*BootclasspathFragmentModule)
b.Image_name = module.properties.Image_name
if b.Image_name == nil {
// Only one of image_name or contents can be specified. However, if image_name is set then the
// contents property is updated to match the configuration used to create the corresponding
// boot image. Therefore, contents property is only copied if the image name is not specified.
b.Contents = module.properties.Contents
}
// Get the flag file information from the module.
mctx := ctx.SdkModuleContext()

View File

@ -113,6 +113,7 @@ prebuilt_bootclasspath_fragment {
visibility: ["//visibility:public"],
apex_available: ["com.android.art"],
image_name: "art",
contents: ["mybootlib"],
}
java_import {
@ -132,6 +133,7 @@ prebuilt_bootclasspath_fragment {
visibility: ["//visibility:public"],
apex_available: ["com.android.art"],
image_name: "art",
contents: ["mysdk_mybootlib@current"],
}
java_import {