Add apex_available to sysprop_library

Added apex_available support to sysprop_library and copied it onto the
underlying cc_library.

Bug: 152762638
Bug: 153306490
Test: m nothing
Merged-In: I8f4c539532b48f3a45c1fbf0f7287db11df69d2f
Change-Id: I8f4c539532b48f3a45c1fbf0f7287db11df69d2f
diff --git a/sysprop/sysprop_library.go b/sysprop/sysprop_library.go
index 65dbb22..9d492fe 100644
--- a/sysprop/sysprop_library.go
+++ b/sysprop/sysprop_library.go
@@ -115,6 +115,7 @@
 
 type syspropLibrary struct {
 	android.ModuleBase
+	android.ApexModuleBase
 
 	properties syspropLibraryProperties
 
@@ -296,6 +297,7 @@
 		&m.properties,
 	)
 	android.InitAndroidModule(m)
+	android.InitApexModule(m)
 	android.AddLoadHook(m, func(ctx android.LoadHookContext) { syspropLibraryHook(ctx, m) })
 	return m
 }
@@ -323,6 +325,7 @@
 	Recovery_available *bool
 	Vendor_available   *bool
 	Host_supported     *bool
+	Apex_available     []string
 }
 
 type javaLibraryProperties struct {
@@ -411,6 +414,7 @@
 	ccProps.Recovery_available = m.properties.Recovery_available
 	ccProps.Vendor_available = m.properties.Vendor_available
 	ccProps.Host_supported = m.properties.Host_supported
+	ccProps.Apex_available = m.ApexProperties.Apex_available
 	ctx.CreateModule(cc.LibraryFactory, &ccProps)
 
 	scope := "internal"