Import AAPT-related product variables from make
Test: m checkbuild Change-Id: I22113c17d240ff26652cea7df801a183343faebd
This commit is contained in:
@@ -468,16 +468,20 @@ func (c *config) BuildNumber() string {
|
||||
return "000000"
|
||||
}
|
||||
|
||||
func (c *config) ProductAaptConfig() []string {
|
||||
return []string{"normal", "large", "xlarge", "hdpi", "xhdpi", "xxhdpi"}
|
||||
func (c *config) ProductAAPTConfig() []string {
|
||||
return *c.ProductVariables.AAPTConfig
|
||||
}
|
||||
|
||||
func (c *config) ProductAaptPreferredConfig() string {
|
||||
return "xhdpi"
|
||||
func (c *config) ProductAAPTPreferredConfig() string {
|
||||
return *c.ProductVariables.AAPTPreferredConfig
|
||||
}
|
||||
|
||||
func (c *config) ProductAaptCharacteristics() string {
|
||||
return "nosdcard"
|
||||
func (c *config) ProductAAPTCharacteristics() string {
|
||||
return *c.ProductVariables.AAPTCharacteristics
|
||||
}
|
||||
|
||||
func (c *config) ProductAAPTPrebuiltDPI() []string {
|
||||
return *c.ProductVariables.AAPTPrebuiltDPI
|
||||
}
|
||||
|
||||
func (c *config) DefaultAppCertificateDir(ctx PathContext) SourcePath {
|
||||
|
@@ -132,6 +132,17 @@ type productVariables struct {
|
||||
CrossHostArch *string `json:",omitempty"`
|
||||
CrossHostSecondaryArch *string `json:",omitempty"`
|
||||
|
||||
ResourceOverlays *[]string `json:",omitempty"`
|
||||
EnforceRROTargets *[]string `json:",omitempty"`
|
||||
EnforceRROExcludedOverlays *[]string `json:",omitempty"`
|
||||
|
||||
AAPTCharacteristics *string `json:",omitempty"`
|
||||
AAPTConfig *[]string `json:",omitempty"`
|
||||
AAPTPreferredConfig *string `json:",omitempty"`
|
||||
AAPTPrebuiltDPI *[]string `json:",omitempty"`
|
||||
|
||||
AppsDefaultVersionName *string `json:",omitempty"`
|
||||
|
||||
Allow_missing_dependencies *bool `json:",omitempty"`
|
||||
Unbundled_build *bool `json:",omitempty"`
|
||||
Brillo *bool `json:",omitempty"`
|
||||
@@ -203,8 +214,14 @@ func (v *productVariables) SetDefaultConfig() {
|
||||
DeviceSecondaryArchVariant: stringPtr("armv7-a-neon"),
|
||||
DeviceSecondaryCpuVariant: stringPtr("denver"),
|
||||
DeviceSecondaryAbi: &[]string{"armeabi-v7a"},
|
||||
Malloc_not_svelte: boolPtr(false),
|
||||
Safestack: boolPtr(false),
|
||||
|
||||
AAPTConfig: &[]string{"normal", "large", "xlarge", "hdpi", "xhdpi", "xxhdpi"},
|
||||
AAPTPreferredConfig: stringPtr("xhdpi"),
|
||||
AAPTCharacteristics: stringPtr("nosdcard"),
|
||||
AAPTPrebuiltDPI: &[]string{"xhdpi", "xxhdpi"},
|
||||
|
||||
Malloc_not_svelte: boolPtr(false),
|
||||
Safestack: boolPtr(false),
|
||||
}
|
||||
|
||||
if runtime.GOOS == "linux" {
|
||||
|
@@ -102,7 +102,7 @@ func (a *AndroidApp) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
|
||||
if !hasProduct {
|
||||
aaptPackageFlags = append(aaptPackageFlags,
|
||||
"--product "+ctx.AConfig().ProductAaptCharacteristics())
|
||||
"--product "+ctx.AConfig().ProductAAPTCharacteristics())
|
||||
}
|
||||
a.exportPackage = CreateExportPackage(ctx, aaptPackageFlags, aaptDeps)
|
||||
ctx.CheckbuildFile(a.exportPackage)
|
||||
@@ -132,7 +132,7 @@ func (a *AndroidApp) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
|
||||
if !hasProduct {
|
||||
aaptPackageFlags = append(aaptPackageFlags,
|
||||
"--product "+ctx.AConfig().ProductAaptCharacteristics())
|
||||
"--product "+ctx.AConfig().ProductAAPTCharacteristics())
|
||||
}
|
||||
|
||||
certificate := a.appProperties.Certificate
|
||||
|
Reference in New Issue
Block a user