Allow sysprop library API files to be missing

If sysprop library contains only internal properties, the API txt file
will be empty. This allows the API files to be missing in such cases to
turn off API-Review bit.

Bug: 177036449
Test: manual test
Change-Id: I9792e46ce6d19e65ee83cb055f76069063bec281
diff --git a/build/soong/selinux_contexts.go b/build/soong/selinux_contexts.go
index 5b21d41..e07bbf0 100644
--- a/build/soong/selinux_contexts.go
+++ b/build/soong/selinux_contexts.go
@@ -382,11 +382,13 @@
 
 	var apiFiles android.Paths
 	ctx.VisitDirectDepsWithTag(syspropLibraryDepTag, func(c android.Module) {
-		i, ok := c.(interface{ CurrentSyspropApiFile() android.Path })
+		i, ok := c.(interface{ CurrentSyspropApiFile() android.OptionalPath })
 		if !ok {
 			panic(fmt.Errorf("unknown dependency %q for %q", ctx.OtherModuleName(c), ctx.ModuleName()))
 		}
-		apiFiles = append(apiFiles, i.CurrentSyspropApiFile())
+		if api := i.CurrentSyspropApiFile(); api.Valid() {
+			apiFiles = append(apiFiles, api.Path())
+		}
 	})
 
 	// check compatibility with sysprop_library