Dongwon Kang | b188ad8 | 2018-11-09 16:05:43 -0800 | [diff] [blame] | 1 | // Copyright (C) 2018 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Bob Badour | 56786ac | 2021-02-25 15:24:36 -0800 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "frameworks_av_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["frameworks_av_license"], |
| 22 | } |
| 23 | |
Dongwon Kang | 28052d5 | 2019-02-14 21:49:08 -0800 | [diff] [blame] | 24 | apex_defaults { |
| 25 | name: "com.android.media-defaults", |
satayev | 26a0e1a | 2021-05-12 15:50:11 +0100 | [diff] [blame] | 26 | bootclasspath_fragments: ["com.android.media-bootclasspath-fragment"], |
satayev | 95eb9de | 2021-05-18 14:33:22 +0100 | [diff] [blame] | 27 | systemserverclasspath_fragments: ["com.android.media-systemserverclasspath-fragment"], |
Dongwon Kang | 8bd93d3 | 2019-05-03 14:58:08 +0000 | [diff] [blame] | 28 | multilib: { |
| 29 | first: { |
| 30 | // Extractor process runs only with the primary ABI. |
| 31 | native_shared_libs: [ |
| 32 | // Extractor plugins |
| 33 | "libaacextractor", |
| 34 | "libamrextractor", |
| 35 | "libflacextractor", |
| 36 | "libmidiextractor", |
| 37 | "libmkvextractor", |
| 38 | "libmp3extractor", |
| 39 | "libmp4extractor", |
| 40 | "libmpeg2extractor", |
| 41 | "liboggextractor", |
| 42 | "libwavextractor", |
| 43 | ], |
Chong Zhang | a2e3a04 | 2020-10-26 11:58:11 -0700 | [diff] [blame] | 44 | // Transcoding service only run with primary ABI. |
| 45 | binaries: [ |
| 46 | "mediatranscoding", |
| 47 | ], |
Dongwon Kang | 8bd93d3 | 2019-05-03 14:58:08 +0000 | [diff] [blame] | 48 | }, |
| 49 | }, |
Santiago Seifert | ef893d4 | 2020-11-13 17:36:40 +0000 | [diff] [blame] | 50 | // JNI |
Ray Essick | 1831f7b | 2021-03-15 16:10:51 -0700 | [diff] [blame] | 51 | native_shared_libs: [ |
| 52 | "libmediaparser-jni", |
| 53 | "libmediaformatshaper", |
| 54 | ], |
Santiago Seifert | ef893d4 | 2020-11-13 17:36:40 +0000 | [diff] [blame] | 55 | compile_multilib: "both", |
Marco Nelissen | 80e1a6d | 2019-04-30 15:52:10 -0700 | [diff] [blame] | 56 | prebuilts: [ |
Ray Essick | 4457486 | 2020-02-13 12:39:14 -0800 | [diff] [blame] | 57 | "code_coverage.policy", |
Chong Zhang | a2e3a04 | 2020-10-26 11:58:11 -0700 | [diff] [blame] | 58 | "com.android.media-mediatranscoding.rc", |
Ray Essick | 4457486 | 2020-02-13 12:39:14 -0800 | [diff] [blame] | 59 | "crash_dump.policy", |
Chong Zhang | a2e3a04 | 2020-10-26 11:58:11 -0700 | [diff] [blame] | 60 | "mediaextractor.policy", |
| 61 | "media-linker-config", |
Marco Nelissen | 80e1a6d | 2019-04-30 15:52:10 -0700 | [diff] [blame] | 62 | ], |
Dongwon Kang | 1d3b2e7 | 2018-11-13 13:58:38 -0800 | [diff] [blame] | 63 | key: "com.android.media.key", |
Jiyong Park | 3ef4f71 | 2019-02-11 11:00:31 +0900 | [diff] [blame] | 64 | certificate: ":com.android.media.certificate", |
Jeff Hamilton | 0bce0c6 | 2019-03-06 22:23:40 -0500 | [diff] [blame] | 65 | |
| 66 | // Use a custom AndroidManifest.xml used for API targeting. |
| 67 | androidManifest: ":com.android.media-androidManifest", |
Jooyung Han | 97d7b65 | 2020-03-12 18:22:20 +0900 | [diff] [blame] | 68 | |
Gurpreet Singh | 0263a6d | 2022-03-04 14:43:33 +0000 | [diff] [blame] | 69 | // IMPORTANT: q-launched-apex-module enables the build system to make |
Jooyung Han | 97d7b65 | 2020-03-12 18:22:20 +0900 | [diff] [blame] | 70 | // sure the package compatible to Android 10 in two ways: |
| 71 | // - build the APEX package compatible to Android 10 |
| 72 | // so that the package can be installed. |
| 73 | // - build artifacts (lib/javalib/bin) against Android 10 SDK |
| 74 | // so that the artifacts can run. |
Gurpreet Singh | 0263a6d | 2022-03-04 14:43:33 +0000 | [diff] [blame] | 75 | defaults: ["q-launched-apex-module"], |
Nikita Ioffe | 9235328 | 2021-02-04 01:20:01 +0000 | [diff] [blame] | 76 | // Indicates that pre-installed version of this apex can be compressed. |
| 77 | // Whether it actually will be compressed is controlled on per-device basis. |
| 78 | compressible: true, |
Dongwon Kang | b188ad8 | 2018-11-09 16:05:43 -0800 | [diff] [blame] | 79 | } |
| 80 | |
Chong Zhang | 0b83feb | 2018-12-20 17:44:13 -0800 | [diff] [blame] | 81 | apex { |
Dongwon Kang | 28052d5 | 2019-02-14 21:49:08 -0800 | [diff] [blame] | 82 | name: "com.android.media", |
| 83 | manifest: "manifest.json", |
| 84 | defaults: ["com.android.media-defaults"], |
Anton Hansson | 8aad6e5 | 2021-05-20 18:00:07 +0100 | [diff] [blame] | 85 | prebuilts: ["current_sdkinfo"], |
Kiyoung Kim | 0c5ccf4 | 2020-09-09 14:17:30 +0900 | [diff] [blame] | 86 | } |
| 87 | |
Kiyoung Kim | b5aa33d | 2020-10-06 17:43:40 +0900 | [diff] [blame] | 88 | linker_config { |
Kiyoung Kim | 0c5ccf4 | 2020-09-09 14:17:30 +0900 | [diff] [blame] | 89 | name: "media-linker-config", |
Kiyoung Kim | b5aa33d | 2020-10-06 17:43:40 +0900 | [diff] [blame] | 90 | src: "linker.config.json", |
Kiyoung Kim | 0c5ccf4 | 2020-09-09 14:17:30 +0900 | [diff] [blame] | 91 | installable: false, |
Dongwon Kang | 28052d5 | 2019-02-14 21:49:08 -0800 | [diff] [blame] | 92 | } |
| 93 | |
satayev | 26a0e1a | 2021-05-12 15:50:11 +0100 | [diff] [blame] | 94 | // Encapsulate the contributions made by the com.android.media to the bootclasspath. |
| 95 | bootclasspath_fragment { |
| 96 | name: "com.android.media-bootclasspath-fragment", |
| 97 | contents: ["updatable-media"], |
| 98 | apex_available: ["com.android.media"], |
Paul Duffin | 4451776 | 2021-06-29 01:58:33 +0100 | [diff] [blame] | 99 | |
| 100 | api: { |
| 101 | stub_libs: [ |
| 102 | // Stubs for the APIs provided by updatable-media. This has to be |
| 103 | // specified explicitly because updatable-media is not a |
| 104 | // java_sdk_library. |
| 105 | "framework-media", |
| 106 | ], |
| 107 | }, |
| 108 | |
| 109 | // The bootclasspath_fragments that provide APIs on which this depends. |
| 110 | fragments: [ |
| 111 | { |
| 112 | apex: "com.android.art", |
| 113 | module: "art-bootclasspath-fragment", |
| 114 | }, |
| 115 | ], |
| 116 | |
| 117 | // Additional stubs libraries that this fragment's contents use which are |
| 118 | // not provided by another bootclasspath_fragment. |
| 119 | additional_stubs: [ |
| 120 | "android-non-updatable", |
| 121 | ], |
| 122 | |
| 123 | // Additional hidden API flag files to override the defaults. This must only be |
| 124 | // modified by the Soong or platform compat team. |
| 125 | hidden_api: { |
| 126 | max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"], |
Paul Duffin | 820590b | 2022-03-21 16:25:55 +0000 | [diff] [blame^] | 127 | |
| 128 | // The following packages contain classes from other modules on the |
| 129 | // bootclasspath. That means that the hidden API flags for this module |
| 130 | // has to explicitly list every single class this module provides in |
| 131 | // that package to differentiate them from the classes provided by other |
| 132 | // modules. That can include private classes that are not part of the |
| 133 | // API. |
| 134 | split_packages: [ |
| 135 | "android.media", |
| 136 | ], |
| 137 | |
| 138 | // The following packages and all their subpackages currently only |
| 139 | // contain classes from this bootclasspath_fragment. Listing a package |
| 140 | // here won't prevent other bootclasspath modules from adding classes in |
| 141 | // any of those packages but it will prevent them from adding those |
| 142 | // classes into an API surface, e.g. public, system, etc.. Doing so will |
| 143 | // result in a build failure due to inconsistent flags. |
| 144 | package_prefixes: [ |
| 145 | "android.media.internal", |
| 146 | ], |
Paul Duffin | 4451776 | 2021-06-29 01:58:33 +0100 | [diff] [blame] | 147 | }, |
satayev | 26a0e1a | 2021-05-12 15:50:11 +0100 | [diff] [blame] | 148 | } |
| 149 | |
satayev | 95eb9de | 2021-05-18 14:33:22 +0100 | [diff] [blame] | 150 | // Encapsulate the contributions made by the com.android.media to the systemserverclasspath. |
| 151 | systemserverclasspath_fragment { |
| 152 | name: "com.android.media-systemserverclasspath-fragment", |
| 153 | contents: ["service-media-s"], |
| 154 | apex_available: ["com.android.media"], |
| 155 | } |
| 156 | |
Jeff Hamilton | 0bce0c6 | 2019-03-06 22:23:40 -0500 | [diff] [blame] | 157 | filegroup { |
| 158 | name: "com.android.media-androidManifest", |
| 159 | srcs: ["AndroidManifest-media.xml"], |
| 160 | } |
| 161 | |
| 162 | filegroup { |
| 163 | name: "com.android.media.swcodec-androidManifest", |
| 164 | srcs: ["AndroidManifest-swcodec.xml"], |
| 165 | } |
| 166 | |
Dongwon Kang | 28052d5 | 2019-02-14 21:49:08 -0800 | [diff] [blame] | 167 | apex_defaults { |
| 168 | name: "com.android.media.swcodec-defaults", |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 169 | binaries: [ |
| 170 | "mediaswcodec", |
| 171 | ], |
Chong Zhang | 9206c3a | 2020-12-15 10:00:00 -0800 | [diff] [blame] | 172 | native_shared_libs: [ |
Wonsik Kim | a5a1ad1 | 2021-02-19 12:09:38 -0800 | [diff] [blame] | 173 | "libcodec2_hidl@1.0", |
| 174 | "libcodec2_hidl@1.1", |
Sungtak Lee | 8577dab | 2021-03-12 02:25:50 -0800 | [diff] [blame] | 175 | "libcodec2_hidl@1.2", |
Chong Zhang | 9206c3a | 2020-12-15 10:00:00 -0800 | [diff] [blame] | 176 | "libstagefright_foundation", |
| 177 | ], |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 178 | prebuilts: [ |
| 179 | "com.android.media.swcodec-mediaswcodec.rc", |
| 180 | "com.android.media.swcodec-ld.config.txt", |
| 181 | "mediaswcodec.policy", |
Ray Essick | 4457486 | 2020-02-13 12:39:14 -0800 | [diff] [blame] | 182 | "code_coverage.policy", |
| 183 | "crash_dump.policy", |
Lajos Molnar | 882d238 | 2019-04-08 17:47:33 -0700 | [diff] [blame] | 184 | "mediaswcodec.xml", |
Chong Zhang | 0b83feb | 2018-12-20 17:44:13 -0800 | [diff] [blame] | 185 | ], |
Chong Zhang | 0b83feb | 2018-12-20 17:44:13 -0800 | [diff] [blame] | 186 | key: "com.android.media.swcodec.key", |
Jiyong Park | 7705791 | 2019-02-11 12:30:20 +0900 | [diff] [blame] | 187 | certificate: ":com.android.media.swcodec.certificate", |
Jeff Hamilton | 0bce0c6 | 2019-03-06 22:23:40 -0500 | [diff] [blame] | 188 | |
| 189 | // Use a custom AndroidManifest.xml used for API targeting. |
| 190 | androidManifest: ":com.android.media.swcodec-androidManifest", |
Jooyung Han | 97d7b65 | 2020-03-12 18:22:20 +0900 | [diff] [blame] | 191 | |
Gurpreet Singh | 0263a6d | 2022-03-04 14:43:33 +0000 | [diff] [blame] | 192 | // IMPORTANT: q-launched-apex-module enables the build system to make |
Jooyung Han | 97d7b65 | 2020-03-12 18:22:20 +0900 | [diff] [blame] | 193 | // sure the package compatible to Android 10 in two ways: |
| 194 | // - build the APEX package compatible to Android 10 |
| 195 | // so that the package can be installed. |
| 196 | // - build artifacts (lib/javalib/bin) against Android 10 SDK |
| 197 | // so that the artifacts can run. |
Gurpreet Singh | 0263a6d | 2022-03-04 14:43:33 +0000 | [diff] [blame] | 198 | defaults: ["q-launched-apex-module"], |
Nikita Ioffe | 9235328 | 2021-02-04 01:20:01 +0000 | [diff] [blame] | 199 | // Indicates that pre-installed version of this apex can be compressed. |
| 200 | // Whether it actually will be compressed is controlled on per-device basis. |
| 201 | compressible: true, |
Chong Zhang | 0b83feb | 2018-12-20 17:44:13 -0800 | [diff] [blame] | 202 | } |
| 203 | |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 204 | prebuilt_etc { |
Chong Zhang | a2e3a04 | 2020-10-26 11:58:11 -0700 | [diff] [blame] | 205 | name: "com.android.media-mediatranscoding.rc", |
| 206 | src: "mediatranscoding.rc", |
| 207 | filename: "init.rc", |
| 208 | installable: false, |
| 209 | } |
| 210 | |
| 211 | prebuilt_etc { |
Chong Zhang | 9bda452 | 2019-02-27 13:43:50 -0800 | [diff] [blame] | 212 | name: "com.android.media.swcodec-mediaswcodec.rc", |
| 213 | src: "mediaswcodec.rc", |
| 214 | filename: "init.rc", |
| 215 | installable: false, |
| 216 | } |
| 217 | |
| 218 | prebuilt_etc { |
| 219 | name: "com.android.media.swcodec-ld.config.txt", |
| 220 | src: "ld.config.txt", |
| 221 | filename: "ld.config.txt", |
| 222 | installable: false, |
| 223 | } |
| 224 | |
Dongwon Kang | 28052d5 | 2019-02-14 21:49:08 -0800 | [diff] [blame] | 225 | apex { |
| 226 | name: "com.android.media.swcodec", |
| 227 | manifest: "manifest_codec.json", |
| 228 | defaults: ["com.android.media.swcodec-defaults"], |
| 229 | } |
| 230 | |
Dongwon Kang | b188ad8 | 2018-11-09 16:05:43 -0800 | [diff] [blame] | 231 | apex_key { |
Dongwon Kang | 1d3b2e7 | 2018-11-13 13:58:38 -0800 | [diff] [blame] | 232 | name: "com.android.media.key", |
Jiyong Park | 7733ba6 | 2018-11-22 16:28:07 +0900 | [diff] [blame] | 233 | public_key: "com.android.media.avbpubkey", |
| 234 | private_key: "com.android.media.pem", |
Dongwon Kang | b188ad8 | 2018-11-09 16:05:43 -0800 | [diff] [blame] | 235 | } |
Chong Zhang | 0b83feb | 2018-12-20 17:44:13 -0800 | [diff] [blame] | 236 | |
| 237 | apex_key { |
| 238 | name: "com.android.media.swcodec.key", |
| 239 | public_key: "com.android.media.swcodec.avbpubkey", |
| 240 | private_key: "com.android.media.swcodec.pem", |
| 241 | } |
Jiyong Park | 3ef4f71 | 2019-02-11 11:00:31 +0900 | [diff] [blame] | 242 | |
| 243 | android_app_certificate { |
| 244 | name: "com.android.media.certificate", |
| 245 | certificate: "com.android.media", |
| 246 | } |
Jiyong Park | 7705791 | 2019-02-11 12:30:20 +0900 | [diff] [blame] | 247 | |
| 248 | android_app_certificate { |
| 249 | name: "com.android.media.swcodec.certificate", |
| 250 | certificate: "com.android.media.swcodec", |
| 251 | } |