aboutsummaryrefslogtreecommitdiffstats
path: root/apex/apex.go
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-07-10 03:53:08 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-07-10 03:53:08 +0000
commit9f4175c5837a93210850a5fda47f4f99c74c9351 (patch)
treebdd2b10705305df29b875e00f945975baedebb96 /apex/apex.go
parent4d2e0593c0842249f08929ff6a27e6ead2e17798 (diff)
parent0a573d798ffa8941b8028e76d0f6a6951863a6e4 (diff)
downloadbuild_soong-9f4175c5837a93210850a5fda47f4f99c74c9351.tar.gz
build_soong-9f4175c5837a93210850a5fda47f4f99c74c9351.tar.bz2
build_soong-9f4175c5837a93210850a5fda47f4f99c74c9351.zip
Snap for 5716396 from 0a573d798ffa8941b8028e76d0f6a6951863a6e4 to qt-release
Change-Id: I4db89b8240b41dcdd540d1ee807430cd6469f56a
Diffstat (limited to 'apex/apex.go')
-rw-r--r--apex/apex.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/apex/apex.go b/apex/apex.go
index a546b904..3726684c 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1297,7 +1297,8 @@ type Prebuilt struct {
type PrebuiltProperties struct {
// the path to the prebuilt .apex file to import.
- Source string `blueprint:"mutated"`
+ Source string `blueprint:"mutated"`
+ ForceDisable bool `blueprint:"mutated"`
Src *string
Arch struct {
@@ -1326,6 +1327,14 @@ func (p *Prebuilt) installable() bool {
}
func (p *Prebuilt) DepsMutator(ctx android.BottomUpMutatorContext) {
+ if ctx.Config().FlattenApex() && !ctx.Config().UnbundledBuild() && p.prebuilt.SourceExists() {
+ // If the device is configured to use flattened APEX, don't set
+ // p.properties.Source so that the prebuilt module (which is
+ // a non-flattened APEX) is not used.
+ p.properties.ForceDisable = true
+ return
+ }
+
// This is called before prebuilt_select and prebuilt_postdeps mutators
// The mutators requires that src to be set correctly for each arch so that
// arch variants are disabled when src is not provided for the arch.
@@ -1362,6 +1371,10 @@ func (p *Prebuilt) InstallFilename() string {
}
func (p *Prebuilt) GenerateAndroidBuildActions(ctx android.ModuleContext) {
+ if p.properties.ForceDisable {
+ return
+ }
+
// TODO(jungjw): Check the key validity.
p.inputApex = p.Prebuilt().SingleSourcePath(ctx)
p.installDir = android.PathForModuleInstall(ctx, "apex")