1// Copyright (C) 2019 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    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19apex {
20    name: "com.android.permission",
21    defaults: ["com.android.permission-defaults"],
22    manifest: "apex_manifest.json",
23}
24
25apex_defaults {
26    name: "com.android.permission-defaults",
27    updatable: true,
28    min_sdk_version: "30",
29    bootclasspath_fragments: ["com.android.permission-bootclasspath-fragment"],
30    systemserverclasspath_fragments: ["com.android.permission-systemserverclasspath-fragment"],
31    prebuilts: ["current_sdkinfo"],
32    key: "com.android.permission.key",
33    certificate: ":com.android.permission.certificate",
34    apps: ["PermissionController"],
35    // Indicates that pre-installed version of this apex can be compressed.
36    // Whether it actually will be compressed is controlled on per-device basis.
37    compressible: true,
38}
39
40apex_key {
41    name: "com.android.permission.key",
42    public_key: "com.android.permission.avbpubkey",
43    private_key: "com.android.permission.pem",
44}
45
46android_app_certificate {
47    name: "com.android.permission.certificate",
48    certificate: "com.android.permission",
49}
50
51filegroup {
52    name: "permission-jarjar-rules",
53    srcs: ["jarjar-rules.txt"],
54}
55
56sdk {
57    name: "permission-module-sdk",
58    bootclasspath_fragments: ["com.android.permission-bootclasspath-fragment"],
59    java_sdk_libs: ["service-permission"],
60}
61
62// Encapsulate the contributions made by the com.android.permission to the bootclasspath.
63bootclasspath_fragment {
64    name: "com.android.permission-bootclasspath-fragment",
65    contents: [
66      "framework-permission",
67      "framework-permission-s",
68    ],
69    apex_available: ["com.android.permission"],
70
71    // The bootclasspath_fragments that provide APIs on which this depends.
72    fragments: [
73        {
74            apex: "com.android.art",
75            module: "art-bootclasspath-fragment",
76        },
77    ],
78
79    // Additional stubs libraries that this fragment's contents use which are
80    // not provided by another bootclasspath_fragment.
81    additional_stubs: [
82        "android-non-updatable",
83    ],
84}
85
86// Encapsulate the contributions made by the com.android.permission to the systemserverclasspath.
87systemserverclasspath_fragment {
88    name: "com.android.permission-systemserverclasspath-fragment",
89    contents: ["service-permission"],
90    apex_available: ["com.android.permission"],
91}
92