diff --git a/android/config.go b/android/config.go index 769d257f6..b3ff86b49 100644 --- a/android/config.go +++ b/android/config.go @@ -2084,11 +2084,3 @@ func (c *deviceConfig) CheckVendorSeappViolations() bool { func (c *deviceConfig) NextReleaseHideFlaggedApi() bool { return Bool(c.config.productVariables.NextReleaseHideFlaggedApi) } - -func (c *deviceConfig) ReleaseExposeFlaggedApi() bool { - return Bool(c.config.productVariables.ReleaseExposeFlaggedApi) -} - -func (c *deviceConfig) HideFlaggedApis() bool { - return c.NextReleaseHideFlaggedApi() && !c.ReleaseExposeFlaggedApi() -} diff --git a/android/variable.go b/android/variable.go index 516e69c08..44a8fd7f3 100644 --- a/android/variable.go +++ b/android/variable.go @@ -490,8 +490,6 @@ type ProductVariables struct { PartitionVarsForBazelMigrationOnlyDoNotUse PartitionVariables `json:",omitempty"` NextReleaseHideFlaggedApi *bool `json:",omitempty"` - - ReleaseExposeFlaggedApi *bool `json:",omitempty"` } type PartitionVariables struct { diff --git a/java/droidstubs.go b/java/droidstubs.go index b059c0abf..67a55bd49 100644 --- a/java/droidstubs.go +++ b/java/droidstubs.go @@ -540,10 +540,6 @@ 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 } diff --git a/java/droidstubs_test.go b/java/droidstubs_test.go index 3c2580105..7a04d7326 100644 --- a/java/droidstubs_test.go +++ b/java/droidstubs_test.go @@ -22,8 +22,6 @@ import ( "testing" "android/soong/android" - - "github.com/google/blueprint/proptools" ) func TestDroidstubs(t *testing.T) { @@ -405,35 +403,3 @@ func TestGeneratedApiContributionVisibilityTest(t *testing.T) { ctx.ModuleForTests("bar", "android_common") } - -func TestDroidstubsHideFlaggedApi(t *testing.T) { - result := android.GroupFixturePreparers( - prepareForJavaTest, - android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) { - variables.NextReleaseHideFlaggedApi = proptools.BoolPtr(true) - variables.ReleaseExposeFlaggedApi = proptools.BoolPtr(false) - }), - android.FixtureMergeMockFs(map[string][]byte{ - "a/A.java": nil, - "a/current.txt": nil, - "a/removed.txt": nil, - }), - ).RunTestWithBp(t, ` - droidstubs { - name: "foo", - srcs: ["a/A.java"], - api_surface: "public", - check_api: { - current: { - api_file: "a/current.txt", - removed_api_file: "a/removed.txt", - } - }, - } - `) - - m := result.ModuleForTests("foo", "android_common") - manifest := m.Output("metalava.sbox.textproto") - cmdline := String(android.RuleBuilderSboxProtoForTests(t, manifest).Commands[0].Command) - android.AssertStringDoesContain(t, "flagged api hide command not included", cmdline, "--hide-annotation android.annotation.FlaggedApi") -}