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
15apex_defaults {
16    name: "com.android.media-defaults",
17    java_libs: ["updatable-media"],
18    multilib: {
19        first: {
20            // Extractor process runs only with the primary ABI.
21            native_shared_libs: [
22                // Extractor plugins
23                "libaacextractor",
24                "libamrextractor",
25                "libflacextractor",
26                "libmidiextractor",
27                "libmkvextractor",
28                "libmp3extractor",
29                "libmp4extractor",
30                "libmpeg2extractor",
31                "liboggextractor",
32                "libwavextractor",
33            ],
34        },
35    },
36    prebuilts: [
37        "mediaextractor.policy",
38    ],
39    key: "com.android.media.key",
40    certificate: ":com.android.media.certificate",
41
42    // Use a custom AndroidManifest.xml used for API targeting.
43    androidManifest: ":com.android.media-androidManifest",
44}
45
46apex {
47    name: "com.android.media",
48    manifest: "manifest.json",
49    defaults: ["com.android.media-defaults"],
50}
51
52filegroup {
53    name: "com.android.media-androidManifest",
54    srcs: ["AndroidManifest-media.xml"],
55}
56
57filegroup {
58    name: "com.android.media.swcodec-androidManifest",
59    srcs: ["AndroidManifest-swcodec.xml"],
60}
61
62apex_defaults {
63    name: "com.android.media.swcodec-defaults",
64    binaries: [
65        "mediaswcodec",
66    ],
67    prebuilts: [
68        "com.android.media.swcodec-mediaswcodec.rc",
69        "com.android.media.swcodec-ld.config.txt",
70        "mediaswcodec.policy",
71        "mediaswcodec.xml",
72    ],
73    use_vendor: true,
74    key: "com.android.media.swcodec.key",
75    certificate: ":com.android.media.swcodec.certificate",
76
77    // Use a custom AndroidManifest.xml used for API targeting.
78    androidManifest: ":com.android.media.swcodec-androidManifest",
79}
80
81prebuilt_etc {
82    name: "com.android.media.swcodec-mediaswcodec.rc",
83    src: "mediaswcodec.rc",
84    filename: "init.rc",
85    installable: false,
86}
87
88prebuilt_etc {
89    name: "com.android.media.swcodec-ld.config.txt",
90    src: "ld.config.txt",
91    filename: "ld.config.txt",
92    installable: false,
93}
94
95apex {
96    name: "com.android.media.swcodec",
97    manifest: "manifest_codec.json",
98    defaults: ["com.android.media.swcodec-defaults"],
99}
100
101apex_key {
102    name: "com.android.media.key",
103    public_key: "com.android.media.avbpubkey",
104    private_key: "com.android.media.pem",
105}
106
107apex_key {
108    name: "com.android.media.swcodec.key",
109    public_key: "com.android.media.swcodec.avbpubkey",
110    private_key: "com.android.media.swcodec.pem",
111}
112
113android_app_certificate {
114    name: "com.android.media.certificate",
115    certificate: "com.android.media",
116}
117
118android_app_certificate {
119    name: "com.android.media.swcodec.certificate",
120    certificate: "com.android.media.swcodec",
121}
122