Add bazel staging mode to soong build.

This is to use bazel to build targets that are being prepared for an
incipient release to the prod mode allowlist.

Bug: 254265047
Test: m nothing
Test: m nothing --bazel-mode-dev
Test: m nothing --bazel-mode-staging
Change-Id: Ic78a59cf51dba83ef1ac26483586560ea9b24aaf
diff --git a/android/allowlists/allowlists.go b/android/allowlists/allowlists.go
index 31368b2..6d3a63b 100644
--- a/android/allowlists/allowlists.go
+++ b/android/allowlists/allowlists.go
@@ -1347,4 +1347,8 @@
 	ProdMixedBuildsEnabledList = []string{
 		"com.android.adbd",
 	}
+
+	// Staging builds should be entirely prod, plus some near-ready ones. Add the
+	// new ones to the first argument as needed.
+	StagingMixedBuildsEnabledList = append([]string{}, ProdMixedBuildsEnabledList...)
 )
diff --git a/android/bazel_handler.go b/android/bazel_handler.go
index 29695d6..b216d0a 100644
--- a/android/bazel_handler.go
+++ b/android/bazel_handler.go
@@ -386,6 +386,12 @@
 		for _, enabledProdModule := range allowlists.ProdMixedBuildsEnabledList {
 			enabledModules[enabledProdModule] = true
 		}
+	case BazelStagingMode:
+		modulesDefaultToBazel = false
+		for _, enabledStagingMode := range allowlists.StagingMixedBuildsEnabledList {
+			enabledModules[enabledStagingMode] = true
+
+		}
 	case BazelDevMode:
 		modulesDefaultToBazel = true
 
diff --git a/android/config.go b/android/config.go
index 4992882..1ed405b 100644
--- a/android/config.go
+++ b/android/config.go
@@ -97,6 +97,11 @@
 	// allowlisted on an experimental basis.
 	BazelDevMode
 
+	// Use bazel during analysis of a few allowlisted build modules. The allowlist
+	// is considered "staging, as these are modules being prepared to be released
+	// into prod mode shortly after.
+	BazelStagingMode
+
 	// Use bazel during analysis of build modules from an allowlist carefully
 	// curated by the build team to be proven stable.
 	BazelProdMode