summaryrefslogtreecommitdiff
path: root/java/hiddenapi_singleton.go
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2020-09-09 20:21:02 -0700
committer Xin Li <delphij@google.com> 2020-09-09 20:21:02 -0700
commit429c23c1fa71b4f542fadece635801c6edb1aa50 (patch)
tree09d185449732c712f40c2e204a093d044dc8570f /java/hiddenapi_singleton.go
parent4f35976c87c24f4584ff8f86298c63c75f063be4 (diff)
parentfbd7372401e29a5f9b5e3f0a9f959455f4e77168 (diff)
Merge Android R
Bug: 168057903 Merged-In: I9d5d0da0f409bd6b131f7e0f6363be061d3045c1 Change-Id: Ie7feaf6a3d0787c750de17540969b876a4306b0a
Diffstat (limited to 'java/hiddenapi_singleton.go')
-rw-r--r--java/hiddenapi_singleton.go11
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)
}
}