Revert "Enforce min_sdk_version of apex(use_vendor:true)"

This reverts commit 380fc3615c.

Reason for revert: breaking one of internal targets

Change-Id: Ica96c44078e5a7f674410828af3ba851317775dd

Exempt-From-Owner-Approval: revert to fix build failure
This commit is contained in:
Jooyung Han
2020-03-21 13:58:19 +00:00
parent 380fc3615c
commit bacf34d986
6 changed files with 63 additions and 189 deletions

View File

@@ -1486,19 +1486,6 @@ func checkVersions(ctx android.BaseModuleContext, versions []string) {
}
}
func createVersionVariations(mctx android.BottomUpMutatorContext, versions []string) {
// "" is for the non-stubs variant
versions = append([]string{""}, versions...)
modules := mctx.CreateVariations(versions...)
for i, m := range modules {
if versions[i] != "" {
m.(LinkableInterface).SetBuildStubs()
m.(LinkableInterface).SetStubsVersions(versions[i])
}
}
}
// Version mutator splits a module into the mandatory non-stubs variant
// (which is unnamed) and zero or more stubs variants.
func VersionMutator(mctx android.BottomUpMutatorContext) {
@@ -1510,30 +1497,24 @@ func VersionMutator(mctx android.BottomUpMutatorContext) {
return
}
// save the list of versions for later use
stubsVersionsLock.Lock()
defer stubsVersionsLock.Unlock()
// save the list of versions for later use
stubsVersionsFor(mctx.Config())[mctx.ModuleName()] = versions
createVersionVariations(mctx, versions)
return
// "" is for the non-stubs variant
versions = append([]string{""}, versions...)
modules := mctx.CreateVariations(versions...)
for i, m := range modules {
if versions[i] != "" {
m.(LinkableInterface).SetBuildStubs()
m.(LinkableInterface).SetStubsVersions(versions[i])
}
}
} else {
mctx.CreateVariations("")
}
if c, ok := library.(*Module); ok && c.IsStubs() {
stubsVersionsLock.Lock()
defer stubsVersionsLock.Unlock()
// For LLNDK llndk_library, we borrow vstubs.ersions from its implementation library.
// Since llndk_library has dependency to its implementation library,
// we can safely access stubsVersionsFor() with its baseModuleName.
versions := stubsVersionsFor(mctx.Config())[c.BaseModuleName()]
// save the list of versions for later use
stubsVersionsFor(mctx.Config())[mctx.ModuleName()] = versions
createVersionVariations(mctx, versions)
return
}
mctx.CreateVariations("")
return
}
if genrule, ok := mctx.Module().(*genrule.Module); ok {