diff --git a/android/config.go b/android/config.go index 09582909e..a7a96b7df 100644 --- a/android/config.go +++ b/android/config.go @@ -1451,7 +1451,7 @@ func (c *deviceConfig) ExtraVndkVersions() []string { } func (c *deviceConfig) VndkUseCoreVariant() bool { - return Bool(c.config.productVariables.VndkUseCoreVariant) + return Bool(c.config.productVariables.VndkUseCoreVariant) && Bool(c.config.productVariables.KeepVndk) } func (c *deviceConfig) SystemSdkVersions() []string { diff --git a/cc/cc_test.go b/cc/cc_test.go index f7eb8d270..794c5ee51 100644 --- a/cc/cc_test.go +++ b/cc/cc_test.go @@ -677,6 +677,7 @@ func TestVndkUsingCoreVariant(t *testing.T) { config.TestProductVariables.DeviceVndkVersion = StringPtr("current") config.TestProductVariables.Platform_vndk_version = StringPtr("29") config.TestProductVariables.VndkUseCoreVariant = BoolPtr(true) + config.TestProductVariables.KeepVndk = BoolPtr(true) setVndkMustUseVendorVariantListForTest(config, []string{"libvndk"})