Copy white listed apex available settings into snapshot

Makes sure that the module snapshots do not rely on the white list
of apex available settings so that when those lists are removed it is
not necessary to update any snapshots.

Bug: 142935992
Test: m nothing
Change-Id: Iedcff7dfc2646a4da77258d16e06657dd2f411f9
diff --git a/sdk/update.go b/sdk/update.go
index 27a7003..0084eb7 100644
--- a/sdk/update.go
+++ b/sdk/update.go
@@ -20,6 +20,7 @@
 	"sort"
 	"strings"
 
+	"android/soong/apex"
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
 
@@ -640,7 +641,15 @@
 	// Where available copy apex_available properties from the member.
 	if apexAware, ok := variant.(interface{ ApexAvailable() []string }); ok {
 		apexAvailable := apexAware.ApexAvailable()
+
+		// Add in any white listed apex available settings.
+		apexAvailable = append(apexAvailable, apex.WhitelistedApexAvailable(member.Name())...)
+
 		if len(apexAvailable) > 0 {
+			// Remove duplicates and sort.
+			apexAvailable = android.FirstUniqueStrings(apexAvailable)
+			sort.Strings(apexAvailable)
+
 			m.AddProperty("apex_available", apexAvailable)
 		}
 	}