From ac5e79f9009400d1020bf45f30c3864bde163b76 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Thu, 18 Jun 2020 19:34:42 +0900 Subject: [PATCH] Don't remove entries for overriddable modules Previously, when there is apex_set that is overriding another module, the entry for the overridden module is removed from apexkeys.txt. However, this is wrong because the existence of the apex_set module doesn't necessary mean that the module is insatalled instead of the overridden module. That is determined by PRODUCT_PACKAGES which Soong has no knowledge of. Therefore, we don't delete the entry for the overridden (actually possibly overridable) modules in the file. Bug: 158729168 Test: m Change-Id: I85d0c756f862323bae556bf657d66ec50038985f --- apex/apex_test.go | 2 +- apex/key.go | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/apex/apex_test.go b/apex/apex_test.go index 9f870b1db..e2cc104f3 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -4988,7 +4988,7 @@ func TestApexKeysTxt(t *testing.T) { apexKeysText := ctx.SingletonForTests("apex_keys_text") content := apexKeysText.MaybeDescription("apexkeys.txt").BuildParams.Args["content"] ensureContains(t, content, `name="myapex_set.apex" public_key="PRESIGNED" private_key="PRESIGNED" container_certificate="PRESIGNED" container_private_key="PRESIGNED" partition="system"`) - ensureNotContains(t, content, "myapex.apex") + ensureContains(t, content, `name="myapex.apex" public_key="PRESIGNED" private_key="PRESIGNED" container_certificate="PRESIGNED" container_private_key="PRESIGNED" partition="system"`) } func TestMain(m *testing.M) { diff --git a/apex/key.go b/apex/key.go index a68f6e1a1..d2d5786b3 100644 --- a/apex/key.go +++ b/apex/key.go @@ -160,12 +160,6 @@ func (s *apexKeysText) GenerateBuildActions(ctx android.SingletonContext) { presigned: true, partition: m.PartitionTag(ctx.DeviceConfig()), } - - for _, om := range m.Overrides() { - if _, ok := apexKeyMap[om]; ok { - delete(apexKeyMap, om) - } - } apexKeyMap[m.BaseModuleName()] = entry } })