Implement `host_required` and `target_required` properties.

They are counterparts of LOCAL_HOST_REQUIRED_MODULES and
LOCAL_TARGET_REQUIRED_MODULES respectively.

Fixes: 128693436
Test: treehugger, convert cts/hostsidetests/devicepolicy/Android.bp
Change-Id: Id66ffca6edffe18993ac51e8930f1d0e78178249
diff --git a/android/prebuilt_etc.go b/android/prebuilt_etc.go
index 2a3e07e..3cadaeb 100644
--- a/android/prebuilt_etc.go
+++ b/android/prebuilt_etc.go
@@ -17,7 +17,6 @@
 import (
 	"fmt"
 	"io"
-	"strings"
 )
 
 // TODO(jungw): Now that it handles more than the ones in etc/, consider renaming this file.
@@ -157,7 +156,7 @@
 			fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", "$(OUT_DIR)/"+p.installDirPath.RelPathString())
 			fmt.Fprintln(w, "LOCAL_INSTALLED_MODULE_STEM :=", p.outputFilePath.Base())
 			fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE :=", !p.Installable())
-			fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES :=", strings.Join(data.Required, " "))
+			WriteRequiredModulesSettings(w, data)
 			if p.additionalDependencies != nil {
 				fmt.Fprint(w, "LOCAL_ADDITIONAL_DEPENDENCIES :=")
 				for _, path := range *p.additionalDependencies {