summaryrefslogtreecommitdiff
path: root/java/droidstubs_test.go
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2024-01-16 20:02:00 +0000
committer Jihoon Kang <jihoonkang@google.com> 2024-01-16 20:20:27 +0000
commit78b6b30aec81d3028fdcd6f5ca39d2fb30eca06b (patch)
tree7991225ff92ea9472a4378a40fb6f775390274ed /java/droidstubs_test.go
parentd06bdb031042ea448cc2a34fae9ccc4a50f63434 (diff)
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
Diffstat (limited to 'java/droidstubs_test.go')
-rw-r--r--java/droidstubs_test.go34
1 files changed, 0 insertions, 34 deletions
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,