Merge "Create soong config to support other apis for aconfig finalization" into main
diff --git a/aconfig/Android.bp b/aconfig/Android.bp
index 1505ba5..3484b97 100644
--- a/aconfig/Android.bp
+++ b/aconfig/Android.bp
@@ -29,12 +29,17 @@
     pluginFor: ["soong_build"],
 }
 
+// All FlaggedApi flags associated with platform API.
+// By default this uses the platform APIs associated with android.jar
+// but other verticals/platforms can override via soong config setting.
 all_aconfig_declarations {
     name: "all_aconfig_declarations",
-    api_files: [
-        ":frameworks-base-api-current.txt",
-        ":frameworks-base-api-system-current.txt",
-        ":frameworks-base-api-system-server-current.txt",
-        ":frameworks-base-api-module-lib-current.txt",
-    ],
+    api_files: select(soong_config_variable("android_aconfig", "opt_platform_api_srcs"), {
+        default: [
+            ":frameworks-base-api-current.txt",
+            ":frameworks-base-api-system-current.txt",
+            ":frameworks-base-api-system-server-current.txt",
+            ":frameworks-base-api-module-lib-current.txt",
+        ],
+    }),
 }