Fix TestAarImportProducesJniPackages/aar-no-jni

TestAarImportProducesJniPackages was attempting to assert that an
aar_import module always had a JniPackageProvider, but was instead
asserting that the return type was always a JniPackageInfo.  Since
ModuleProvider returned the zero value of JniPackageInfo even when
there was no provider that was always true.

Fix aar_import to always set JniPackageProvider.

Test: TestAarImportProducesJniPackages
Change-Id: Idaf106e14373490d4eb807892e174aaaf094bbcf
This commit is contained in:
Colin Cross 2023-12-14 14:50:05 -08:00
parent 0d6bb34801
commit e8eeec913f

View file

@ -1256,11 +1256,11 @@ func (a *AARImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
}, },
}) })
} }
ctx.SetProvider(JniPackageProvider, JniPackageInfo{
JniPackages: a.jniPackages,
})
} }
ctx.SetProvider(JniPackageProvider, JniPackageInfo{
JniPackages: a.jniPackages,
})
} }
func (a *AARImport) HeaderJars() android.Paths { func (a *AARImport) HeaderJars() android.Paths {