Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c827c3f4 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge changes from topic "parameter-fwk-config-policy"

* changes:
  audiopolicy: engineconfigurable: add configuration for caremu
  audiopolicy: engineconfigurable: fix configurations
  audiopolicy: engineconfigurable: prevents typo on strategy structure file
parents e6e98e77 946d4b15
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -62,10 +62,6 @@ ifneq ($(USE_XML_AUDIO_POLICY_CONF), 1)
$(error Configurable policy does not support legacy conf file)
endif #ifneq ($(USE_XML_AUDIO_POLICY_CONF), 1)

LOCAL_REQUIRED_MODULES := \
    parameter-framework.policy \
    audio_policy_criteria.conf \

LOCAL_C_INCLUDES += frameworks/av/services/audiopolicy/engineconfigurable/include
LOCAL_C_INCLUDES += frameworks/av/include

+41 −18
Original line number Diff line number Diff line
@@ -10,16 +10,15 @@ PROVISION_CRITERION_TYPES := $(TOOLS)/provision_criterion_types_from_android_hea
ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION), phone_configurable)

include $(CLEAR_VARS)
LOCAL_MODULE := audio_policy_engine_configuration_phone.xml
LOCAL_MODULE_STEM := audio_policy_engine_configuration.xml
LOCAL_MODULE := audio_policy_engine_configuration.xml

LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := phone/$(LOCAL_MODULE_STEM)
LOCAL_SRC_FILES := phone/$(LOCAL_MODULE)

LOCAL_REQUIRED_MODULES := \
    audio_policy_engine_product_strategies_phone.xml  \
    audio_policy_engine_product_strategies.xml  \
    audio_policy_engine_stream_volumes.xml \
    audio_policy_engine_default_stream_volumes.xml \
    audio_policy_engine_criteria.xml \
@@ -28,12 +27,11 @@ LOCAL_REQUIRED_MODULES := \
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)
LOCAL_MODULE := audio_policy_engine_product_strategies_phone.xml
LOCAL_MODULE_STEM := audio_policy_engine_product_strategies.xml
LOCAL_MODULE := audio_policy_engine_product_strategies.xml
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := phone/$(LOCAL_MODULE_STEM)
LOCAL_SRC_FILES := phone/$(LOCAL_MODULE)
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)
@@ -55,39 +53,40 @@ include $(BUILD_PREBUILT)
endif # ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION), phone_configurable)


ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION), automotive_configurable)
ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),automotive_configurable caremu_configurable))

##################################################################
# AUTOMOTIVE CONFIGURATION TOP FILE
##################################################################
include $(CLEAR_VARS)
LOCAL_MODULE := audio_policy_engine_configuration_automotive.xml
LOCAL_MODULE_STEM := audio_policy_engine_configuration.xml

LOCAL_MODULE := audio_policy_engine_configuration.xml
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := automotive/$(LOCAL_MODULE_STEM)
LOCAL_SRC_FILES := automotive/$(LOCAL_MODULE)

LOCAL_REQUIRED_MODULES := \
    audio_policy_engine_product_strategies_automotive.xml \
    audio_policy_engine_product_strategies.xml \
    audio_policy_engine_criteria.xml \
    audio_policy_engine_criterion_types.xml \
    audio_policy_engine_volumes.xml

include $(BUILD_PREBUILT)

endif #ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),automotive_configurable caremu_configurable))

ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION), automotive_configurable)

##################################################################
# CONFIGURATION FILES
##################################################################

include $(CLEAR_VARS)
LOCAL_MODULE := audio_policy_engine_product_strategies_automotive.xml
LOCAL_MODULE_STEM := audio_policy_engine_product_strategies.xml
LOCAL_MODULE := audio_policy_engine_product_strategies.xml
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := automotive/$(LOCAL_MODULE_STEM)
LOCAL_SRC_FILES := automotive/$(LOCAL_MODULE)
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)
@@ -100,7 +99,31 @@ include $(BUILD_PREBUILT)

endif #ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION), automotive_configurable)

ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),phone_configurable automotive_configurable))
ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION), caremu_configurable)

##################################################################
# CONFIGURATION FILES
##################################################################

include $(CLEAR_VARS)
LOCAL_MODULE := audio_policy_engine_product_strategies.xml
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := caremu/$(LOCAL_MODULE)
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)
LOCAL_MODULE := audio_policy_engine_volumes.xml
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := caremu/$(LOCAL_MODULE)
include $(BUILD_PREBUILT)

endif #ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION), caremu_configurable)

ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),phone_configurable automotive_configurable caremu_configurable))

include $(CLEAR_VARS)
LOCAL_MODULE := audio_policy_engine_criteria.xml
@@ -123,4 +146,4 @@ CRITERION_TYPES_FILE := $(LOCAL_PATH)/common/$(LOCAL_MODULE).in

include $(PROVISION_CRITERION_TYPES)

endif #ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),phone_configurable automotive_configurable))
endif #ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),phone_configurable automotive_configurable caremu_configurable))
+170 −0
Original line number Diff line number Diff line
<?xml version='1.0' encoding='UTF-8'?>
<!-- Copyright (C) 2018 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<ProductStrategies>
    <!-- OEM Usages -->
    <!-- product_strategy will be defined according this order
    product_strategy is oem_traffic_anouncement if all the conditions are satisfied for
    AudioAttributes aa

    int type = 0;
    if (bundle != null) {
    type = bundle.getInt(KEY_OEM_TYPE, 0);
    }
    if(
    ( aa.mContentType == AudioAttributes.AUDIO_CONTENT_TYPE_SPEECH ) &&
    ( aa.mUsage == AudioAttributes.AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE ) &&
    ( type == 1 ) )
    -->

    <ProductStrategy name="oem_traffic_anouncement">
        <AttributesGroup volumeGroup="oem_traffic_anouncement">
            <ContentType value="AUDIO_CONTENT_TYPE_SPEECH"/>
            <Usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"/>
            <!--  traffic_annoucement = 1 -->
            <Bundle key="oem" value="1"/>
        </AttributesGroup>
    </ProductStrategy>
    <ProductStrategy name="oem_strategy_1">
        <AttributesGroup volumeGroup="oem_adas_2">
            <ContentType value="AUDIO_CONTENT_TYPE_SPEECH"/>
            <Usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"/>
            <Bundle key="oem" value="2"/>
        </AttributesGroup>
    </ProductStrategy>
    <ProductStrategy name="oem_strategy_2">
        <AttributesGroup volumeGroup="oem_adas_3">
            <ContentType value="AUDIO_CONTENT_TYPE_SPEECH"/>
            <Usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"/>
            <Bundle key="oem" value="3"/>
        </AttributesGroup>
    </ProductStrategy>

    <!-- Car Usages -->
    <!-- Keep those lines only for car -->
    <!-- Check car conditions if any OEM conditions matched -->
    <!-- As defined by CarAudioAttributesUtil.java -->
    <!-- product_strategy will be defined according this order
    product_strategy is radio if all the conditions are satisfied for AudioAttributes aa

        int type = CAR_AUDIO_TYPE_DEFAULT;
        if (bundle != null) {
        type = bundle.getInt(KEY_CAR_AUDIO_TYPE, CAR_AUDIO_TYPE_DEFAULT);
        }
        if(
        ( aa.mContentType == AudioAttributes.AUDIO_CONTENT_TYPE_SPEECH ) &&
        ( aa.mUsage == AudioAttributes.AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE ) &&
        ( type == CAR_AUDIO_TYPE_RADIO ) )
        -->
    <ProductStrategy name="radio">
        <AttributesGroup volumeGroup="media_car_audio_type_3">
            <ContentType value="AUDIO_CONTENT_TYPE_MUSIC"/>
            <Usage value="AUDIO_USAGE_MEDIA"/>
            <Bundle key="car_audio_type" value="3"/>
        </AttributesGroup>
    </ProductStrategy>
    <ProductStrategy name="ext_audio_source">
        <AttributesGroup volumeGroup="media_car_audio_type_7">
            <ContentType value="AUDIO_CONTENT_TYPE_MUSIC"/>
            <Usage value="AUDIO_USAGE_MEDIA"/>
            <Bundle key="car_audio_type" value="7"/>
        </AttributesGroup>
    </ProductStrategy>
    <ProductStrategy name="voice_command">
        <AttributesGroup volumeGroup="speech">
            <Attributes>
                <ContentType value="AUDIO_CONTENT_TYPE_SPEECH"/>
                <Usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"/>
                <!--  CAR_AUDIO_TYPE_VOICE_COMMAND = 1 -->
                <Bundle key="car_audio_type" value="1"/>
            </Attributes>
            <Attributes> <Usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY"/> </Attributes>
            <Attributes> <Usage value="AUDIO_USAGE_ASSISTANT"/> </Attributes>
        </AttributesGroup>
    </ProductStrategy>
    <ProductStrategy name="safety_alert">
        <AttributesGroup volumeGroup="system">
            <ContentType value="AUDIO_CONTENT_TYPE_SONIFICATION"/>
            <Usage value="AUDIO_USAGE_NOTIFICATION"/>
            <!--  CAR_AUDIO_TYPE_SAFETY_ALERT = 2 -->
            <Bundle key="car_audio_type" value="2"/>
        </AttributesGroup>
    </ProductStrategy>

    <!-- To be checked
    CAR_AUDIO_TYPE_CARSERVICE_BOTTOM
    CAR_AUDIO_TYPE_CARSERVICE_CAR_PROXY
    CAR_AUDIO_TYPE_CARSERVICE_MEDIA_MUTE
    -->

    <!-- Generic Usages -->
    <ProductStrategy name="music">
        <AttributesGroup streamType="AUDIO_STREAM_MUSIC" volumeGroup="media">
            <Attributes> <Usage value="AUDIO_USAGE_MEDIA"/> </Attributes>
            <Attributes> <Usage value="AUDIO_USAGE_GAME"/> </Attributes>
            <!-- Default product strategy has empty attributes -->
            <Attributes></Attributes>
        </AttributesGroup>
    </ProductStrategy>

    <ProductStrategy name="nav_guidance">
        <AttributesGroup volumeGroup="speech">
            <Usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"/>
        </AttributesGroup>
    </ProductStrategy>
    <ProductStrategy name="voice_call">
        <AttributesGroup streamType="AUDIO_STREAM_VOICE_CALL" volumeGroup="phone">
            <Attributes> <Usage value="AUDIO_USAGE_VOICE_COMMUNICATION"/> </Attributes>
            <Attributes> <Usage value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING"/> </Attributes>
        </AttributesGroup>
        <AttributesGroup streamType="AUDIO_STREAM_BLUETOOTH_SCO" volumeGroup="phone">
            <Attributes> <Flags value="AUDIO_FLAG_SCO"/> </Attributes>
        </AttributesGroup>
    </ProductStrategy>
    <ProductStrategy name="alarm">
        <AttributesGroup streamType="AUDIO_STREAM_ALARM" volumeGroup="ring">
            <Usage value="AUDIO_USAGE_ALARM"/>
        </AttributesGroup>
    </ProductStrategy>
    <ProductStrategy name="ring">
        <AttributesGroup streamType="AUDIO_STREAM_RING" volumeGroup="ring">
            <Usage value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE"/>
        </AttributesGroup>
    </ProductStrategy>
    <ProductStrategy name="notification">
        <AttributesGroup streamType="AUDIO_STREAM_NOTIFICATION" volumeGroup="ring">
            <Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION"/> </Attributes>
            <Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT"/> </Attributes>
            <Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED"/> </Attributes>
            <Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST"/> </Attributes>
            <Attributes> <Usage value="AUDIO_USAGE_NOTIFICATION_EVENT"/> </Attributes>
        </AttributesGroup>
    </ProductStrategy>
    <ProductStrategy name="system">
        <AttributesGroup streamType="AUDIO_STREAM_SYSTEM" volumeGroup="system">
            <Usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION"/>
        </AttributesGroup>
    </ProductStrategy>
    <ProductStrategy name="tts">
        <!-- TTS stream MUST BE MANAGED OUTSIDE default product strategy if NO DEDICATED OUTPUT
             for TTS, otherwise when beacon happens, default strategy is ... muted.
             If it is media, it is annoying... -->
        <AttributesGroup streamType="AUDIO_STREAM_TTS" volumeGroup="tts">
            <Attributes> <Flags value="AUDIO_FLAG_BEACON"/> </Attributes>
        </AttributesGroup>
    </ProductStrategy>
</ProductStrategies>
+192 −0
Original line number Diff line number Diff line
<?xml version='1.0' encoding='UTF-8'?>
<!-- Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
     -->

<!-- Volume Groups Tables included by Audio Policy Configuration file -->
<!-- Note:
        It is VALID to have a group without attributes if a product strategy is following
        this group for all attributes.
        Otherwise, attributes must be specified
-->

<volumeGroups>
    <volumeGroup>
        <name>oem_traffic_anouncement</name>
        <indexMin>0</indexMin>
        <indexMax>40</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,-4200</point>
            <point>33,-2800</point>
            <point>66,-1400</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_HEADSET">
            <point>0,-4200</point>
            <point>33,-2800</point>
            <point>66,-1400</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_EARPIECE">
            <point>0,-4200</point>
            <point>33,-2800</point>
            <point>66,-1400</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_EXT_MEDIA">
            <point>0,-4200</point>
            <point>33,-2800</point>
            <point>66,-1400</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>

<!-- OEM ADAS is a volume group that has a single port gain (this is the reason why it is a group
     but may host different streams.
     A priority must be given among them (either they are multualy excluisve, so the volume
     will be the one of the currently acitve stream, otherwise a priority must be given by
     any mean. -->
    <volumeGroup>
        <name>oem_adas_2</name>
        <indexMin>0</indexMin>
        <indexMax>40</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,-4200</point>
            <point>33,-2800</point>
            <point>66,-1400</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_HEADSET">
            <point>0,-4200</point>
            <point>33,-2800</point>
            <point>66,-1400</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>
    <volumeGroup>
        <name>oem_adas_3</name>
        <indexMin>0</indexMin>
        <indexMax>40</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,-2400</point>
            <point>33,-1600</point>
            <point>66,-800</point>
            <point>100,0</point>
        </volume>
        <volume deviceCategory="DEVICE_CATEGORY_EARPIECE">
            <point>0,-2400</point>
            <point>33,-1600</point>
            <point>66,-800</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>

<!-- MEDIA is a volume group that has a single port gain (this is the reason why it is a group
     but may host different streams.
     A priority must be given among them (either they are multualy exclusive, so the volume
     will be the one of the active stream with highest priority (ORDER MATTERS) unless the curves
     followed will the the curves for the requested attributes.-->
    <volumeGroup>
        <name>media_car_audio_type_3</name>
        <indexMin>0</indexMin>
        <indexMax>40</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,-4200</point>
            <point>33,-2800</point>
            <point>66,-1400</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>
    <volumeGroup>
        <name>media_car_audio_type_7</name>
        <indexMin>0</indexMin>
        <indexMax>40</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,-2400</point>
            <point>33,-1600</point>
            <point>66,-800</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>
    <volumeGroup>
        <name>media</name>
        <indexMin>0</indexMin>
        <indexMax>40</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,-2400</point>
            <point>33,-1600</point>
            <point>66,-800</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>

    <volumeGroup>
        <name>speech</name>
        <indexMin>1</indexMin>
        <indexMax>40</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,-4200</point>
            <point>33,-2800</point>
            <point>66,-1400</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>

    <volumeGroup>
        <name>system</name>
        <indexMin>0</indexMin>
        <indexMax>40</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,-4200</point>
            <point>33,-2800</point>
            <point>66,-1400</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>

    <volumeGroup>
        <name>phone</name>
        <indexMin>1</indexMin>
        <indexMax>40</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,-4200</point>
            <point>33,-2800</point>
            <point>66,-1400</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>

    <volumeGroup>
        <name>ring</name>
        <indexMin>0</indexMin>
        <indexMax>40</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,-4200</point>
            <point>33,-2800</point>
            <point>66,-1400</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>

    <volumeGroup>
        <name>tts</name>
        <indexMin>0</indexMin>
        <indexMax>15</indexMax>
        <volume deviceCategory="DEVICE_CATEGORY_SPEAKER">
            <point>0,-0</point>
            <point>100,0</point>
        </volume>
    </volumeGroup>
</volumeGroups>
+41 −11
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@

LOCAL_PATH := $(call my-dir)

ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),phone_configurable automotive_configurable no-output_configurable no-input_configurable))
ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),phone_configurable automotive_configurable caremu_configurable no-output_configurable no-input_configurable))

PFW_CORE := external/parameter-framework
#@TODO: upstream new domain generator
@@ -20,6 +20,8 @@ PFW_SCHEMAS_DIR := $(PFW_DEFAULT_SCHEMAS_DIR)
TOOLS := frameworks/av/services/audiopolicy/engineconfigurable/tools
BUILD_PFW_SETTINGS := $(TOOLS)/build_audio_pfw_settings.mk

PROVISION_STRATEGIES_STRUCTURE := $(TOOLS)/provision_strategies_structure.mk

endif

##################################################################
@@ -27,7 +29,7 @@ endif
##################################################################
######### Policy PFW top level file #########

ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),phone_configurable automotive_configurable))
ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),phone_configurable automotive_configurable caremu_configurable))

include $(CLEAR_VARS)
LOCAL_MODULE := ParameterFrameworkConfigurationPolicy.xml
@@ -51,13 +53,28 @@ include $(BUILD_PREBUILT)

########## Policy PFW Common Structures #########

include $(CLEAR_VARS)
LOCAL_MODULE := PolicySubsystem.xml
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_VENDOR_MODULE := true
LOCAL_REQUIRED_MODULES := \
    PolicySubsystem-CommonTypes.xml \
    ProductStrategies.xml \
    PolicySubsystem-Volume.xml \
    libpolicy-subsystem \

LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Structure/Policy
LOCAL_SRC_FILES := common/Structure/$(LOCAL_MODULE)
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)
LOCAL_MODULE := PolicySubsystem-CommonTypes.xml
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Structure/Policy
LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE)
LOCAL_SRC_FILES := common/Structure/$(LOCAL_MODULE)
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)
@@ -66,16 +83,29 @@ LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Structure/Policy
LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE)
LOCAL_SRC_FILES := common/Structure/$(LOCAL_MODULE)
include $(BUILD_PREBUILT)

endif #ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),phone_configurable automotive_configurable))

include $(CLEAR_VARS)
LOCAL_MODULE := ProductStrategies.xml
LOCAL_MODULE_CLASS := ETC
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Structure/Policy
LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_VENDOR_ETC)/audio_policy_engine_configuration.xml
AUDIO_POLICY_ENGINE_CONFIGURATION_FILE := \
    $(TARGET_OUT_VENDOR_ETC)/audio_policy_engine_configuration.xml
STRATEGIES_STRUCTURE_FILE := $(LOCAL_PATH)/common/Structure/$(LOCAL_MODULE).in

include $(PROVISION_STRATEGIES_STRUCTURE)

endif #ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),phone_configurable automotive_configurable caremu_configurable))

########## Policy PFW Example Structures #########
ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),no-output_configurable no-input_configurable))

include $(CLEAR_VARS)
LOCAL_MODULE := PolicySubsystem.xml.common
LOCAL_MODULE := PolicySubsystem-no-strategy.xml
LOCAL_MODULE_STEM := PolicySubsystem.xml
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
@@ -86,7 +116,7 @@ LOCAL_REQUIRED_MODULES := \
    libpolicy-subsystem \

LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Structure/Policy
LOCAL_SRC_FILES := Structure/$(LOCAL_MODULE_STEM)
LOCAL_SRC_FILES := common/Structure/$(LOCAL_MODULE_STEM)
include $(BUILD_PREBUILT)

endif # ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),no-output_configurable no-input_configurable))
@@ -95,7 +125,7 @@ endif # ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),$(filter $(BUILD_AUDIO
ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),no-output_configurable)

include $(CLEAR_VARS)
LOCAL_MODULE := parameter-framework.policy.no-output
LOCAL_MODULE := parameter-framework.policy
LOCAL_MODULE_STEM := PolicyConfigurableDomains-NoOutputDevice.xml
LOCAL_MODULE_CLASS := ETC
LOCAL_VENDOR_MODULE := true
@@ -103,7 +133,7 @@ LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Settings/Policy
LOCAL_REQUIRED_MODULES := \
    audio_policy_engine_criteria.xml \
    audio_policy_engine_criterion_types.xml \
    PolicySubsystem.xml.common \
    PolicySubsystem-no-strategy.xml \
    PolicyClass.xml \
    ParameterFrameworkConfigurationPolicy.xml

@@ -121,7 +151,7 @@ endif # ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),no-output_configurable
ifeq ($(BUILD_AUDIO_POLICY_EXAMPLE_CONFIGURATION),no-input_configurable)

include $(CLEAR_VARS)
LOCAL_MODULE := parameter-framework.policy.no-input
LOCAL_MODULE := parameter-framework.policy
LOCAL_MODULE_STEM := PolicyConfigurableDomains-NoInputDevice.xml
LOCAL_MODULE_CLASS := ETC
LOCAL_VENDOR_MODULE := true
@@ -129,7 +159,7 @@ LOCAL_MODULE_RELATIVE_PATH := parameter-framework/Settings/Policy
LOCAL_REQUIRED_MODULES := \
    audio_policy_engine_criteria.xml \
    audio_policy_engine_criterion_types.xml \
    PolicySubsystem.xml.common \
    PolicySubsystem-no-strategy.xml \
    PolicyClass.xml \
    ParameterFrameworkConfigurationPolicy.xml

Loading