Add signing linage support for android_app_import
Test: app_test
Bug: 153366049
Change-Id: I260f198637a1a0f8b3373250413356785c56588a
diff --git a/java/app.go b/java/app.go
index 756203c..86cf747 100755
--- a/java/app.go
+++ b/java/app.go
@@ -1245,6 +1245,9 @@
// be set for presigned modules.
Presigned *bool
+ // Name of the signing certificate lineage file.
+ Lineage *string
+
// Sign with the default system dev certificate. Must be used judiciously. Most imported apps
// need to either specify a specific certificate or be presigned.
Default_dev_cert *bool
@@ -1443,7 +1446,11 @@
}
a.certificate = certificates[0]
signed := android.PathForModuleOut(ctx, "signed", apkFilename)
- SignAppPackage(ctx, signed, dexOutput, certificates, nil, nil)
+ var lineageFile android.Path
+ if lineage := String(a.properties.Lineage); lineage != "" {
+ lineageFile = android.PathForModuleSrc(ctx, lineage)
+ }
+ SignAppPackage(ctx, signed, dexOutput, certificates, nil, lineageFile)
a.outputFile = signed
} else {
alignedApk := android.PathForModuleOut(ctx, "zip-aligned", apkFilename)