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