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 default_visibility: [":__subpackages__"], 18} 19 20apex { 21 name: "com.android.permission", 22 defaults: ["com.android.permission-defaults"], 23 manifest: "apex_manifest.json", 24} 25 26apex_defaults { 27 name: "com.android.permission-defaults", 28 defaults: ["r-launched-apex-module"], 29 bootclasspath_fragments: ["com.android.permission-bootclasspath-fragment"], 30 systemserverclasspath_fragments: ["com.android.permission-systemserverclasspath-fragment"], 31 prebuilts: [ 32 "current_sdkinfo", 33 "privapp_allowlist_com.android.permissioncontroller.xml", 34 ], 35 key: "com.android.permission.key", 36 certificate: ":com.android.permission.certificate", 37 apps: [ 38 "PermissionController", 39 "SafetyCenterResources", 40 ], 41 // Indicates that pre-installed version of this apex can be compressed. 42 // Whether it actually will be compressed is controlled on per-device basis. 43 compressible: true, 44} 45 46apex_key { 47 name: "com.android.permission.key", 48 public_key: "com.android.permission.avbpubkey", 49 private_key: "com.android.permission.pem", 50} 51 52android_app_certificate { 53 name: "com.android.permission.certificate", 54 certificate: "com.android.permission", 55} 56 57sdk { 58 name: "permission-module-sdk", 59 apexes: [ 60 // Adds exportable dependencies of the APEX to the sdk, 61 // e.g. *classpath_fragments. 62 "com.android.permission", 63 ], 64} 65 66// Encapsulate the contributions made by the com.android.permission to the bootclasspath. 67bootclasspath_fragment { 68 name: "com.android.permission-bootclasspath-fragment", 69 contents: [ 70 "framework-permission", 71 "framework-permission-s", 72 ], 73 apex_available: ["com.android.permission"], 74 75 // The bootclasspath_fragments that provide APIs on which this depends. 76 fragments: [ 77 { 78 apex: "com.android.art", 79 module: "art-bootclasspath-fragment", 80 }, 81 ], 82 83 // Additional stubs libraries that this fragment's contents use which are 84 // not provided by another bootclasspath_fragment. 85 additional_stubs: [ 86 "android-non-updatable", 87 ], 88 89 hidden_api: { 90 // The following packages contain classes from other modules on the 91 // bootclasspath. That means that the hidden API flags for this module 92 // has to explicitly list every single class this module provides in 93 // that package to differentiate them from the classes provided by other 94 // modules. That can include private classes that are not part of the 95 // API. 96 split_packages: [ 97 "android.permission", 98 ], 99 100 // The following packages and all their subpackages currently only 101 // contain classes from this bootclasspath_fragment. Listing a package 102 // here won't prevent other bootclasspath modules from adding classes in 103 // any of those packages but it will prevent them from adding those 104 // classes into an API surface, e.g. public, system, etc.. Doing so will 105 // result in a build failure due to inconsistent flags. 106 package_prefixes: [ 107 "android.app.role", 108 "android.permission.jarjar", 109 "android.safetycenter", 110 "android.safetylabel", 111 ], 112 }, 113} 114 115// Encapsulate the contributions made by the com.android.permission to the systemserverclasspath. 116systemserverclasspath_fragment { 117 name: "com.android.permission-systemserverclasspath-fragment", 118 contents: ["service-permission"], 119 apex_available: ["com.android.permission"], 120} 121