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>