From 93a90db516d2d7ac38de3d6e5ae844cc0fbe528a Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Tue, 28 Jul 2020 17:24:44 -0700 Subject: [PATCH] Prevent GKI APEXes to write to $OUT/apex. Multiple GKI APEXes may write to the same path under $OUT/apex. Prevent it. Fixes: 162366062 Test: build GKI APEX Change-Id: I1b19870b10d6da2a85c3f7b9d93408d3a0fe90bc --- apex/androidmk.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apex/androidmk.go b/apex/androidmk.go index 82a902b50..082aa606b 100644 --- a/apex/androidmk.go +++ b/apex/androidmk.go @@ -50,6 +50,11 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, apexBundleName, apexName, mo return moduleNames } + // b/162366062. Prevent GKI APEXes to emit make rules to avoid conflicts. + if strings.HasPrefix(apexName, "com.android.gki.") && apexType != flattenedApex { + return moduleNames + } + // b/140136207. When there are overriding APEXes for a VNDK APEX, the symbols file for the overridden // APEX and the overriding APEX will have the same installation paths at /apex/com.android.vndk.v // as their apexName will be the same. To avoid the path conflicts, skip installing the symbol files