diff options
author | 2020-06-08 18:13:03 +0000 | |
---|---|---|
committer | 2020-06-08 18:13:03 +0000 | |
commit | a4cf51ff72e51672af96ff627eba04a5c48b8357 (patch) | |
tree | 4e9095a7d31b7550b1187043d157dbf960e03942 /java/hiddenapi_singleton.go | |
parent | 2350cc75993500f1307d3d608492974170b9ab5f (diff) | |
parent | 50cea1a76e7d64959cb5cddfceb8e7542662bf0a (diff) |
Merge "Include car project in grey list removed apis" into rvc-dev am: 50cea1a76e
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11746426
Change-Id: Ie39738a277df3af9bdae6c59ad39b4bf07b16287
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 2f35798b5..87dc01ed1 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 greylists. 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) } } |