1################################################################################################
2#
3# @NOTE:
4# Audio Policy Engine configurable example for generic device build
5#
6# Any vendor shall have its own configuration within the corresponding device folder
7#
8################################################################################################
9
10
11LOCAL_PATH := $(call my-dir)
12
13PFW_CORE := external/parameter-framework
14BUILD_PFW_SETTINGS := $(PFW_CORE)/support/android/build_pfw_settings.mk
15PFW_DEFAULT_SCHEMAS_DIR := $(PFW_CORE)/Schemas
16PFW_SCHEMAS_DIR := $(PFW_DEFAULT_SCHEMAS_DIR)
17
18##################################################################
19# CONFIGURATION FILES
20##################################################################
21######### Policy PFW top level file #########
22
23include $(CLEAR_VARS)
24LOCAL_MODULE := ParameterFrameworkConfigurationPolicy.xml
25LOCAL_MODULE_TAGS := optional
26LOCAL_MODULE_CLASS := ETC
27LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework
28LOCAL_SRC_FILES := $(LOCAL_MODULE)
29include $(BUILD_PREBUILT)
30
31
32########## Policy PFW Structures #########
33
34include $(CLEAR_VARS)
35LOCAL_MODULE := PolicyClass.xml
36LOCAL_MODULE_TAGS := optional
37LOCAL_MODULE_CLASS := ETC
38LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework/Structure/Policy
39LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE)
40include $(BUILD_PREBUILT)
41
42include $(CLEAR_VARS)
43LOCAL_MODULE := PolicySubsystem.xml
44LOCAL_MODULE_TAGS := optional
45LOCAL_MODULE_CLASS := ETC
46LOCAL_REQUIRED_MODULES := \
47    PolicySubsystem-CommonTypes.xml \
48    PolicySubsystem-Volume.xml \
49    libpolicy-subsystem \
50
51LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework/Structure/Policy
52LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE)
53include $(BUILD_PREBUILT)
54
55include $(CLEAR_VARS)
56LOCAL_MODULE := PolicySubsystem-CommonTypes.xml
57LOCAL_MODULE_TAGS := optional
58LOCAL_MODULE_CLASS := ETC
59LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework/Structure/Policy
60LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE)
61include $(BUILD_PREBUILT)
62
63include $(CLEAR_VARS)
64LOCAL_MODULE := PolicySubsystem-Volume.xml
65LOCAL_MODULE_TAGS := optional
66LOCAL_MODULE_CLASS := ETC
67LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework/Structure/Policy
68LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE)
69include $(BUILD_PREBUILT)
70
71######### Policy PFW Settings #########
72include $(CLEAR_VARS)
73LOCAL_MODULE := parameter-framework.policy
74LOCAL_MODULE_STEM := PolicyConfigurableDomains.xml
75LOCAL_MODULE_CLASS := ETC
76LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Settings/Policy
77LOCAL_ADDITIONAL_DEPENDENCIES := \
78        PolicyClass.xml \
79        PolicySubsystem.xml \
80        ParameterFrameworkConfigurationPolicy.xml
81
82ifeq ($(pfw_rebuild_settings),true)
83PFW_TOPLEVEL_FILE := $(TARGET_OUT_ETC)/parameter-framework/ParameterFrameworkConfigurationPolicy.xml
84PFW_CRITERIA_FILE := $(LOCAL_PATH)/policy_criteria.txt
85PFW_EDD_FILES := \
86        $(LOCAL_PATH)/Settings/device_for_strategy_media.pfw \
87        $(LOCAL_PATH)/Settings/device_for_strategy_phone.pfw \
88        $(LOCAL_PATH)/Settings/device_for_strategy_sonification.pfw \
89        $(LOCAL_PATH)/Settings/device_for_strategy_sonification_respectful.pfw \
90        $(LOCAL_PATH)/Settings/device_for_strategy_dtmf.pfw \
91        $(LOCAL_PATH)/Settings/device_for_strategy_enforced_audible.pfw \
92        $(LOCAL_PATH)/Settings/device_for_strategy_transmitted_through_speaker.pfw \
93        $(LOCAL_PATH)/Settings/device_for_strategy_accessibility.pfw \
94        $(LOCAL_PATH)/Settings/device_for_strategy_rerouting.pfw \
95        $(LOCAL_PATH)/Settings/strategy_for_stream.pfw \
96        $(LOCAL_PATH)/Settings/strategy_for_usage.pfw \
97        $(LOCAL_PATH)/Settings/device_for_input_source.pfw \
98        $(LOCAL_PATH)/Settings/volumes.pfw
99
100include $(BUILD_PFW_SETTINGS)
101else
102# Use the existing file
103LOCAL_SRC_FILES := Settings/$(LOCAL_MODULE_STEM)
104include $(BUILD_PREBUILT)
105endif # pfw_rebuild_settings
106