diff options
author | Xin Li <delphij@google.com> | 2020-08-29 01:17:45 -0700 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2020-08-29 01:17:45 -0700 |
commit | 65cb5c69ea5c6134b8c6bad09242f7d7ca52d9e8 (patch) | |
tree | f7c3529e7aff1c8cb4d8fa55ec6f6bdeae5821d3 /java/hiddenapi_singleton.go | |
parent | bca691b377e683becf4098683a91091cfc10c9f5 (diff) | |
parent | d786b6bffece20ecff5c387a41ba5d82ded29759 (diff) |
Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Ifca7b65f4e27bf14cdc30f72f790b0de90130bae
Change-Id: I3a39be5f0b8736de4822c6a14072c78d4e4ad89d
Diffstat (limited to 'java/hiddenapi_singleton.go')
-rw-r--r-- | java/hiddenapi_singleton.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go index ea3fbdade..29b6bcd7d 100644 --- a/java/hiddenapi_singleton.go +++ b/java/hiddenapi_singleton.go @@ -207,6 +207,15 @@ func stubFlagsRule(ctx android.SingletonContext) { rule.Build(pctx, ctx, "hiddenAPIStubFlagsFile", "hiddenapi stub flags") } +func moduleForGreyListRemovedApis(ctx android.SingletonContext, module android.Module) bool { + switch ctx.ModuleName(module) { + case "api-stubs-docs", "system-api-stubs-docs", "android.car-stubs-docs", "android.car-system-stubs-docs": + return true + default: + return false + } +} + // flagsRule creates a rule to build hiddenapi-flags.csv out of flags.csv files generated for boot image modules and // the unsupported API. func flagsRule(ctx android.SingletonContext) android.Path { @@ -222,7 +231,7 @@ func flagsRule(ctx android.SingletonContext) android.Path { // Track @removed public and system APIs via corresponding droidstubs targets. // These APIs are not present in the stubs, however, we have to keep allowing access // to them at runtime. - if m := ctx.ModuleName(module); m == "api-stubs-docs" || m == "system-api-stubs-docs" { + if moduleForGreyListRemovedApis(ctx, module) { greylistRemovedApis = append(greylistRemovedApis, ds.removedDexApiFile) } } |