Merge "Create duplicate library copy in product partition"
diff --git a/qti-hidl-wrapper/Android.bp b/qti-hidl-wrapper/Android.bp
index 6e1f38e..2620d86 100644
--- a/qti-hidl-wrapper/Android.bp
+++ b/qti-hidl-wrapper/Android.bp
@@ -13,6 +13,20 @@
 
 }
 
+java_library {
+
+    name: "qti-telephony-hidl-wrapper-prd",
+    installable: true,
+    product_specific: true,
+    sdk_version: "system_current",
+
+    static_libs: [
+        "android.hidl.base-V1.0-java",
+        "android.hidl.manager-V1.0-java",
+    ],
+
+}
+
 // ==========================================================================
 
 prebuilt_etc {
@@ -25,3 +39,14 @@
     system_ext_specific: true,
 
 }
+
+prebuilt_etc {
+
+    name: "qti_telephony_hidl_wrapper_prd.xml",
+
+    // This will install the file in /product/etc/permissions
+    src: "qti_telephony_hidl_wrapper_prd.xml",
+    sub_dir: "permissions",
+    product_specific: true,
+
+}
diff --git a/qti-hidl-wrapper/qti_telephony_hidl_wrapper_prd.xml b/qti-hidl-wrapper/qti_telephony_hidl_wrapper_prd.xml
new file mode 100644
index 0000000..a1de23c
--- /dev/null
+++ b/qti-hidl-wrapper/qti_telephony_hidl_wrapper_prd.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+Copyright (c) 2020, 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.
+-->
+
+<permissions>
+ <library name="qti-telephony-hidl-wrapper-prd"
+         file="/product/framework/qti-telephony-hidl-wrapper-prd.jar"/>
+</permissions>
diff --git a/qti-utils/Android.bp b/qti-utils/Android.bp
index 6e3e9de..851def1 100644
--- a/qti-utils/Android.bp
+++ b/qti-utils/Android.bp
@@ -12,6 +12,19 @@
 
 }
 
+java_library {
+    name: "qti-telephony-utils-prd",
+    installable: true,
+    sdk_version: "system_current",
+
+    srcs: ["src/org/**/*.java"],
+    product_specific: true,
+    libs: [
+        "androidx.annotation_annotation"
+    ]
+
+}
+
 // ==========================================================================
 
 prebuilt_etc {
@@ -26,3 +39,15 @@
     system_ext_specific: true,
 
 }
+
+prebuilt_etc {
+
+    name: "qti_telephony_utils_prd.xml",
+
+    // This will install the file in /product/etc/permissions
+
+    src: "qti_telephony_utils_prd.xml",
+    sub_dir: "permissions",
+    product_specific: true,
+
+}
diff --git a/qti-utils/qti_telephony_utils_prd.xml b/qti-utils/qti_telephony_utils_prd.xml
new file mode 100644
index 0000000..7063baa
--- /dev/null
+++ b/qti-utils/qti_telephony_utils_prd.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+copyright (c) 2020, 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.
+-->
+<permissions>
+ <library name="qti-telephony-utils-prd"
+         file="/product/framework/qti-telephony-utils-prd.jar"/>
+</permissions>