From 78b6b30aec81d3028fdcd6f5ca39d2fb30eca06b Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Tue, 16 Jan 2024 20:02:00 +0000 Subject: Remove HideFlaggedApi() related logic and the related product variables With the recent build changes to support generating mainlin module sdk with flagged apis, the build no longer depends on the values of these product variables in exposing the flagged apis, but these are determined by the aconfig flags. Given that these variables are no longer used, this change removes these variables and the variables dependent code. Test: m nothing --no-skip-soong-tests Bug: 320515715 Change-Id: I6af94da73cc7fc7ffce670928aad81cec5d383b4 --- java/droidstubs_test.go | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'java/droidstubs_test.go') diff --git a/java/droidstubs_test.go b/java/droidstubs_test.go index 379e2403f..52cd1c513 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) { @@ -364,38 +362,6 @@ 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.Release_expose_flagged_api = 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, result.TestContext, manifest).Commands[0].Command) - android.AssertStringDoesContain(t, "flagged api hide command not included", cmdline, "--revert-annotation android.annotation.FlaggedApi") -} - func TestAconfigDeclarations(t *testing.T) { result := android.GroupFixturePreparers( prepareForJavaTest, -- cgit v1.2.3-59-g8ed1b