forked from AOSPA/android_frameworks_av
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAndroid.bp
274 lines (244 loc) · 9.07 KB
/
Android.bp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
// 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.
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "frameworks_av_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["frameworks_av_license"],
}
apex_defaults {
name: "com.android.media-defaults",
bootclasspath_fragments: ["com.android.media-bootclasspath-fragment"],
systemserverclasspath_fragments: ["com.android.media-systemserverclasspath-fragment"],
multilib: {
first: {
// Extractor process runs only with the primary ABI.
native_shared_libs: [
// Extractor plugins
"libaacextractor",
"libamrextractor",
"libflacextractor",
"libmidiextractor",
"libmkvextractor",
"libmp3extractor",
"libmp4extractor",
"libmpeg2extractor",
"liboggextractor",
"libwavextractor",
],
// Transcoding service only run with primary ABI.
binaries: [
"mediatranscoding",
],
},
},
// JNI
native_shared_libs: [
"libmediaparser-jni",
"libmediaformatshaper",
],
compile_multilib: "both",
prebuilts: [
"code_coverage.policy",
"com.android.media-mediatranscoding.rc",
"com.android.media-mediatranscoding.32rc",
"crash_dump.policy",
"mediaextractor.policy",
"media-linker-config",
],
key: "com.android.media.key",
certificate: ":com.android.media.certificate",
// Use a custom AndroidManifest.xml used for API targeting.
androidManifest: ":com.android.media-androidManifest",
// IMPORTANT: q-launched-dcla-enabled-apex-module enables the build system to make
// sure the package compatible to Android 10 in two ways(if flag APEX_BUILD_FOR_PRE_S_DEVICES=1
// is set):
// - build the APEX package compatible to Android 10
// so that the package can be installed.
// - build artifacts (lib/javalib/bin) against Android 10 SDK
// so that the artifacts can run.
// If the flag is not set, the package is built to be compatible with Android 12.
defaults: ["q-launched-dcla-enabled-apex-module"],
// Indicates that pre-installed version of this apex can be compressed.
// Whether it actually will be compressed is controlled on per-device basis.
compressible: true,
}
apex {
name: "com.android.media",
manifest: "manifest.json",
defaults: ["com.android.media-defaults"],
prebuilts: ["current_sdkinfo"],
}
linker_config {
name: "media-linker-config",
src: "linker.config.json",
installable: false,
}
// Encapsulate the contributions made by the com.android.media to the bootclasspath.
bootclasspath_fragment {
name: "com.android.media-bootclasspath-fragment",
contents: ["updatable-media"],
apex_available: ["com.android.media"],
api: {
stub_libs: [
// Stubs for the APIs provided by updatable-media. This has to be
// specified explicitly because updatable-media is not a
// java_sdk_library.
"framework-media",
],
},
// The bootclasspath_fragments that provide APIs on which this depends.
fragments: [
{
apex: "com.android.art",
module: "art-bootclasspath-fragment",
},
],
// Additional stubs libraries that this fragment's contents use which are
// not provided by another bootclasspath_fragment.
additional_stubs: [
"android-non-updatable",
],
// Additional hidden API flag files to override the defaults. This must only be
// modified by the Soong or platform compat team.
hidden_api: {
max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"],
// The following packages contain classes from other modules on the
// bootclasspath. That means that the hidden API flags for this module
// has to explicitly list every single class this module provides in
// that package to differentiate them from the classes provided by other
// modules. That can include private classes that are not part of the
// API.
split_packages: [
"android.media",
],
// The following packages and all their subpackages currently only
// contain classes from this bootclasspath_fragment. Listing a package
// here won't prevent other bootclasspath modules from adding classes in
// any of those packages but it will prevent them from adding those
// classes into an API surface, e.g. public, system, etc.. Doing so will
// result in a build failure due to inconsistent flags.
package_prefixes: [
"android.media.internal",
],
},
}
// Encapsulate the contributions made by the com.android.media to the systemserverclasspath.
systemserverclasspath_fragment {
name: "com.android.media-systemserverclasspath-fragment",
contents: ["service-media-s"],
apex_available: ["com.android.media"],
}
filegroup {
name: "com.android.media-androidManifest",
srcs: ["AndroidManifest-media.xml"],
}
filegroup {
name: "com.android.media.swcodec-androidManifest",
srcs: ["AndroidManifest-swcodec.xml"],
}
apex_defaults {
name: "com.android.media.swcodec-defaults",
binaries: [
"mediaswcodec",
],
native_shared_libs: [
"libstagefright_foundation",
],
prebuilts: [
"com.android.media.swcodec-mediaswcodec.rc",
"com.android.media.swcodec-mediaswcodec.32rc",
"com.android.media.swcodec-ld.config.txt",
"mediaswcodec.policy",
"code_coverage.policy",
"crash_dump.policy",
"mediaswcodec.xml",
],
key: "com.android.media.swcodec.key",
certificate: ":com.android.media.swcodec.certificate",
// Use a custom AndroidManifest.xml used for API targeting.
androidManifest: ":com.android.media.swcodec-androidManifest",
// IMPORTANT: q-launched-dcla-enabled-apex-module enables the build system to make
// sure the package compatible to Android 10 in two ways(if flag APEX_BUILD_FOR_PRE_S_DEVICES=1
// is set):
// - build the APEX package compatible to Android 10
// so that the package can be installed.
// - build artifacts (lib/javalib/bin) against Android 10 SDK
// so that the artifacts can run.
// If the flag is not set, the package is built to be compatible with Android 12.
defaults: ["q-launched-dcla-enabled-apex-module"],
// Indicates that pre-installed version of this apex can be compressed.
// Whether it actually will be compressed is controlled on per-device basis.
compressible: true,
}
// install as mediatranscoding.* and mediaswcodec.* instead of init.*
// so we are ready for day we have more than 1 *rc file within the apex.
prebuilt_etc {
name: "com.android.media-mediatranscoding.rc",
src: "mediatranscoding.rc",
filename: "mediatranscoding.rc",
installable: false,
}
prebuilt_etc {
name: "com.android.media-mediatranscoding.32rc",
src: "mediatranscoding.32rc",
filename: "mediatranscoding.32rc",
installable: false,
}
prebuilt_etc {
name: "com.android.media.swcodec-mediaswcodec.rc",
src: "mediaswcodec.rc",
filename: "mediaswcodec.rc",
installable: false,
}
prebuilt_etc {
name: "com.android.media.swcodec-mediaswcodec.32rc",
src: "mediaswcodec.32rc",
filename: "mediaswcodec.32rc",
installable: false,
}
prebuilt_etc {
name: "com.android.media.swcodec-ld.config.txt",
src: "ld.config.txt",
filename: "ld.config.txt",
installable: false,
}
apex {
name: "com.android.media.swcodec",
manifest: "manifest_codec.json",
defaults: ["com.android.media.swcodec-defaults"],
}
apex_key {
name: "com.android.media.key",
public_key: "com.android.media.avbpubkey",
private_key: "com.android.media.pem",
}
apex_key {
name: "com.android.media.swcodec.key",
public_key: "com.android.media.swcodec.avbpubkey",
private_key: "com.android.media.swcodec.pem",
}
android_app_certificate {
name: "com.android.media.certificate",
certificate: "com.android.media",
}
android_app_certificate {
name: "com.android.media.swcodec.certificate",
certificate: "com.android.media.swcodec",
}