Use default app certificate from Make am: 61ae0b7eed am: 9d58bf0610

am: 04585ff7d8

Change-Id: I1918429630415d83b72ab04f630fccc9fba766d7
This commit is contained in:
Colin Cross
2017-12-02 04:54:11 +00:00
committed by android-build-merger
2 changed files with 14 additions and 2 deletions

View File

@@ -491,12 +491,22 @@ func (c *config) ProductAAPTPrebuiltDPI() []string {
} }
func (c *config) DefaultAppCertificateDir(ctx PathContext) SourcePath { func (c *config) DefaultAppCertificateDir(ctx PathContext) SourcePath {
defaultCert := String(c.ProductVariables.DefaultAppCertificate)
if defaultCert != "" {
return PathForSource(ctx, filepath.Dir(defaultCert))
} else {
return PathForSource(ctx, "build/target/product/security") return PathForSource(ctx, "build/target/product/security")
} }
}
func (c *config) DefaultAppCertificate(ctx PathContext) SourcePath { func (c *config) DefaultAppCertificate(ctx PathContext) SourcePath {
defaultCert := String(c.ProductVariables.DefaultAppCertificate)
if defaultCert != "" {
return PathForSource(ctx, defaultCert)
} else {
return c.DefaultAppCertificateDir(ctx).Join(ctx, "testkey") return c.DefaultAppCertificateDir(ctx).Join(ctx, "testkey")
} }
}
func (c *config) AllowMissingDependencies() bool { func (c *config) AllowMissingDependencies() bool {
return Bool(c.ProductVariables.Allow_missing_dependencies) return Bool(c.ProductVariables.Allow_missing_dependencies)

View File

@@ -146,6 +146,8 @@ type productVariables struct {
AAPTPreferredConfig *string `json:",omitempty"` AAPTPreferredConfig *string `json:",omitempty"`
AAPTPrebuiltDPI *[]string `json:",omitempty"` AAPTPrebuiltDPI *[]string `json:",omitempty"`
DefaultAppCertificate *string `json:",omitempty"`
AppsDefaultVersionName *string `json:",omitempty"` AppsDefaultVersionName *string `json:",omitempty"`
Allow_missing_dependencies *bool `json:",omitempty"` Allow_missing_dependencies *bool `json:",omitempty"`