1// 2// Copyright (C) 2019 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17package { 18 default_applicable_licenses: [ 19 "packages_modules_Permission_PermissionController_license", 20 ], 21} 22 23// Added automatically by a large-scale-change 24// See: http://go/android-license-faq 25license { 26 name: "packages_modules_Permission_PermissionController_license", 27 visibility: [":__subpackages__"], 28 license_kinds: [ 29 "SPDX-license-identifier-Apache-2.0", 30 ], 31 license_text: [ 32 "NOTICE", 33 ], 34} 35 36genrule { 37 name: "statslog-permissioncontroller-java-gen", 38 tools: ["stats-log-api-gen"], 39 cmd: "$(location stats-log-api-gen) --java $(out) --module permissioncontroller" + 40 " --javaPackage com.android.permissioncontroller" + 41 " --javaClass PermissionControllerStatsLog --minApiLevel 30", 42 out: ["com/android/permissioncontroller/PermissionControllerStatsLog.java"], 43} 44 45java_library { 46 name: "permissioncontroller-statsd", 47 sdk_version: "system_current", 48 min_sdk_version: "30", 49 apex_available: [ 50 "com.android.permission", 51 ], 52 srcs: [ 53 ":statslog-permissioncontroller-java-gen", 54 ], 55} 56 57// File to be included by permission controller app an mocking tests 58filegroup { 59 name: "permissioncontroller-sources", 60 srcs: [ 61 "src/**/*.java", 62 "src/**/*.kt", 63 ":permissioncontroller-protos", 64 ], 65} 66 67filegroup { 68 name: "permissioncontroller-protos", 69 srcs: [ 70 "src/**/*.proto", 71 ], 72} 73 74android_app { 75 name: "PermissionController", 76 // Compiling against "module_current" would allow using non-APIs within the permission APEX 77 // boundaries, which may be unsafe because PermissionController is also shipped as a standalone 78 // artifact. See also b/209458854. 79 sdk_version: "system_current", 80 min_sdk_version: "30", 81 updatable: true, 82 privileged: true, 83 certificate: "platform", 84 rename_resources_package: false, 85 required: ["privapp_allowlist_com.android.permissioncontroller.xml"], 86 87 srcs: [":permissioncontroller-sources"], 88 89 //javacflags: ["-Werror"], 90 kotlincflags: [ 91 "-Werror", 92 "-opt-in=kotlinx.coroutines.DelicateCoroutinesApi", 93 "-Xjvm-default=all" 94 ], 95 96 libs: [ 97 "android.car-stubs", 98 // Soong fails to automatically add this dependency because all the 99 // *.kt sources are inside a filegroup. 100 "kotlin-annotations", 101 "safety-center-annotations", 102 ], 103 104 static_libs: [ 105 "iconloader_sc_mainline_prod", 106 "com.google.android.material_material", 107 "androidx.transition_transition", 108 "androidx-constraintlayout_constraintlayout", 109 "androidx.core_core", 110 "androidx.media_media", 111 "androidx.legacy_legacy-support-core-utils", 112 "androidx.legacy_legacy-support-core-ui", 113 "androidx.fragment_fragment", 114 "androidx.appcompat_appcompat", 115 "androidx.preference_preference", 116 "androidx.recyclerview_recyclerview", 117 "androidx.legacy_legacy-preference-v14", 118 "androidx.leanback_leanback", 119 "androidx.leanback_leanback-preference", 120 "androidx.lifecycle_lifecycle-extensions", 121 "androidx.lifecycle_lifecycle-common-java8", 122 "kotlin-stdlib", 123 "kotlinx-coroutines-android", 124 "androidx.navigation_navigation-common-ktx", 125 "androidx.navigation_navigation-fragment-ktx", 126 "androidx.navigation_navigation-runtime-ktx", 127 "androidx.navigation_navigation-ui-ktx", 128 "SettingsLibHelpUtils", 129 "SettingsLibRestrictedLockUtils", 130 "SettingsLibAppPreference", 131 "SettingsLibSearchWidget", 132 "SettingsLibLayoutPreference", 133 "SettingsLibBarChartPreference", 134 "SettingsLibActionBarShadow", 135 "SettingsLibProgressBar", 136 "SettingsLibCollapsingToolbarBaseActivity", 137 "SettingsLibActivityEmbedding", 138 "SettingsLibSettingsTheme", 139 "SettingsLibFooterPreference", 140 "SettingsLibSelectorWithWidgetPreference", 141 "SettingsLibTwoTargetPreference", 142 "SettingsLibIllustrationPreference", 143 "androidx.annotation_annotation", 144 "permissioncontroller-statsd", 145 "car-ui-lib", 146 "libprotobuf-java-lite", 147 "safety-center-internal-data", 148 "safety-center-pending-intents", 149 "SettingsLibUtils", 150 "modules-utils-build_system", 151 "safety-center-resources-lib", 152 "lottie", 153 "safety-label", 154 "role-controller", 155 ], 156 157 proto: { 158 type: "lite", 159 include_dirs: ["packages/modules/Permission/PermissionController/src/com/android/permissioncontroller"], 160 }, 161 162 lint: { 163 strict_updatability_linting: true, 164 }, 165 166 optimize: { 167 proguard_flags_files: ["proguard.flags"], 168 }, 169 170 apex_available: [ 171 "//apex_available:platform", 172 "com.android.permission", 173 ], 174} 175