Make 'Compressible' an overridable property
This is needed to allow the Android Go versions of modules
(com.google.android.go.*) to select a different compression toggle than
their non-Go (com.google.android.*) conterparts. go/go-updatability
Bug: 203024418
Test: Preloaded go variants on wembley, booted Android.
Change-Id: Ic96aff5fafb65fbd08e8a69d47c994532e27819e
Merged-In: Ic96aff5fafb65fbd08e8a69d47c994532e27819e
(cherry picked from commit 2c4a96375a
)
This commit is contained in:
committed by
Wei Li
parent
f49ca9e40d
commit
a07099d858
14
apex/apex.go
14
apex/apex.go
@@ -151,12 +151,6 @@ type apexBundleProperties struct {
|
|||||||
// Default: true.
|
// Default: true.
|
||||||
Installable *bool
|
Installable *bool
|
||||||
|
|
||||||
// Whether this APEX can be compressed or not. Setting this property to false means this
|
|
||||||
// APEX will never be compressed. When set to true, APEX will be compressed if other
|
|
||||||
// conditions, e.g, target device needs to support APEX compression, are also fulfilled.
|
|
||||||
// Default: true.
|
|
||||||
Compressible *bool
|
|
||||||
|
|
||||||
// If set true, VNDK libs are considered as stable libs and are not included in this APEX.
|
// If set true, VNDK libs are considered as stable libs and are not included in this APEX.
|
||||||
// Should be only used in non-system apexes (e.g. vendor: true). Default is false.
|
// Should be only used in non-system apexes (e.g. vendor: true). Default is false.
|
||||||
Use_vndk_as_stable *bool
|
Use_vndk_as_stable *bool
|
||||||
@@ -347,6 +341,12 @@ type overridableProperties struct {
|
|||||||
// certificate and the private key are provided from the android_app_certificate module
|
// certificate and the private key are provided from the android_app_certificate module
|
||||||
// named "module".
|
// named "module".
|
||||||
Certificate *string
|
Certificate *string
|
||||||
|
|
||||||
|
// Whether this APEX can be compressed or not. Setting this property to false means this
|
||||||
|
// APEX will never be compressed. When set to true, APEX will be compressed if other
|
||||||
|
// conditions, e.g., target device needs to support APEX compression, are also fulfilled.
|
||||||
|
// Default: false.
|
||||||
|
Compressible *bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type apexBundle struct {
|
type apexBundle struct {
|
||||||
@@ -1310,7 +1310,7 @@ func (a *apexBundle) EnableCoverageIfNeeded() {}
|
|||||||
|
|
||||||
var _ android.ApexBundleDepsInfoIntf = (*apexBundle)(nil)
|
var _ android.ApexBundleDepsInfoIntf = (*apexBundle)(nil)
|
||||||
|
|
||||||
// Implements android.ApexBudleDepsInfoIntf
|
// Implements android.ApexBundleDepsInfoIntf
|
||||||
func (a *apexBundle) Updatable() bool {
|
func (a *apexBundle) Updatable() bool {
|
||||||
return proptools.BoolDefault(a.properties.Updatable, true)
|
return proptools.BoolDefault(a.properties.Updatable, true)
|
||||||
}
|
}
|
||||||
|
@@ -567,8 +567,8 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
|
|||||||
outHostBinDir := ctx.Config().HostToolPath(ctx, "").String()
|
outHostBinDir := ctx.Config().HostToolPath(ctx, "").String()
|
||||||
prebuiltSdkToolsBinDir := filepath.Join("prebuilts", "sdk", "tools", runtime.GOOS, "bin")
|
prebuiltSdkToolsBinDir := filepath.Join("prebuilts", "sdk", "tools", runtime.GOOS, "bin")
|
||||||
|
|
||||||
// Figure out if need to compress apex.
|
// Figure out if we need to compress the apex.
|
||||||
compressionEnabled := ctx.Config().CompressedApex() && proptools.BoolDefault(a.properties.Compressible, false) && !a.testApex && !ctx.Config().UnbundledBuildApps()
|
compressionEnabled := ctx.Config().CompressedApex() && proptools.BoolDefault(a.overridableProperties.Compressible, false) && !a.testApex && !ctx.Config().UnbundledBuildApps()
|
||||||
if apexType == imageApex {
|
if apexType == imageApex {
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Reference in New Issue
Block a user