Gallery2: Add privapp permissions xml
Change-Id: I269a237f17ecaccfbcf6b0f1017253278f69c9a1
diff --git a/Android.mk b/Android.mk
index 7ad76f1..e4b9805 100644
--- a/Android.mk
+++ b/Android.mk
@@ -59,8 +59,19 @@
LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt
+LOCAL_REQUIRED_MODULES += privapp_whitelist_com.android.gallery3d.xml
+
include $(BUILD_PACKAGE)
+include $(CLEAR_VARS)
+LOCAL_MODULE := privapp_whitelist_com.android.gallery3d.xml
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT_ETC)/permissions
+LOCAL_PRODUCT_MODULE := true
+LOCAL_SRC_FILES := $(LOCAL_MODULE)
+include $(BUILD_PREBUILT)
+
ifeq ($(strip $(LOCAL_PACKAGE_OVERRIDES)),)
# Use the following include to make gallery test apk
diff --git a/privapp_whitelist_com.android.gallery3d.xml b/privapp_whitelist_com.android.gallery3d.xml
new file mode 100644
index 0000000..2a53b90
--- /dev/null
+++ b/privapp_whitelist_com.android.gallery3d.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2019-2020 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>
+ <privapp-permissions package="com.android.gallery3d">
+ <permission name="android.permission.MODIFY_AUDIO_ROUTING"/>
+ </privapp-permissions>
+</permissions>