From ea769bc5ec15c2503fe52505b64ca9fadfcc85ed Mon Sep 17 00:00:00 2001 From: Zhi Dou Date: Fri, 6 Oct 2023 07:21:52 +0000 Subject: [PATCH] Add UnsupportedAppUsage to java_aconfig_library dependency Generated flag requires UnsupportedAppUsage annotation to expose the flag to CTS tests. Bug: 301272559 Test: presubit Ignore-AOSP-First: Need to commit with changes in internal main. This change will be cherry picked to AOSP once merged in main Change-Id: I90c87596ca80766ece429ddee1b45723b01d2760 --- aconfig/java_aconfig_library.go | 2 ++ java/testing.go | 1 + 2 files changed, 3 insertions(+) diff --git a/aconfig/java_aconfig_library.go b/aconfig/java_aconfig_library.go index 48cfb7695..79573c787 100644 --- a/aconfig/java_aconfig_library.go +++ b/aconfig/java_aconfig_library.go @@ -58,6 +58,8 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) DepsMutator(module *ja // Add aconfig-annotations-lib as a dependency for the optimization / code stripping annotations module.AddSharedLibrary("aconfig-annotations-lib") + // TODO(b/303773055): Remove the annotation after access issue is resolved. + module.AddSharedLibrary("unsupportedappusage") } func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuildActions(module *java.GeneratedJavaLibraryModule, ctx android.ModuleContext) android.Path { diff --git a/java/testing.go b/java/testing.go index 98bea7f14..0b7e68539 100644 --- a/java/testing.go +++ b/java/testing.go @@ -410,6 +410,7 @@ func gatherRequiredDepsForTest() string { "stub-annotations", "aconfig-annotations-lib", + "unsupportedappusage", } for _, extra := range extraModules {