Have test_current be a union of system and test APIs
Include @SystemApi APIs in the test_current stub jar, while keeping
the @TestApi and @SystemApi API txt files tracked separately.
A side-effect of this change is that string constants of @SystemApi
permissions are no longer inlined in the test api tracking, possibly
because metalava was previously incorrectly peeking at @SystemApi
whereas it is now explicitly forbidden to do so. I don't believe the
API txt change has any practical effects.
Bug: 129133308
Test: presubmit
Change-Id: I23d3c88624ee7599485c3390a0440b78bc18a0a2
diff --git a/StubLibraries.bp b/StubLibraries.bp
index 05bf7b6..f761810 100644
--- a/StubLibraries.bp
+++ b/StubLibraries.bp
@@ -246,7 +246,11 @@
arg_files: [
"core/res/AndroidManifest.xml",
],
- args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
+ args: metalava_framework_docs_args
+ + " --show-annotation android.annotation.TestApi"
+ + " --show-for-stub-purposes-annotation android.annotation.SystemApi\\("
+ + "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS"
+ + "\\)",
check_api: {
current: {
api_file: "api/test-current.txt",