add uci to control ims
Change-Id: I95bcd5318c12d1d0d88dc8ff4838a24ff199c192
diff --git a/meta/meta-mediatek-mt2735/recipes-core/initial/files/lynq_data_recover b/meta/meta-mediatek-mt2735/recipes-core/initial/files/lynq_data_recover
old mode 100644
new mode 100755
index b1d6f83..08c2647
--- a/meta/meta-mediatek-mt2735/recipes-core/initial/files/lynq_data_recover
+++ b/meta/meta-mediatek-mt2735/recipes-core/initial/files/lynq_data_recover
@@ -102,7 +102,6 @@
echo "$TAG: Before recover radio_property" > /dev/kmsg
rm -rf /etc/config/.*.uci*
-check_copy_file /data_backup/radio_property /etc/config/radio_property
mkdir -p /data/atsvc
check_copy_file /data_backup/lynq_atsvc_plugin.xml /data/atsvc/lynq_atsvc_plugin.xml
check_copy_file /data_backup/terminal_controller.conf /data/atsvc/terminal_controller.conf
diff --git a/src/telephonyware/3.0/hardware/ril/fusion/libril/rilmipc/telephony/ims/RpImsController.cpp b/src/telephonyware/3.0/hardware/ril/fusion/libril/rilmipc/telephony/ims/RpImsController.cpp
old mode 100644
new mode 100755
index 03a64eb..3971871
--- a/src/telephonyware/3.0/hardware/ril/fusion/libril/rilmipc/telephony/ims/RpImsController.cpp
+++ b/src/telephonyware/3.0/hardware/ril/fusion/libril/rilmipc/telephony/ims/RpImsController.cpp
@@ -56,9 +56,9 @@
#include "RfxDispatchThread.h"
#include "Rfx.h"
+#include "rfx_properties.h"
#include "RilParcelUtils.h"
#include <telephony/mtk_ril_request_info.h>
-#include "RfxRootController.h"
#include "RpUtils.h"
using namespace std;
@@ -157,6 +157,18 @@
}
extern "C" {
+int isImsSupport() {
+ int isImsSupport = 0;
+ char prop_value[RFX_PROPERTY_VALUE_MAX] = {0};
+ rfx_property_get("persist.vendor.ims.support", prop_value, "0");
+ isImsSupport = atoi(prop_value);
+ RFX_LOG_D(RFX_LOG_TAG, "isImsSupport = %d", isImsSupport);
+ return isImsSupport;
+}
+}
+
+
+extern "C" {
void mipc_ims_set_config_cb(mipc_msg_t *msg_ptr, void *priv_ptr) {
mipc_result_enum result;
mipc_sim_ps_id_enum sim_ps_id;
@@ -194,8 +206,15 @@
uint8_t data[6]={0,0,0,0,1,1};
mipc_msg_t *msg_req_ptr = NULL;
- data[0] = enable;
- RFX_LOG_D(RFX_LOG_TAG,"handleSetImsEnableRequest enalbe = %d\n",enable);
+
+ if (isImsSupport()) {
+ data[0] = enable;
+ } else {
+ data[4] = 0;
+ data[5] = 0;
+ }
+
+ RFX_LOG_D(RFX_LOG_TAG,"handleSetImsEnableRequest enable = %d, ims support = %d\n", data[0], isImsSupport());
msg_req_ptr = mipc_msg_init(MIPC_IMS_SET_CONFIG_REQ, (mipc_msg_sim_ps_id_enum)slot_id_to_mipc_sim_id(request->getSlotId()));
if(msg_req_ptr) {
@@ -219,7 +238,7 @@
Parcel *p = request->getParcel();
int32_t status;
int count;
- if(p != NULL) {
+ if(isImsSupport() && (p != NULL)) {
status = p->readInt32(&count);
if (status != 0) {
RFX_LOG_D(RFX_LOG_TAG,"handleSetImsCfgRequest readerror\n");
@@ -259,8 +278,8 @@
uint8_t data[6]={volte,vilte,vowifi,viwifi,sms,eims};
mipc_msg_t *msg_req_ptr;
- RFX_LOG_D(RFX_LOG_TAG,"handleSetImsCfgRequest volte=%d,vilte=%d,vowifi=%d,viwifi=%d,sms=%d,eims=%d\n",
- volte,vilte,vowifi,viwifi,sms,eims);
+ RFX_LOG_D(RFX_LOG_TAG,"handleSetImsCfgRequest isImsSupport()=%d, volte=%d,vilte=%d,vowifi=%d,viwifi=%d,sms=%d,eims=%d\n",
+ isImsSupport(), volte,vilte,vowifi,viwifi,sms,eims);
msg_req_ptr = mipc_msg_init(MIPC_IMS_SET_CONFIG_REQ, (mipc_msg_sim_ps_id_enum)slot_id_to_mipc_sim_id(request->getSlotId()));
if(msg_req_ptr) {