add shiftos permissions

Change-Id: I6d36f1443ed75b64afc9db9d08159d654a9b38d2
diff --git a/config/common.mk b/config/common.mk
index 4b971c2..e0f9365 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -9,5 +9,8 @@
 # Packages
 include vendor/shiftos/config/packages.mk
 
+# ShiftOS permissions
+include vendor/shiftos/config/permissions.mk
+
 # Private bits if existing
 -include vendor/shiftos/private/common.mk
diff --git a/config/permissions.mk b/config/permissions.mk
new file mode 100644
index 0000000..5bad535
--- /dev/null
+++ b/config/permissions.mk
@@ -0,0 +1,4 @@
+# ShiftOS permissions
+PRODUCT_PACKAGES += \
+    com.shiftos.android.xml \
+    com.shiftos.aptx.xml \
diff --git a/config/permissions/Android.bp b/config/permissions/Android.bp
new file mode 100644
index 0000000..44da185
--- /dev/null
+++ b/config/permissions/Android.bp
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 2019-2020 Shift GmbH
+// Copyright (C) 2018-2019 The LineageOS 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 and Feature Flags
+// ============================================================
+
+prebuilt_etc {
+    name: "com.shiftos.android.xml",
+    sub_dir: "permissions",
+    src: "com.shiftos.android.xml",
+    filename_from_src: true,
+}
+
+prebuilt_etc {
+    name: "com.shiftos.aptx.xml",
+    sub_dir: "permissions",
+    src: "com.shiftos.aptx.xml",
+    filename_from_src: true,
+}
diff --git a/config/permissions/com.shiftos.android.xml b/config/permissions/com.shiftos.android.xml
new file mode 100644
index 0000000..f471f74
--- /dev/null
+++ b/config/permissions/com.shiftos.android.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This feature is used to recognize ShiftOS -->
+<permissions>
+    <feature name="com.shiftos.android" />
+</permissions>
diff --git a/config/permissions/com.shiftos.aptx.xml b/config/permissions/com.shiftos.aptx.xml
new file mode 100644
index 0000000..5957d14
--- /dev/null
+++ b/config/permissions/com.shiftos.aptx.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2020 SHIFT GmbH
+
+     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.
+-->
+<!-- This feature is used to recognize support for Qualcomm® aptX™ (https://www.aptx.com/) -->
+<permissions>
+    <feature name="com.shiftos.aptx" />
+</permissions>