diff --git a/android/config.go b/android/config.go index 5a6d40f31..ae8195abb 100644 --- a/android/config.go +++ b/android/config.go @@ -1395,10 +1395,6 @@ func (c *config) PrebuiltHiddenApiDir(_ PathContext) string { return String(c.productVariables.PrebuiltHiddenApiDir) } -func (c *config) IsVndkDeprecated() bool { - return !Bool(c.productVariables.KeepVndk) -} - func (c *config) VendorApiLevel() string { return String(c.productVariables.VendorApiLevel) } diff --git a/android/variable.go b/android/variable.go index 9a9556314..6e7c9798f 100644 --- a/android/variable.go +++ b/android/variable.go @@ -487,8 +487,6 @@ type ProductVariables struct { ReleaseDefaultModuleBuildFromSource *bool `json:",omitempty"` - KeepVndk *bool `json:",omitempty"` - CheckVendorSeappViolations *bool `json:",omitempty"` BuildFlags map[string]string `json:",omitempty"` diff --git a/apex/apex.go b/apex/apex.go index 5f711cd7b..37cb1c266 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -953,7 +953,6 @@ func (a *apexBundle) ApexInfoMutator(mctx android.TopDownMutatorContext) { // the non-system APEXes because the VNDK libraries won't be included (and duped) in the // APEX, but shared across APEXes via the VNDK APEX. useVndk := a.SocSpecific() || a.DeviceSpecific() || (a.ProductSpecific() && mctx.Config().EnforceProductPartitionInterface()) - excludeVndkLibs := useVndk && a.useVndkAsStable(mctx) if proptools.Bool(a.properties.Use_vndk_as_stable) { if !useVndk { mctx.PropertyErrorf("use_vndk_as_stable", "not supported for system/system_ext APEXes") @@ -987,13 +986,8 @@ func (a *apexBundle) ApexInfoMutator(mctx android.TopDownMutatorContext) { if !android.IsDepInSameApex(mctx, parent, child) { return false } - if excludeVndkLibs { - if c, ok := child.(*cc.Module); ok && c.IsVndk() { - return false - } - } - if useVndk && mctx.Config().IsVndkDeprecated() && child.Name() == "libbinder" { + if useVndk && child.Name() == "libbinder" { mctx.ModuleErrorf("Module %s in the vendor APEX %s should not use libbinder. Use libbinder_ndk instead.", parent.Name(), a.Name()) } @@ -2190,11 +2184,6 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext, // tags used below are private (e.g. `cc.sharedDepTag`). if cc.IsSharedDepTag(depTag) || cc.IsRuntimeDepTag(depTag) { if ch, ok := child.(*cc.Module); ok { - if ch.UseVndk() && a.useVndkAsStable(ctx) && ch.IsVndk() { - vctx.requireNativeLibs = append(vctx.requireNativeLibs, ":vndk") - return false - } - af := apexFileForNativeLibrary(ctx, ch, vctx.handleSpecialLibs) af.transitiveDep = true @@ -3015,12 +3004,3 @@ func rBcpPackages() map[string][]string { func (a *apexBundle) IsTestApex() bool { return a.testApex } - -func (a *apexBundle) useVndkAsStable(ctx android.BaseModuleContext) bool { - // VNDK cannot be linked if it is deprecated - if ctx.Config().IsVndkDeprecated() { - return false - } - - return proptools.Bool(a.properties.Use_vndk_as_stable) -} diff --git a/cc/cc.go b/cc/cc.go index cb82f8610..5e15381eb 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -1623,14 +1623,6 @@ func (ctx *moduleContextImpl) useSdk() bool { func (ctx *moduleContextImpl) sdkVersion() string { if ctx.ctx.Device() { - config := ctx.ctx.Config() - if !config.IsVndkDeprecated() && ctx.useVndk() { - vndkVer := ctx.mod.VndkVersion() - if inList(vndkVer, config.PlatformVersionActiveCodenames()) { - return "current" - } - return vndkVer - } return String(ctx.mod.Properties.Sdk_version) } return "" @@ -1647,7 +1639,7 @@ func (ctx *moduleContextImpl) minSdkVersion() string { if ctx.ctx.Device() { config := ctx.ctx.Config() - if config.IsVndkDeprecated() && ctx.inVendor() { + if ctx.inVendor() { // If building for vendor with final API, then use the latest _stable_ API as "current". if config.VendorApiLevelFrozen() && (ver == "" || ver == "current") { ver = config.PlatformSdkVersion().String() diff --git a/cc/library.go b/cc/library.go index b9c1466b6..7a5683493 100644 --- a/cc/library.go +++ b/cc/library.go @@ -1761,12 +1761,6 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) { library.baseInstaller.subDir = "vndk" } } - - // do not install vndk libs - // vndk libs are packaged into VNDK APEX - if ctx.isVndk() && !ctx.IsVndkExt() && !ctx.Config().IsVndkDeprecated() && !ctx.inProduct() { - return - } } else if library.hasStubsVariants() && !ctx.Host() && ctx.directlyInAnyApex() { // Bionic libraries (e.g. libc.so) is installed to the bootstrap subdirectory. // The original path becomes a symlink to the corresponding file in the