[Bugfix][T106BUG-487]fix led state about calling
Only Configure:No,
Affected branch:master,
Affected module:led
Is it affected on both ZXIC and MTK:only ZXIC,
Self-test:Yes,
Doc Update:NO.
Change-Id: I7e73b12764b3a0983581e7cb5e76327b8bfaf6b2
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
index ed165e0..4c51a16 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
@@ -95,11 +95,18 @@
/*Warren add for t800 RIL service 2021_12_10 end*/
#ifdef LED_SUPPORT
#include "led.h"
+#include "libled/lynq_led.h"
+#include <include/lynq_uci.h>
#endif
#include "lynq_shm.h"
#define LOG_TAG "DEMO_RIL"
#define WAIT_TIME_FOR_SIM_SWITCH 30
+#ifdef LED_SUPPORT
+#define LED_ON 4
+#define LYNQ_UCI_SECTION "lynq_led"
+#define LYNQ_UCI_NETLED_KEY "lynq_netled_on"
+#endif
extern void ARspRequest (int request, RIL_SOCKET_ID socket_id);
extern void responseDispatch();
@@ -4283,6 +4290,17 @@
{
update_call_state(response,responselen, socket_id);
int num = responselen / sizeof(RIL_Call *);
+#ifdef LED_SUPPORT
+ char netled_on[LED_ON] = "";
+ lynq_get_value(LYNQ_UCI_FILE, LYNQ_UCI_SECTION, LYNQ_UCI_NETLED_KEY, netled_on);
+ if(1 == atoi(netled_on))
+ {
+ if(num > 0)
+ mbtk_netled_state_update(GPIO_NETLED_CS_CALLING);
+ else
+ mbtk_netled_state_update(GPIO_NETLED_CS_CALLEND);
+ }
+#endif
speechonoff(num);
printf("%s\n", printBuf);
break;