1/* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17// Import this namespace in order to use AOSP Phone configuration example 18 19soong_namespace { 20 imports: [ 21 "frameworks/av/services/audiopolicy/engineconfigurable/config/example/phone", 22 "frameworks/av/services/audiopolicy/config", 23 ], 24} 25 26// 27// Generate Audio Policy Parameter Framework Product Strategies Structure file from template 28// 29package { 30 // See: http://go/android-license-faq 31 // A large-scale-change added 'default_applicable_licenses' to import 32 // all of the 'license_kinds' from "frameworks_av_license" 33 // to get the below license kinds: 34 // SPDX-license-identifier-Apache-2.0 35 default_applicable_licenses: ["frameworks_av_license"], 36} 37 38prebuilt_etc { 39 name: "ProductStrategies.xml", 40 vendor: true, 41 src: ":buildstrategiesstructure_gen", 42 sub_dir: "parameter-framework/Structure/Policy", 43 required: ["libpolicy-subsystem"], 44} 45genrule { 46 name: "buildstrategiesstructure_gen", 47 defaults: ["buildstrategiesstructurerule"], 48 srcs: [ 49 ":audio_policy_engine_configuration_files", 50 ], 51} 52 53// 54// Generate Audio Policy Parameter Framework Configurable Domains 55// 56prebuilt_etc { 57 name: "parameter-framework.policy", 58 filename_from_src: true, 59 vendor: true, 60 src: ":domaingeneratorpolicyrule_gen", 61 sub_dir: "parameter-framework/Settings/Policy", 62 required: [ 63 "ProductStrategies.xml", 64 "PolicyClass.xml", 65 "PolicySubsystem.xml", 66 "PolicySubsystem-CommonTypes.xml", 67 ], 68} 69genrule { 70 name: "domaingeneratorpolicyrule_gen", 71 defaults: ["domaingeneratorpolicyrule"], 72 srcs: [ 73 ":audio_policy_pfw_toplevel", 74 ":audio_policy_pfw_structure_files", 75 ":audio_policy_engine_criterion_types", 76 ":edd_files", 77 ], 78} 79filegroup { 80 name: "edd_files", 81 srcs: [ 82 ":device_for_input_source.pfw", 83 ":volumes.pfw", 84 "Settings/device_for_product_strategy_media.pfw", 85 "Settings/device_for_product_strategy_accessibility.pfw", 86 "Settings/device_for_product_strategy_dtmf.pfw", 87 "Settings/device_for_product_strategy_enforced_audible.pfw", 88 "Settings/device_for_product_strategy_phone.pfw", 89 "Settings/device_for_product_strategy_sonification.pfw", 90 "Settings/device_for_product_strategy_sonification_respectful.pfw", 91 "Settings/device_for_product_strategy_transmitted_through_speaker.pfw", 92 "Settings/device_for_product_strategy_rerouting.pfw", 93 "Settings/device_for_product_strategy_patch.pfw", 94 ], 95} 96// This is for Settings generation, must use socket port, so userdebug version is required 97filegroup { 98 name: "audio_policy_pfw_toplevel", 99 srcs: [":ParameterFrameworkConfigurationPolicy.userdebug.xml"], 100} 101filegroup { 102 name: "audio_policy_pfw_structure_files", 103 srcs: [ 104 ":PolicyClass", 105 ":PolicySubsystem", 106 ":buildcommontypesstructure_gen", 107 ":buildstrategiesstructure_gen", 108 ], 109} 110