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
10ifeq (1, 0)
11
12LOCAL_PATH := $(call my-dir)
13
14PFW_CORE := external/parameter-framework
15BUILD_PFW_SETTINGS := $(PFW_CORE)/support/android/build_pfw_settings.mk
16PFW_DEFAULT_SCHEMAS_DIR := $(PFW_CORE)/upstream/schemas
17PFW_SCHEMAS_DIR := $(PFW_DEFAULT_SCHEMAS_DIR)
18
19##################################################################
20# CONFIGURATION FILES
21##################################################################
22######### Policy PFW top level file #########
23
24include $(CLEAR_VARS)
25LOCAL_MODULE := ParameterFrameworkConfigurationPolicy.xml
26LOCAL_MODULE_TAGS := optional
27LOCAL_MODULE_CLASS := ETC
28LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework
29LOCAL_SRC_FILES := $(LOCAL_MODULE).in
30
31AUDIO_PATTERN = @TUNING_ALLOWED@
32ifeq ($(TARGET_BUILD_VARIANT),user)
33AUDIO_VALUE = false
34else
35AUDIO_VALUE = true
36endif
37
38LOCAL_POST_INSTALL_CMD := $(hide) sed -i -e 's|$(AUDIO_PATTERN)|$(AUDIO_VALUE)|g' $(LOCAL_MODULE_PATH)/$(LOCAL_MODULE)
39
40include $(BUILD_PREBUILT)
41
42
43########## Policy PFW Structures #########
44
45include $(CLEAR_VARS)
46LOCAL_MODULE := PolicyClass.xml
47LOCAL_MODULE_TAGS := optional
48LOCAL_MODULE_CLASS := ETC
49LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework/Structure/Policy
50LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE)
51include $(BUILD_PREBUILT)
52
53include $(CLEAR_VARS)
54LOCAL_MODULE := PolicySubsystem.xml
55LOCAL_MODULE_TAGS := optional
56LOCAL_MODULE_CLASS := ETC
57LOCAL_REQUIRED_MODULES := \
58    PolicySubsystem-CommonTypes.xml \
59    PolicySubsystem-Volume.xml \
60    libpolicy-subsystem \
61
62LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework/Structure/Policy
63LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE)
64include $(BUILD_PREBUILT)
65
66include $(CLEAR_VARS)
67LOCAL_MODULE := PolicySubsystem-CommonTypes.xml
68LOCAL_MODULE_TAGS := optional
69LOCAL_MODULE_CLASS := ETC
70LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework/Structure/Policy
71LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE)
72include $(BUILD_PREBUILT)
73
74######### Policy PFW Settings #########
75include $(CLEAR_VARS)
76LOCAL_MODULE := parameter-framework.policy
77LOCAL_MODULE_STEM := PolicyConfigurableDomains.xml
78LOCAL_MODULE_CLASS := ETC
79LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Settings/Policy
80LOCAL_ADDITIONAL_DEPENDENCIES := \
81        PolicyClass.xml \
82        PolicySubsystem.xml \
83        ParameterFrameworkConfigurationPolicy.xml
84
85ifeq ($(pfw_rebuild_settings),true)
86PFW_TOPLEVEL_FILE := $(TARGET_OUT_ETC)/parameter-framework/ParameterFrameworkConfigurationPolicy.xml
87PFW_CRITERIA_FILE := $(LOCAL_PATH)/policy_criteria.txt
88PFW_EDD_FILES := \
89        $(LOCAL_PATH)/Settings/device_for_strategy_media.pfw \
90        $(LOCAL_PATH)/Settings/device_for_strategy_phone.pfw \
91        $(LOCAL_PATH)/Settings/device_for_strategy_sonification.pfw \
92        $(LOCAL_PATH)/Settings/device_for_strategy_sonification_respectful.pfw \
93        $(LOCAL_PATH)/Settings/device_for_strategy_dtmf.pfw \
94        $(LOCAL_PATH)/Settings/device_for_strategy_enforced_audible.pfw \
95        $(LOCAL_PATH)/Settings/device_for_strategy_transmitted_through_speaker.pfw \
96        $(LOCAL_PATH)/Settings/device_for_strategy_accessibility.pfw \
97        $(LOCAL_PATH)/Settings/device_for_strategy_rerouting.pfw \
98        $(LOCAL_PATH)/Settings/strategy_for_stream.pfw \
99        $(LOCAL_PATH)/Settings/strategy_for_usage.pfw \
100        $(LOCAL_PATH)/Settings/device_for_input_source.pfw \
101        $(LOCAL_PATH)/Settings/volumes.pfw
102
103include $(BUILD_PFW_SETTINGS)
104else
105# Use the existing file
106LOCAL_SRC_FILES := Settings/$(LOCAL_MODULE_STEM)
107include $(BUILD_PREBUILT)
108endif # pfw_rebuild_settings
109
110######### Policy PFW Settings - No Output #########
111include $(CLEAR_VARS)
112LOCAL_MODULE := parameter-framework.policy.no-output
113LOCAL_MODULE_STEM := PolicyConfigurableDomains-NoOutputDevice.xml
114LOCAL_MODULE_CLASS := ETC
115LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Settings/Policy
116LOCAL_ADDITIONAL_DEPENDENCIES := \
117        PolicyClass.xml \
118        PolicySubsystem.xml \
119        ParameterFrameworkConfigurationPolicy.xml
120
121PFW_TOPLEVEL_FILE := $(TARGET_OUT_ETC)/parameter-framework/ParameterFrameworkConfigurationPolicy.xml
122PFW_CRITERIA_FILE := $(LOCAL_PATH)/policy_criteria.txt
123PFW_EDD_FILES := \
124        $(LOCAL_PATH)/SettingsNoOutput/device_for_strategies.pfw \
125        $(LOCAL_PATH)/Settings/strategy_for_stream.pfw \
126        $(LOCAL_PATH)/Settings/strategy_for_usage.pfw \
127        $(LOCAL_PATH)/Settings/device_for_input_source.pfw \
128        $(LOCAL_PATH)/Settings/volumes.pfw
129
130include $(BUILD_PFW_SETTINGS)
131
132######### Policy PFW Settings - No Input #########
133include $(CLEAR_VARS)
134LOCAL_MODULE := parameter-framework.policy.no-input
135LOCAL_MODULE_STEM := PolicyConfigurableDomains-NoInputDevice.xml
136LOCAL_MODULE_CLASS := ETC
137LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Settings/Policy
138LOCAL_ADDITIONAL_DEPENDENCIES := \
139        PolicyClass.xml \
140        PolicySubsystem.xml \
141        ParameterFrameworkConfigurationPolicy.xml
142
143PFW_TOPLEVEL_FILE := $(TARGET_OUT_ETC)/parameter-framework/ParameterFrameworkConfigurationPolicy.xml
144PFW_CRITERIA_FILE := $(LOCAL_PATH)/policy_criteria.txt
145PFW_EDD_FILES := \
146        $(LOCAL_PATH)/Settings/device_for_strategy_media.pfw \
147        $(LOCAL_PATH)/Settings/device_for_strategy_phone.pfw \
148        $(LOCAL_PATH)/Settings/device_for_strategy_sonification.pfw \
149        $(LOCAL_PATH)/Settings/device_for_strategy_sonification_respectful.pfw \
150        $(LOCAL_PATH)/Settings/device_for_strategy_dtmf.pfw \
151        $(LOCAL_PATH)/Settings/device_for_strategy_enforced_audible.pfw \
152        $(LOCAL_PATH)/Settings/device_for_strategy_transmitted_through_speaker.pfw \
153        $(LOCAL_PATH)/Settings/device_for_strategy_accessibility.pfw \
154        $(LOCAL_PATH)/Settings/device_for_strategy_rerouting.pfw \
155        $(LOCAL_PATH)/Settings/strategy_for_stream.pfw \
156        $(LOCAL_PATH)/Settings/strategy_for_usage.pfw \
157        $(LOCAL_PATH)/SettingsNoInput/device_for_input_source.pfw \
158        $(LOCAL_PATH)/Settings/volumes.pfw
159
160include $(BUILD_PFW_SETTINGS)
161
162endif # ifeq (1, 0)
163