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 Car Emulator configuration example
18
19soong_namespace {
20    imports: [
21        "frameworks/av/services/audiopolicy/config",
22        "frameworks/av/services/audiopolicy/engineconfigurable/config/example/caremu",
23        "frameworks/av/services/audiopolicy/engineconfigurable/parameter-framework/examples/Car",
24    ],
25}
26
27//
28// Generate Audio Policy Parameter Framework Product Strategies Structure file from template
29//
30package {
31    default_team: "trendy_team_android_media_audio_framework",
32    // See: http://go/android-license-faq
33    // A large-scale-change added 'default_applicable_licenses' to import
34    // all of the 'license_kinds' from "frameworks_av_license"
35    // to get the below license kinds:
36    //   SPDX-license-identifier-Apache-2.0
37    default_applicable_licenses: ["frameworks_av_license"],
38}
39
40prebuilt_etc {
41    name: "ProductStrategies.xml",
42    vendor: true,
43    src: ":buildstrategiesstructure_gen",
44    sub_dir: "parameter-framework/Structure/Policy",
45    required: ["libpolicy-subsystem"],
46}
47
48genrule {
49    name: "buildstrategiesstructure_gen",
50    defaults: ["buildstrategiesstructurerule"],
51    srcs: [
52        ":audio_policy_engine_configuration_files",
53    ],
54}
55
56//
57// Generate Audio Policy Parameter Framework Configurable Domains
58//
59prebuilt_etc {
60    name: "parameter-framework.policy",
61    enabled: false, // TODO: This module depends on domaingeneratorpolicyrule_gen, which fails to build
62    filename_from_src: true,
63    vendor: true,
64    src: ":domaingeneratorpolicyrule_gen",
65    sub_dir: "parameter-framework/Settings/Policy",
66    required: [
67        "PolicyClass.xml",
68        "PolicySubsystem-CommonTypes.xml",
69        "PolicySubsystem.xml",
70        "ProductStrategies.xml",
71    ],
72}
73
74genrule {
75    name: "domaingeneratorpolicyrule_gen",
76    enabled: false, // TODO: This module fails to build
77    defaults: ["domaingeneratorpolicyrule"],
78    srcs: [
79        ":audio_policy_engine_criterion_types",
80        ":audio_policy_pfw_structure_files",
81        ":audio_policy_pfw_toplevel",
82        ":edd_files",
83    ],
84}
85
86filegroup {
87    name: "edd_files",
88    srcs: [
89        ":device_for_input_source.pfw",
90        ":volumes.pfw",
91        "Settings/device_for_product_strategies.pfw",
92    ],
93}
94
95// This is for Settings generation, must use socket port, so userdebug version is required
96filegroup {
97    name: "audio_policy_pfw_toplevel",
98    srcs: [":ParameterFrameworkConfigurationPolicy.userdebug.xml"],
99}
100
101filegroup {
102    name: "audio_policy_pfw_structure_files",
103    srcs: [
104        ":PolicyClass",
105        ":PolicySubsystem",
106        ":buildcommontypesstructure_gen",
107        ":buildstrategiesstructure_gen",
108    ],
109}
110