Messaging: Add sysconfig whitelist xml

Issue: FP2P-589
Change-Id: I2665ac3be3bb63daeaa0e5c109b73ca6152b95ce
(adapted from https://github.com/LineageOS/android_packages_apps_Messaging/commit/774b8d55d2a36677be856c602c5383dd347c160d.patch)
diff --git a/Android.mk b/Android.mk
index c9ada0d..1d50267 100644
--- a/Android.mk
+++ b/Android.mk
@@ -70,6 +70,16 @@
 
 LOCAL_SDK_VERSION := current
 
+LOCAL_REQUIRED_MODULES += com.android.messaging_whitelist.xml
+
 include $(BUILD_PACKAGE)
 
+include $(CLEAR_VARS)
+LOCAL_MODULE := com.android.messaging_whitelist.xml
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/sysconfig
+LOCAL_SRC_FILES := $(LOCAL_MODULE)
+include $(BUILD_PREBUILT)
+
 include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/com.android.messaging_whitelist.xml b/com.android.messaging_whitelist.xml
new file mode 100644
index 0000000..6bc77a8
--- /dev/null
+++ b/com.android.messaging_whitelist.xml
@@ -0,0 +1,19 @@
+<?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.
+-->
+<config>
+    <allow-in-power-save package="com.android.messaging" />
+</config>