diff --git a/android/config.go b/android/config.go index 4de180c9e..6dc8e1603 100644 --- a/android/config.go +++ b/android/config.go @@ -222,7 +222,8 @@ func (c Config) ReleaseNdkAbiMonitored() bool { } func (c Config) ReleaseHiddenApiExportableStubs() bool { - return c.config.productVariables.GetBuildFlagBool("RELEASE_HIDDEN_API_EXPORTABLE_STUBS") + return c.config.productVariables.GetBuildFlagBool("RELEASE_HIDDEN_API_EXPORTABLE_STUBS") || + Bool(c.config.productVariables.HiddenapiExportableStubs) } // A DeviceConfig object represents the configuration for a particular device diff --git a/android/variable.go b/android/variable.go index 252002037..32365067a 100644 --- a/android/variable.go +++ b/android/variable.go @@ -496,6 +496,8 @@ type ProductVariables struct { BuildFromSourceStub *bool `json:",omitempty"` BuildIgnoreApexContributionContents []string `json:",omitempty"` + + HiddenapiExportableStubs *bool `json:",omitempty"` } type PartitionQualifiedVariablesType struct {