From 5c78fe90da8e0854b6a6c9ff3be7084f4afda3c7 Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Wed, 26 Feb 2025 14:25:56 +0000 Subject: Handle prebuilt module types in allInstalledModules Owner in PackagingSpec uses ModuleName, while allInstalledModules uses mod.Name(). For prebuilt modules without any sources (e.g. com.android.apex.cts.shim.v1_prebuilt), the former does not contain prebuilt_, but the latter does contain it. This was causing such modules to be skipped in the results of allInstalledModules. This CL fixes it by using ctx.OtherModuleName Test: verified that com.android.apex.cts.shim.v1_prebuilt is returned by allInstalledModules of aosp_cf_x86_64_phone Change-Id: Id87e8cf782a94c48245385c1837960eee803c619 --- filesystem/android_device.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filesystem/android_device.go') diff --git a/filesystem/android_device.go b/filesystem/android_device.go index 178c716d4..31678aa3b 100644 --- a/filesystem/android_device.go +++ b/filesystem/android_device.go @@ -279,7 +279,7 @@ func (a *androidDevice) allInstalledModules(ctx android.ModuleContext) []android ret := []android.Module{} ctx.WalkDepsProxy(func(mod, _ android.ModuleProxy) bool { - if variations, ok := allOwners[mod.Name()]; ok && android.InList(ctx.OtherModuleSubDir(mod), variations) { + if variations, ok := allOwners[ctx.OtherModuleName(mod)]; ok && android.InList(ctx.OtherModuleSubDir(mod), variations) { ret = append(ret, mod) } return true -- cgit v1.2.3-59-g8ed1b