Remove special case code for obsolete files

incompatibilities.txt doesn't exist anymore, only
"<module>-incompatibilities.txt". Clean up the associated logic that
mapped incompatibilities.txt to android-incompatibilities.txt.

Bug: 178171189
Test: m
Change-Id: I61eeb5dcc82770fa2af356bad11b7205551d6d83
This commit is contained in:
Anton Hansson 2021-04-13 19:09:48 +01:00
parent 6050c3c31e
commit fa5e6b50aa
1 changed files with 2 additions and 8 deletions

View File

@ -253,14 +253,8 @@ func prebuiltApiFiles(mctx android.LoadHookContext, p *prebuiltApis) {
files := getPrebuiltFilesInSubdir(mctx, nextApiDir, "api/*incompatibilities.txt") files := getPrebuiltFilesInSubdir(mctx, nextApiDir, "api/*incompatibilities.txt")
for _, f := range files { for _, f := range files {
localPath := strings.TrimPrefix(f, mydir) localPath := strings.TrimPrefix(f, mydir)
module, _, scope := parseApiFilePath(mctx, localPath) filename, _, scope := parseApiFilePath(mctx, localPath)
referencedModule := strings.TrimSuffix(filename, "-incompatibilities")
// Figure out which module is referenced by this file. Special case for "android".
referencedModule := strings.TrimSuffix(module, "incompatibilities")
referencedModule = strings.TrimSuffix(referencedModule, "-")
if referencedModule == "" {
referencedModule = "android"
}
createApiModule(mctx, apiModuleName(referencedModule+"-incompatibilities", scope, "latest"), localPath) createApiModule(mctx, apiModuleName(referencedModule+"-incompatibilities", scope, "latest"), localPath)