From b0a012cfec69d84a26144b72a153292364476218 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Thu, 14 Nov 2019 17:17:03 +0900 Subject: [PATCH] Override apexes with LOCAL_OVERRIDES_MODULES APEXes are ETC type, which should be overridden via LOCAL_OVERRIDES_MODULES. This change fixes a bug that LOCAL_OVERRIDES_PACKAGES was used for APEXes. Bug: 140792287 Test: m Test: add com.google.android.tzdata to PRODUCT_PACKAGES and build. /system/apex/com.google.android.tzdata.apex exists, but /system/apex/com.android.tzdata.apex doesn't. Change-Id: Id65743b36e0b706d6ffd8cae0597cc0a42a83fb7 --- apex/apex.go | 2 +- apex/apex_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apex/apex.go b/apex/apex.go index f03a8f974..4a14364a4 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -2118,7 +2118,7 @@ func (p *Prebuilt) AndroidMkEntries() android.AndroidMkEntries { entries.SetString("LOCAL_MODULE_PATH", p.installDir.ToMakePath().String()) entries.SetString("LOCAL_MODULE_STEM", p.installFilename) entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", !p.installable()) - entries.AddStrings("LOCAL_OVERRIDES_PACKAGES", p.properties.Overrides...) + entries.AddStrings("LOCAL_OVERRIDES_MODULES", p.properties.Overrides...) }, }, } diff --git a/apex/apex_test.go b/apex/apex_test.go index 614164deb..1306aefc8 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -2251,9 +2251,9 @@ func TestPrebuiltOverrides(t *testing.T) { p := ctx.ModuleForTests("myapex.prebuilt", "android_common").Module().(*Prebuilt) expected := []string{"myapex"} - actual := android.AndroidMkEntriesForTest(t, config, "", p).EntryMap["LOCAL_OVERRIDES_PACKAGES"] + actual := android.AndroidMkEntriesForTest(t, config, "", p).EntryMap["LOCAL_OVERRIDES_MODULES"] if !reflect.DeepEqual(actual, expected) { - t.Errorf("Incorrect LOCAL_OVERRIDES_PACKAGES value '%s', expected '%s'", actual, expected) + t.Errorf("Incorrect LOCAL_OVERRIDES_MODULES value '%s', expected '%s'", actual, expected) } }