Revert^2 "Add flagged api hide conditional to droidstubs"

This reverts commit 1180919dda.

Test: go test ./java && m TARGET_PRODUCT=sdk TESTING_TARGET_RELEASE_NEXT=true nothing and inspect ninja command for generating stubs and verify the flag is included && m TARGET_PRODUCT=sdk TARGET_RELEASE=trunk_food nothing and inspect ninja command for generating stubs and verify the flag is not included
Bug: 299570421
Change-Id: I4967376c0236bad729398af80fa59b48dbab5f21
This commit is contained in:
Jihoon Kang
2023-09-20 00:54:47 +00:00
parent f3aa3225b6
commit c831389625
3 changed files with 42 additions and 0 deletions

View File

@@ -540,6 +540,10 @@ func metalavaCmd(ctx android.ModuleContext, rule *android.RuleBuilder, javaVersi
// See b/285312164 for more information.
cmd.FlagWithArg("--format-defaults ", "overloaded-method-order=source")
if ctx.DeviceConfig().HideFlaggedApis() {
cmd.FlagWithArg("--hide-annotation ", "android.annotation.FlaggedApi")
}
return cmd
}