Merge changes from topic 'b/36651049' into oc-dev

* changes:
  marlin: add new hwbinder services to manifest.
  Add atel services to background check whitelist
  Remove atfwd binder service.
diff --git a/device-common.mk b/device-common.mk
index dd32e5e..a8bcebe 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -595,3 +595,7 @@
 # Vendor seccomp policy files for media components:
 PRODUCT_COPY_FILES += \
     device/google/marlin/seccomp_policy/mediacodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy
+
+# whitelisted app
+PRODUCT_COPY_FILES += \
+    device/google/marlin/qti_whitelist.xml:system/etc/sysconfig/qti_whitelist.xml
diff --git a/manifest.xml b/manifest.xml
index a0337c1..1a27d02 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -264,5 +264,26 @@
             <instance>default</instance>
         </interface>
     </hal>
+    <hal format="hidl">
+        <name>vendor.qti.atcmdfwd</name>
+        <transport>hwbinder</transport>
+        <impl level="generic"></impl>
+        <version>1.0</version>
+        <interface>
+            <name>IAtCmdFwd</name>
+            <instance>AtCmdFwdService</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
+        <name>vendor.qti.qcril.am</name>
+        <transport>hwbinder</transport>
+        <impl level="generic"></impl>
+        <version>1.0</version>
+        <interface>
+            <name>IQcRilAudio</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+
 </manifest>
 
diff --git a/qti_whitelist.xml b/qti_whitelist.xml
new file mode 100644
index 0000000..d5272f5
--- /dev/null
+++ b/qti_whitelist.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+
+<!--
+/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ *       copyright notice, this list of conditions and the following
+ *       disclaimer in the documentation and/or other materials provided
+ *       with the distribution.
+ *     * Neither the name of The Linux Foundation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+-->
+
+<config>
+    <!-- These are telephony components that need to freely run in the background -->
+    <allow-in-power-save package="com.qualcomm.atfwd" />
+    <allow-in-power-save package="com.qti.qualcomm.datastatusnotification" />
+    <allow-in-power-save package="com.qualcomm.embms" />
+    <allow-in-power-save package="com.qualcomm.qti.telephonyservice" />
+    <allow-in-power-save package="com.qulacomm.qcrilmsgtunnel" />
+    <allow-in-power-save package="com.qualcomm.qti.ims" />
+    <allow-in-power-save package="com.qualcomm.qti.radioconfiginterface" />
+</config>
diff --git a/sepolicy/atfwd.te b/sepolicy/atfwd.te
index 6f2caa5..8f96869 100644
--- a/sepolicy/atfwd.te
+++ b/sepolicy/atfwd.te
@@ -3,12 +3,6 @@
 
 init_daemon_domain(atfwd)
 
-# TODO(b/34603782): Remove this once atfwd no longer uses Binder
-typeattribute atfwd binder_in_vendor_violators;
-binder_use(atfwd)
-
-allow atfwd atfwd_service:service_manager find;
-
 allow atfwd self:socket create_socket_perms;
 allowxperm atfwd self:socket ioctl msm_sock_ipc_ioctls;
 
diff --git a/sepolicy/qtelephony.te b/sepolicy/qtelephony.te
index a56fc4f..d792afa 100644
--- a/sepolicy/qtelephony.te
+++ b/sepolicy/qtelephony.te
@@ -3,8 +3,6 @@
 
 app_domain(qtelephony)
 
-add_service(qtelephony, atfwd_service)
-
 allow qtelephony { app_api_service }:service_manager find;
 
 # Read and write /data/data subdirectory.
diff --git a/sepolicy/service.te b/sepolicy/service.te
index 03bfece..a682951 100644
--- a/sepolicy/service.te
+++ b/sepolicy/service.te
@@ -1,4 +1,3 @@
-type atfwd_service,               service_manager_type;
 type cne_service,                 service_manager_type;
 type imscm_service,               service_manager_type;
 type uce_service,                 service_manager_type;
diff --git a/sepolicy/service_contexts b/sepolicy/service_contexts
index 8704fe2..7ae0b3d 100644
--- a/sepolicy/service_contexts
+++ b/sepolicy/service_contexts
@@ -1,4 +1,3 @@
-AtCmdFwd                                       u:object_r:atfwd_service:s0
 cneservice                                     u:object_r:cne_service:s0
 qti.ims.connectionmanagerservice               u:object_r:imscm_service:s0
 rcs                                            u:object_r:radio_service:s0