Added CarService Privileged permissions to xml files
Bug: 177455922
Test: m
Change-Id: I146906c5b8365014829c2a2b0580ba084ac01be0
diff --git a/data/etc/Android.bp b/data/etc/Android.bp
new file mode 100644
index 0000000..f5cb01b
--- /dev/null
+++ b/data/etc/Android.bp
@@ -0,0 +1,38 @@
+// Copyright (C) 2021 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"],
+}
+
+prebuilt_etc {
+ name: "allowed_privapp_com.google.android.car.garagemode.testapp",
+ sub_dir: "permissions",
+ src: "com.google.android.car.garagemode.testapp.xml",
+ filename_from_src: true,
+}
+
+prebuilt_etc {
+ name: "allowed_privapp_com.google.android.car.uxr.sample",
+ sub_dir: "permissions",
+ src: "com.google.android.car.uxr.sample.xml",
+ filename_from_src: true,
+}
+
+prebuilt_etc {
+ name: "allowed_privapp_com.google.android.car.defaultstoragemonitoringcompanionapp",
+ sub_dir: "permissions",
+ src: "com.google.android.car.defaultstoragemonitoringcompanionapp.xml",
+ filename_from_src: true,
+}
diff --git a/data/etc/com.google.android.car.defaultstoragemonitoringcompanionapp.xml b/data/etc/com.google.android.car.defaultstoragemonitoringcompanionapp.xml
new file mode 100644
index 0000000..f60742f
--- /dev/null
+++ b/data/etc/com.google.android.car.defaultstoragemonitoringcompanionapp.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2021 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.google.android.car.defaultstoragemonitoringcompanionapp">
+ <permission name="android.car.permission.STORAGE_MONITORING"/>
+ </privapp-permissions>
+</permissions>
diff --git a/data/etc/com.google.android.car.garagemode.testapp.xml b/data/etc/com.google.android.car.garagemode.testapp.xml
new file mode 100644
index 0000000..05be698
--- /dev/null
+++ b/data/etc/com.google.android.car.garagemode.testapp.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2021 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.google.android.car.garagemode.testapp">
+ <permission name="android.car.permission.CAR_DRIVING_STATE"/>
+ </privapp-permissions>
+</permissions>
diff --git a/data/etc/com.google.android.car.uxr.sample.xml b/data/etc/com.google.android.car.uxr.sample.xml
new file mode 100644
index 0000000..dfb4d3f
--- /dev/null
+++ b/data/etc/com.google.android.car.uxr.sample.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2021 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.google.android.car.uxr.sample">
+ <permission name="android.car.permission.CAR_DRIVING_STATE"/>
+ </privapp-permissions>
+</permissions>
diff --git a/tests/DefaultStorageMonitoringCompanionApp/Android.bp b/tests/DefaultStorageMonitoringCompanionApp/Android.bp
index 20a5059..2f04593 100644
--- a/tests/DefaultStorageMonitoringCompanionApp/Android.bp
+++ b/tests/DefaultStorageMonitoringCompanionApp/Android.bp
@@ -33,6 +33,8 @@
enabled: false,
},
+ required: ["allowed_privapp_com.google.android.car.defaultstoragemonitoringcompanionapp"],
+
privileged: true,
enforce_uses_libs: false,
diff --git a/tests/GarageModeTestApp/Android.bp b/tests/GarageModeTestApp/Android.bp
index 47b98ae..06dfc8e 100644
--- a/tests/GarageModeTestApp/Android.bp
+++ b/tests/GarageModeTestApp/Android.bp
@@ -36,6 +36,8 @@
enabled: false,
},
+ required: ["allowed_privapp_com.google.android.car.garagemode.testapp"],
+
privileged: true,
certificate: "platform",
diff --git a/tests/UxRestrictionsSample/Android.bp b/tests/UxRestrictionsSample/Android.bp
index d8a8f9a..bc9ba33 100644
--- a/tests/UxRestrictionsSample/Android.bp
+++ b/tests/UxRestrictionsSample/Android.bp
@@ -36,6 +36,8 @@
enabled: false,
},
+ required: ["allowed_privapp_com.google.android.car.uxr.sample"],
+
privileged: true,
certificate: "platform",