aboutsummaryrefslogtreecommitdiffstats
path: root/apex/apex.go
diff options
context:
space:
mode:
authorArtur Satayev <satayev@google.com>2020-05-27 20:58:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-05-27 20:58:27 +0000
commit07d215215bb70c9d4640949967f74c7c27216ff2 (patch)
tree3a7f1591a7849b3518c86395d3599a7b8ea8f392 /apex/apex.go
parent753c739e2f63440bad7f51008fb8b217e841a54a (diff)
parent2b4b7bbe8262c41ff47d79cc9f2964bae03a8709 (diff)
downloadbuild_soong-07d215215bb70c9d4640949967f74c7c27216ff2.tar.gz
build_soong-07d215215bb70c9d4640949967f74c7c27216ff2.tar.bz2
build_soong-07d215215bb70c9d4640949967f74c7c27216ff2.zip
Merge changes I4ab7e1a3,Ib525b2f5,I2d4c54fb into rvc-dev
* changes: Generate combined deps-info for all updatable modules. Remove ApexBundleDepsInfo.MinSdkVersion() Add "updatable" property to ApexModule interface.
Diffstat (limited to 'apex/apex.go')
-rw-r--r--apex/apex.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/apex/apex.go b/apex/apex.go
index dbbfe78a..05ba5c4c 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -785,6 +785,7 @@ func apexDepsMutator(mctx android.TopDownMutatorContext) {
apexBundles = []android.ApexInfo{{
ApexName: mctx.ModuleName(),
MinSdkVersion: a.minSdkVersion(mctx),
+ Updatable: a.Updatable(),
}}
directDep = true
} else if am, ok := mctx.Module().(android.ApexModule); ok {
@@ -1828,6 +1829,12 @@ func PrettyPrintTag(tag blueprint.DependencyTag) string {
return tagString
}
+func (a *apexBundle) Updatable() bool {
+ return proptools.Bool(a.properties.Updatable)
+}
+
+var _ android.ApexBundleDepsInfoIntf = (*apexBundle)(nil)
+
// Ensures that the dependencies are marked as available for this APEX
func (a *apexBundle) checkApexAvailability(ctx android.ModuleContext) {
// Let's be practical. Availability for test, host, and the VNDK apex isn't important
@@ -1876,7 +1883,7 @@ func (a *apexBundle) checkApexAvailability(ctx android.ModuleContext) {
}
func (a *apexBundle) checkUpdatable(ctx android.ModuleContext) {
- if proptools.Bool(a.properties.Updatable) {
+ if a.Updatable() {
if String(a.properties.Min_sdk_version) == "" {
ctx.PropertyErrorf("updatable", "updatable APEXes should set min_sdk_version as well")
}
@@ -2203,7 +2210,7 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
// We don't need the optimization for updatable APEXes, as it might give false signal
// to the system health when the APEXes are still bundled (b/149805758)
- if proptools.Bool(a.properties.Updatable) && a.properties.ApexType == imageApex {
+ if a.Updatable() && a.properties.ApexType == imageApex {
a.linkToSystemLib = false
}