Merge "Merge SingletonProviderContext with OtherModuleProviderContext" into main am: 246b43049c am: 73282e8129

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3216676

Change-Id: Ic5fa82e4179f922e35479e527a392db141a973c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Yu Liu
2024-08-13 16:38:05 +00:00
committed by Automerger Merge Worker
38 changed files with 74 additions and 89 deletions

View File

@@ -633,7 +633,7 @@ func CheckPlatformBootclasspathModules(t *testing.T, result *android.TestResult,
func CheckClasspathFragmentProtoContentInfoProvider(t *testing.T, result *android.TestResult, generated bool, contents, outputFilename, installDir string) {
t.Helper()
p := result.Module("platform-bootclasspath", "android_common").(*platformBootclasspathModule)
info, _ := android.SingletonModuleProvider(result, p, ClasspathFragmentProtoContentInfoProvider)
info, _ := android.OtherModuleProvider(result, p, ClasspathFragmentProtoContentInfoProvider)
android.AssertBoolEquals(t, "classpath proto generated", generated, info.ClasspathFragmentProtoGenerated)
android.AssertStringEquals(t, "classpath proto contents", contents, info.ClasspathFragmentProtoContents.String())
@@ -653,7 +653,7 @@ func ApexNamePairsFromModules(ctx *android.TestContext, modules []android.Module
func apexNamePairFromModule(ctx *android.TestContext, module android.Module) string {
name := module.Name()
var apex string
apexInfo, _ := android.SingletonModuleProvider(ctx, module, android.ApexInfoProvider)
apexInfo, _ := android.OtherModuleProvider(ctx, module, android.ApexInfoProvider)
if apexInfo.IsForPlatform() {
apex = "platform"
} else {