From 56a8321c210bf73c7b9f177849ff4a6b6192d237 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 15 Sep 2020 18:30:11 -0700 Subject: Remove global state from apex modules A global variant was used to store the global mapping between modules and APEXes. Replace it with storing pointers to APEX contents inside each module so that they can query the contents of any APEXes they belong to. Bug: 146393795 Test: all Soong tests Test: single line change to build.ninja host install dependency ordering Test: no Android-${TARGET_PRODUCT}.mk, make_vars-${TARGET_PRODUCT}.mk or late-${TARGET_PRODUCT}.mk Change-Id: Id2d7b73ea27f8c3b41d30820bdd86b65c539bfa4 --- apex/apex_singleton.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apex/apex_singleton.go') diff --git a/apex/apex_singleton.go b/apex/apex_singleton.go index afb739cef..803e0c559 100644 --- a/apex/apex_singleton.go +++ b/apex/apex_singleton.go @@ -72,8 +72,11 @@ func (s *apexDepsInfoSingleton) GenerateBuildActions(ctx android.SingletonContex updatableFlatLists := android.Paths{} ctx.VisitAllModules(func(module android.Module) { if binaryInfo, ok := module.(android.ApexBundleDepsInfoIntf); ok { - if path := binaryInfo.FlatListPath(); path != nil && binaryInfo.Updatable() { - updatableFlatLists = append(updatableFlatLists, path) + apexInfo := ctx.ModuleProvider(module, android.ApexInfoProvider).(android.ApexInfo) + if path := binaryInfo.FlatListPath(); path != nil { + if binaryInfo.Updatable() || apexInfo.Updatable { + updatableFlatLists = append(updatableFlatLists, path) + } } } }) -- cgit v1.2.3-59-g8ed1b