audiopolicy: engineconfigurable: fix PATH issue am: bc5c7de704 am: ed29c951f0 am: f05f6c3363
am: 7dcf320a45
Change-Id: I981c1f5039b2ffbac7d6500b5d8de46211f1d5b6
diff --git a/services/audiopolicy/engineconfigurable/parameter-framework/examples/Android.mk b/services/audiopolicy/engineconfigurable/parameter-framework/examples/Android.mk
index 19f93b3..35d0dad 100644
--- a/services/audiopolicy/engineconfigurable/parameter-framework/examples/Android.mk
+++ b/services/audiopolicy/engineconfigurable/parameter-framework/examples/Android.mk
@@ -152,8 +152,9 @@
PFW_EDD_FILES := \
$(LOCAL_PATH)/SettingsNoOutput/device_for_strategies.pfw \
$(LOCAL_PATH)/Settings/device_for_input_source.pfw \
- $(LOCAL_PATH)/Settings/volumes.pfw
+ $(LOCAL_PATH)/Settings/volumes.pfw
LOCAL_REQUIRED_MODULES := libpolicy-subsystem
+PFW_DOMAIN_GENERATOR_TOOL := $(HOST_OUT_EXECUTABLES)/domainGeneratorConnector
include $(BUILD_PFW_SETTINGS)
endif # ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),no-output_configurable)
@@ -174,6 +175,7 @@
$(LOCAL_PATH)/SettingsNoInput/device_for_input_source.pfw \
$(LOCAL_PATH)/Settings/volumes.pfw
LOCAL_REQUIRED_MODULES := libpolicy-subsystem
+PFW_DOMAIN_GENERATOR_TOOL := $(HOST_OUT_EXECUTABLES)/domainGeneratorConnector
include $(BUILD_PFW_SETTINGS)
endif #ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),no-input_configurable)
diff --git a/services/audiopolicy/engineconfigurable/parameter-framework/examples/Car/Android.mk b/services/audiopolicy/engineconfigurable/parameter-framework/examples/Car/Android.mk
index 7304ec2..a53a4aa 100644
--- a/services/audiopolicy/engineconfigurable/parameter-framework/examples/Car/Android.mk
+++ b/services/audiopolicy/engineconfigurable/parameter-framework/examples/Car/Android.mk
@@ -41,6 +41,7 @@
PFW_CRITERIA_FILE := $(TARGET_OUT_VENDOR_ETC)/audio_policy_engine_criteria.xml
PFW_TOPLEVEL_FILE := $(TARGET_OUT_VENDOR_ETC)/parameter-framework/ParameterFrameworkConfigurationPolicy.xml
PFW_SCHEMAS_DIR := $(PFW_DEFAULT_SCHEMAS_DIR)
+PFW_DOMAIN_GENERATOR_TOOL := $(HOST_OUT_EXECUTABLES)/domainGeneratorConnector
include $(BUILD_PFW_SETTINGS)
diff --git a/services/audiopolicy/engineconfigurable/parameter-framework/examples/CarEmu/Android.mk b/services/audiopolicy/engineconfigurable/parameter-framework/examples/CarEmu/Android.mk
index f5eb7d1..8fa9f58 100644
--- a/services/audiopolicy/engineconfigurable/parameter-framework/examples/CarEmu/Android.mk
+++ b/services/audiopolicy/engineconfigurable/parameter-framework/examples/CarEmu/Android.mk
@@ -40,6 +40,7 @@
PFW_CRITERIA_FILE := $(TARGET_OUT_VENDOR_ETC)/audio_policy_engine_criteria.xml
PFW_TOPLEVEL_FILE := $(TARGET_OUT_VENDOR_ETC)/parameter-framework/ParameterFrameworkConfigurationPolicy.xml
PFW_SCHEMAS_DIR := $(PFW_DEFAULT_SCHEMAS_DIR)
+PFW_DOMAIN_GENERATOR_TOOL := $(HOST_OUT_EXECUTABLES)/domainGeneratorConnector
include $(BUILD_PFW_SETTINGS)
diff --git a/services/audiopolicy/engineconfigurable/parameter-framework/examples/Phone/Android.mk b/services/audiopolicy/engineconfigurable/parameter-framework/examples/Phone/Android.mk
index 0b20781..6de0d55 100644
--- a/services/audiopolicy/engineconfigurable/parameter-framework/examples/Phone/Android.mk
+++ b/services/audiopolicy/engineconfigurable/parameter-framework/examples/Phone/Android.mk
@@ -48,6 +48,7 @@
PFW_CRITERIA_FILE := $(TARGET_OUT_VENDOR_ETC)/audio_policy_engine_criteria.xml
PFW_TOPLEVEL_FILE := $(TARGET_OUT_VENDOR_ETC)/parameter-framework/ParameterFrameworkConfigurationPolicy.xml
PFW_SCHEMAS_DIR := $(PFW_DEFAULT_SCHEMAS_DIR)
+PFW_DOMAIN_GENERATOR_TOOL := $(HOST_OUT_EXECUTABLES)/domainGeneratorConnector
include $(BUILD_PFW_SETTINGS)
diff --git a/services/audiopolicy/engineconfigurable/tools/build_audio_pfw_settings.mk b/services/audiopolicy/engineconfigurable/tools/build_audio_pfw_settings.mk
index ac60ef7..f73885c 100644
--- a/services/audiopolicy/engineconfigurable/tools/build_audio_pfw_settings.mk
+++ b/services/audiopolicy/engineconfigurable/tools/build_audio_pfw_settings.mk
@@ -2,6 +2,7 @@
LOCAL_MODULE_TAGS := optional
LOCAL_ADDITIONAL_DEPENDENCIES += \
$(HOST_OUT_EXECUTABLES)/domainGeneratorPolicy.py \
+ $(PFW_DOMAIN_GENERATOR_TOOL) \
$(PFW_TOPLEVEL_FILE) $(PFW_CRITERIA_FILE) $(PFW_CRITERION_TYPES_FILE)
include $(BUILD_SYSTEM)/base_rules.mk
@@ -15,9 +16,11 @@
$(LOCAL_BUILT_MODULE): MY_DOMAIN_FILES := $(PFW_DOMAIN_FILES)
$(LOCAL_BUILT_MODULE): MY_SCHEMAS_DIR := $(PFW_SCHEMAS_DIR)
$(LOCAL_BUILT_MODULE): MY_CRITERION_TYPES_FILE := $(PFW_CRITERION_TYPES_FILE)
+$(LOCAL_BUILT_MODULE): MY_DOMAIN_GENERATOR_TOOL := $(PFW_DOMAIN_GENERATOR_TOOL)
$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)
"$(MY_TOOL)" --validate \
+ --domain-generator-tool "$(MY_DOMAIN_GENERATOR_TOOL)" \
--toplevel-config "$(MY_TOPLEVEL_FILE)" \
--criteria "$(MY_CRITERIA_FILE)" \
--criteriontypes "$(MY_CRITERION_TYPES_FILE)" \
@@ -36,3 +39,4 @@
PFW_EDD_FILES :=
PFW_DOMAIN_FILES :=
PFW_SCHEMAS_DIR := $(PFW_DEFAULT_SCHEMAS_DIR)
+PFW_DOMAIN_GENERATOR_TOOL :=
diff --git a/services/audiopolicy/engineconfigurable/tools/domainGeneratorPolicy.py b/services/audiopolicy/engineconfigurable/tools/domainGeneratorPolicy.py
index 4dec9a2..7f22f4f 100755
--- a/services/audiopolicy/engineconfigurable/tools/domainGeneratorPolicy.py
+++ b/services/audiopolicy/engineconfigurable/tools/domainGeneratorPolicy.py
@@ -41,6 +41,10 @@
argparser = argparse.ArgumentParser(description="Parameter-Framework XML \
Settings file generator.\n\
Exit with the number of (recoverable or not) error that occured.")
+ argparser.add_argument('--domain-generator-tool',
+ help="ParameterFramework domain generator tool. Mandatory.",
+ metavar="PFW_DOMAIN_GENERATOR_TOOL",
+ required=True)
argparser.add_argument('--toplevel-config',
help="Top-level parameter-framework configuration file. Mandatory.",
metavar="TOPLEVEL_CONFIG_FILE",
@@ -241,7 +245,7 @@
# Create the connector. Pipe its input to us in order to write commands;
# connect its output to stdout in order to have it dump the domains
# there; connect its error output to stderr.
- connector = subprocess.Popen(["domainGeneratorConnector",
+ connector = subprocess.Popen([args.domain_generator_tool,
fake_toplevel_config.name,
'verbose' if args.verbose else 'no-verbose',
'validate' if args.validate else 'no-validate',