Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)

Bug: 166295507
Merged-In: Ifca7b65f4e27bf14cdc30f72f790b0de90130bae
Change-Id: I3a39be5f0b8736de4822c6a14072c78d4e4ad89d
This commit is contained in:
Xin Li
2020-08-29 01:17:45 -07:00
20 changed files with 677 additions and 148 deletions

View File

@@ -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)
}
}