Merge "Add signing lineage for runtime_resource_overlay" into rvc-dev

This commit is contained in:
Liz Kammer
2020-05-27 16:39:20 +00:00
committed by Android (Google) Code Review
2 changed files with 14 additions and 1 deletions

View File

@@ -1633,6 +1633,9 @@ type RuntimeResourceOverlayProperties struct {
// module name in the form ":module".
Certificate *string
// Name of the signing certificate lineage file.
Lineage *string
// optional theme name. If specified, the overlay package will be applied
// only when the ro.boot.vendor.overlay.theme system property is set to the same value.
Theme *string
@@ -1698,7 +1701,11 @@ func (r *RuntimeResourceOverlay) GenerateAndroidBuildActions(ctx android.ModuleC
_, certificates := collectAppDeps(ctx, r, false, false)
certificates = processMainCert(r.ModuleBase, String(r.properties.Certificate), certificates, ctx)
signed := android.PathForModuleOut(ctx, "signed", r.Name()+".apk")
SignAppPackage(ctx, signed, r.aapt.exportPackage, certificates, nil, nil)
var lineageFile android.Path
if lineage := String(r.properties.Lineage); lineage != "" {
lineageFile = android.PathForModuleSrc(ctx, lineage)
}
SignAppPackage(ctx, signed, r.aapt.exportPackage, certificates, nil, lineageFile)
r.certificate = certificates[0]
r.outputFile = signed