优化demo代码解决NW部分参数处理错误
Change-Id: I4db3c717b535160ff7dc12bc9723d0d03ef303e8
diff --git a/mbtk/libmbtk_ril/mbtk_info.c b/mbtk/libmbtk_ril/mbtk_info.c
index 7627c08..d7ea54f 100755
--- a/mbtk/libmbtk_ril/mbtk_info.c
+++ b/mbtk/libmbtk_ril/mbtk_info.c
@@ -323,6 +323,9 @@
// <uint8> State
case MBTK_INFO_ID_IND_SERVER_STATE_CHANGE:
return "IND_SERVER_STATE";
+ // <uint8> State
+ case MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE:
+ return "IND_SIGNAL_STATE";
default:
{
return "UNKNOWN";
diff --git a/mbtk/libmbtk_ril/mbtk_info.h b/mbtk/libmbtk_ril/mbtk_info.h
old mode 100644
new mode 100755
index 9bbf844..1ba7ab8
--- a/mbtk/libmbtk_ril/mbtk_info.h
+++ b/mbtk/libmbtk_ril/mbtk_info.h
@@ -261,6 +261,9 @@
MBTK_INFO_ID_IND_PDP_STATE_CHANGE,
// <uint8> State
MBTK_INFO_ID_IND_SERVER_STATE_CHANGE,////mbtk wyq for server_ready_status add
+ // <uint8> State
+ MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE,
+
MBTK_INFO_ID_IND_END,
MBTK_INFO_ID_REQ_UNKNOWN // Unknown information.
diff --git a/mbtk/libmbtk_ril/mbtk_info_api.c b/mbtk/libmbtk_ril/mbtk_info_api.c
old mode 100644
new mode 100755
index ac21898..e987275
--- a/mbtk/libmbtk_ril/mbtk_info_api.c
+++ b/mbtk/libmbtk_ril/mbtk_info_api.c
@@ -105,6 +105,14 @@
LOG("handshake message recv ok.");
break;
}
+ //mbtk xr for signal_status add start
+ case MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE:
+ {
+ if(handle->signal_state_cb)
+ handle->signal_state_cb(pack->data, pack->data_len);
+ break;
+ }
+
//mbtk wyq for server_ready_status add end
default:
{
@@ -2382,3 +2390,22 @@
return 0;
}
}
+
+/*
+* Set signal state change callback function.
+*/
+int mbtk_signal_state_change_cb_reg(mbtk_info_handle_t* handle, mbtk_info_callback_func cb)
+{
+ if(handle == NULL)
+ {
+ LOGE("ARG error.");
+ return -1;
+ }
+ if(info_item_process(handle, MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE, NULL, 0, NULL) < 0) {
+ return handle->info_err;
+ } else {
+ handle->signal_state_cb = cb;
+ return 0;
+ }
+}
+