Home | History | Annotate | Download | only in examples
      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 ifeq (1, 0)
     11 
     12 LOCAL_PATH := $(call my-dir)
     13 
     14 PFW_CORE := external/parameter-framework
     15 BUILD_PFW_SETTINGS := $(PFW_CORE)/support/android/build_pfw_settings.mk
     16 PFW_DEFAULT_SCHEMAS_DIR := $(PFW_CORE)/upstream/schemas
     17 PFW_SCHEMAS_DIR := $(PFW_DEFAULT_SCHEMAS_DIR)
     18 
     19 ##################################################################
     20 # CONFIGURATION FILES
     21 ##################################################################
     22 ######### Policy PFW top level file #########
     23 
     24 include $(CLEAR_VARS)
     25 LOCAL_MODULE := ParameterFrameworkConfigurationPolicy.xml
     26 LOCAL_MODULE_TAGS := optional
     27 LOCAL_MODULE_CLASS := ETC
     28 LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework
     29 LOCAL_SRC_FILES := $(LOCAL_MODULE).in
     30 
     31 AUDIO_PATTERN = @TUNING_ALLOWED@
     32 ifeq ($(TARGET_BUILD_VARIANT),user)
     33 AUDIO_VALUE = false
     34 else
     35 AUDIO_VALUE = true
     36 endif
     37 
     38 LOCAL_POST_INSTALL_CMD := $(hide) sed -i -e 's|$(AUDIO_PATTERN)|$(AUDIO_VALUE)|g' $(LOCAL_MODULE_PATH)/$(LOCAL_MODULE)
     39 
     40 include $(BUILD_PREBUILT)
     41 
     42 
     43 ########## Policy PFW Structures #########
     44 
     45 include $(CLEAR_VARS)
     46 LOCAL_MODULE := PolicyClass.xml
     47 LOCAL_MODULE_TAGS := optional
     48 LOCAL_MODULE_CLASS := ETC
     49 LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework/Structure/Policy
     50 LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE)
     51 include $(BUILD_PREBUILT)
     52 
     53 include $(CLEAR_VARS)
     54 LOCAL_MODULE := PolicySubsystem.xml
     55 LOCAL_MODULE_TAGS := optional
     56 LOCAL_MODULE_CLASS := ETC
     57 LOCAL_REQUIRED_MODULES := \
     58     PolicySubsystem-CommonTypes.xml \
     59     PolicySubsystem-Volume.xml \
     60     libpolicy-subsystem \
     61 
     62 LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework/Structure/Policy
     63 LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE)
     64 include $(BUILD_PREBUILT)
     65 
     66 include $(CLEAR_VARS)
     67 LOCAL_MODULE := PolicySubsystem-CommonTypes.xml
     68 LOCAL_MODULE_TAGS := optional
     69 LOCAL_MODULE_CLASS := ETC
     70 LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/parameter-framework/Structure/Policy
     71 LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE)
     72 include $(BUILD_PREBUILT)
     73 
     74 ######### Policy PFW Settings #########
     75 include $(CLEAR_VARS)
     76 LOCAL_MODULE := parameter-framework.policy
     77 LOCAL_MODULE_STEM := PolicyConfigurableDomains.xml
     78 LOCAL_MODULE_CLASS := ETC
     79 LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Settings/Policy
     80 LOCAL_ADDITIONAL_DEPENDENCIES := \
     81         PolicyClass.xml \
     82         PolicySubsystem.xml \
     83         ParameterFrameworkConfigurationPolicy.xml
     84 
     85 ifeq ($(pfw_rebuild_settings),true)
     86 PFW_TOPLEVEL_FILE := $(TARGET_OUT_ETC)/parameter-framework/ParameterFrameworkConfigurationPolicy.xml
     87 PFW_CRITERIA_FILE := $(LOCAL_PATH)/policy_criteria.txt
     88 PFW_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 
    103 include $(BUILD_PFW_SETTINGS)
    104 else
    105 # Use the existing file
    106 LOCAL_SRC_FILES := Settings/$(LOCAL_MODULE_STEM)
    107 include $(BUILD_PREBUILT)
    108 endif # pfw_rebuild_settings
    109 
    110 ######### Policy PFW Settings - No Output #########
    111 include $(CLEAR_VARS)
    112 LOCAL_MODULE := parameter-framework.policy.no-output
    113 LOCAL_MODULE_STEM := PolicyConfigurableDomains-NoOutputDevice.xml
    114 LOCAL_MODULE_CLASS := ETC
    115 LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Settings/Policy
    116 LOCAL_ADDITIONAL_DEPENDENCIES := \
    117         PolicyClass.xml \
    118         PolicySubsystem.xml \
    119         ParameterFrameworkConfigurationPolicy.xml
    120 
    121 PFW_TOPLEVEL_FILE := $(TARGET_OUT_ETC)/parameter-framework/ParameterFrameworkConfigurationPolicy.xml
    122 PFW_CRITERIA_FILE := $(LOCAL_PATH)/policy_criteria.txt
    123 PFW_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 
    130 include $(BUILD_PFW_SETTINGS)
    131 
    132 ######### Policy PFW Settings - No Input #########
    133 include $(CLEAR_VARS)
    134 LOCAL_MODULE := parameter-framework.policy.no-input
    135 LOCAL_MODULE_STEM := PolicyConfigurableDomains-NoInputDevice.xml
    136 LOCAL_MODULE_CLASS := ETC
    137 LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Settings/Policy
    138 LOCAL_ADDITIONAL_DEPENDENCIES := \
    139         PolicyClass.xml \
    140         PolicySubsystem.xml \
    141         ParameterFrameworkConfigurationPolicy.xml
    142 
    143 PFW_TOPLEVEL_FILE := $(TARGET_OUT_ETC)/parameter-framework/ParameterFrameworkConfigurationPolicy.xml
    144 PFW_CRITERIA_FILE := $(LOCAL_PATH)/policy_criteria.txt
    145 PFW_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 
    160 include $(BUILD_PFW_SETTINGS)
    161 
    162 endif # ifeq (1, 0)
    163