Build same hidden API lists as in pi-dev

P branch builds hidden API lists in a separate invocation of droiddoc
which includes @SystemApi and @TestApi annotated class members in the
public API. This patch creates the same build rule in the master branch,
only with Soong instead of Makefile.

Test: make out/soong/.intermediates/frameworks/base/hiddenapi-lists/android_common/private-dex.txt
Merged-In: Ifa912f8751025b7de24a982a1a227a9c27d18267
Change-Id: I80860c2b9f7213db65d0a9ca65bd645187aa0ce0
diff --git a/Android.bp b/Android.bp
index 5bdfc87..dd3c91a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -922,9 +922,7 @@
     ],
     api_filename: "public_api.txt",
     private_api_filename: "private.txt",
-    private_dex_api_filename: "private-dex.txt",
     removed_api_filename: "removed.txt",
-    removed_dex_api_filename: "removed-dex.txt",
     args: framework_docs_args + " -referenceonly -nodocs",
 }
 
@@ -993,6 +991,25 @@
     ],
 }
 
+droiddoc {
+    name: "hiddenapi-lists",
+    defaults: ["framework-docs-default"],
+    arg_files: [
+        "core/res/AndroidManifest.xml",
+        ":api-version-xml",
+        "core/java/overview.html",
+        ":current-support-api",
+    ],
+    private_dex_api_filename: "private-dex.txt",
+    removed_dex_api_filename: "removed-dex.txt",
+    args: framework_docs_args +
+          " -referenceonly" +
+          " -nodocs" +
+          " -showUnannotated" +
+          " -showAnnotation android.annotation.SystemApi" +
+          " -showAnnotation android.annotation.TestApi",
+}
+
 filegroup {
     name: "apache-http-stubs-sources",
     srcs: [