Add rules for non platform apps that use hidden APIs

Change-Id: I483f00cc0735f47665c5cb61ed0a187fb4e7d655
diff --git a/config/common.mk b/config/common.mk
index 4c0143e..f028b87 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -93,6 +93,10 @@
     vendor/lineage/config/permissions/org.lineageos.android.xml:system/etc/permissions/org.lineageos.android.xml \
     vendor/lineage/config/permissions/privapp-permissions-lineage.xml:system/etc/permissions/privapp-permissions-lineage.xml
 
+# Hidden API whitelist
+PRODUCT_COPY_FILES += \
+    vendor/lineage/config/permissions/lineage-hiddenapi-package-whitelist.xml:system/etc/permissions/lineage-hiddenapi-package-whitelist.xml
+
 # Include Lineage audio files
 include vendor/lineage/config/lineage_audio.mk
 
diff --git a/config/permissions/lineage-hiddenapi-package-whitelist.xml b/config/permissions/lineage-hiddenapi-package-whitelist.xml
new file mode 100644
index 0000000..f1cd1fa
--- /dev/null
+++ b/config/permissions/lineage-hiddenapi-package-whitelist.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2018 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
+  -->
+
+<!--
+This XML file declares which system apps should be exempted from the hidden API blacklisting, i.e.
+which apps should be allowed to access the entire private API. Only apps NOT signed with the
+platform cert need to be included, as apps signed with the platform cert are exempted by default.
+-->
+
+<config>
+  <hidden-api-whitelisted-app package="org.lineageos.jelly" />
+</config>