summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.bp5
-rw-r--r--PermissionController/Android.bp1
-rw-r--r--permissions/Android.bp26
-rw-r--r--permissions/OWNERS2
-rw-r--r--permissions/com.android.permissioncontroller.xml35
5 files changed, 68 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index 8ec8b74fb..52ea3abe3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -27,7 +27,10 @@ apex_defaults {
defaults: ["r-launched-apex-module"],
bootclasspath_fragments: ["com.android.permission-bootclasspath-fragment"],
systemserverclasspath_fragments: ["com.android.permission-systemserverclasspath-fragment"],
- prebuilts: ["current_sdkinfo"],
+ prebuilts: [
+ "current_sdkinfo",
+ "privapp_allowlist_com.android.permissioncontroller.xml",
+ ],
key: "com.android.permission.key",
certificate: ":com.android.permission.certificate",
apps: [
diff --git a/PermissionController/Android.bp b/PermissionController/Android.bp
index eedd87897..950a52e21 100644
--- a/PermissionController/Android.bp
+++ b/PermissionController/Android.bp
@@ -80,6 +80,7 @@ android_app {
privileged: true,
certificate: "platform",
rename_resources_package: false,
+ required: ["privapp_allowlist_com.android.permissioncontroller.xml"],
srcs: [":permissioncontroller-sources"],
diff --git a/permissions/Android.bp b/permissions/Android.bp
new file mode 100644
index 000000000..020b3eadc
--- /dev/null
+++ b/permissions/Android.bp
@@ -0,0 +1,26 @@
+
+//
+// Copyright (C) 2022 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+ default_visibility: ["//packages/modules/Permission:__subpackages__"],
+}
+
+prebuilt_etc {
+ name: "privapp_allowlist_com.android.permissioncontroller.xml",
+ sub_dir: "permissions",
+ src: "com.android.permissioncontroller.xml",
+}
diff --git a/permissions/OWNERS b/permissions/OWNERS
new file mode 100644
index 000000000..8b7e2e5d0
--- /dev/null
+++ b/permissions/OWNERS
@@ -0,0 +1,2 @@
+per-file *.xml,OWNERS = set noparent
+per-file *.xml,OWNERS = file:platform/frameworks/base:/data/etc/OWNERS
diff --git a/permissions/com.android.permissioncontroller.xml b/permissions/com.android.permissioncontroller.xml
new file mode 100644
index 000000000..7ac2d0612
--- /dev/null
+++ b/permissions/com.android.permissioncontroller.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2022 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+<permissions>
+ <privapp-permissions package="com.android.permissioncontroller">
+ <permission name="android.permission.CLEAR_APP_CACHE"/>
+ <permission name="android.permission.MANAGE_USERS"/>
+ <permission name="android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS"/>
+ <permission name="android.permission.GET_APP_OPS_STATS"/>
+ <permission name="android.permission.UPDATE_APP_OPS_STATS"/>
+ <permission name="android.permission.REQUEST_INCIDENT_REPORT_APPROVAL"/>
+ <permission name="android.permission.APPROVE_INCIDENT_REPORTS"/>
+ <permission name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
+ <permission name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME" />
+ <permission name="android.permission.PACKAGE_USAGE_STATS" />
+ <permission name="android.permission.CHANGE_COMPONENT_ENABLED_STATE" />
+ <permission name="android.permission.MODIFY_AUDIO_ROUTING" />
+ <permission name="android.permission.WRITE_SECURE_SETTINGS" />
+ <permission name="android.permission.READ_SAFETY_CENTER_STATUS" />
+ <permission name="android.permission.SEND_SAFETY_CENTER_UPDATE" />
+ </privapp-permissions>
+</permissions> \ No newline at end of file