Revert^2 "Add flagged api hide conditional to droidstubs"
This reverts commit 1180919ddab993c4b0d1da81cd8fa242afc7303a.
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
diff --git a/java/droidstubs.go b/java/droidstubs.go
index 67a55bd..b059c0a 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -540,6 +540,10 @@
// 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
}