[Bugfix][T106BUG-489][AUTOSUSPEND]add sleep notice to lynq-ril-service
Only Configure :No
Affected branch: master
Affected module: AUTOSUSPEND
Is it affected on both ZXIC and MTK:only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I93653174a68c86fdaa1e0ba494dfc875657478a4
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-sim/include/lynq_sim.h b/cap/zx297520v3/src/lynq/lib/liblynq-sim/include/lynq_sim.h
index bf271f1..8bf9069 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-sim/include/lynq_sim.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-sim/include/lynq_sim.h
@@ -27,6 +27,9 @@
int lynq_query_phone_number(char buf[]);
int lynq_switch_card(int slot);
int lynq_screen(int num);
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int lynq_sleep_status(int sleep_state);
+#endif
int lynq_get_imei(char buf[]);
int lynq_get_imei_and_sv(char imei[],char sv[]);
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-sim/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-sim/makefile
index 219bda7..0eafd49 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-sim/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-sim/makefile
@@ -17,6 +17,10 @@
LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0 -DMOBILETEK_TARGET_PLATFORM_T106 -Wl,-Bsymbolic
endif
+ifeq ($(strip $(TARGET_PLATFORM)), T106)
+ LOCAL_CFLAGS += -DMOBILETEK_TARGET_PLATFORM_T106
+endif
+
$(warning ################# lynq sim ROOT: $(ROOT),includedir:$(includedir))
LOCAL_PATH = .
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-sim/src/lynq_sim.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-sim/src/lynq_sim.cpp
index 75a1d0b..cfddb6c 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-sim/src/lynq_sim.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-sim/src/lynq_sim.cpp
@@ -29,6 +29,8 @@
#define LYNQ_REQUEST_SET_DEFAULT_SIM_ALL 8008
#define LYNQ_REQUEST_CHANGE_SCREEN_STATE 8014 /*add for two sim suspend on 20220919*/
#define LYNQ_REQUEST_CHANGE_RADIO 8015
+#define LYNQ_REQUEST_CHANGE_SLEEP_STATE 8016
+
#define MAX_LEN 1024*8
#define MAX_NUM 10
#define LOG_TAG "LYNQ_SIM"
@@ -44,7 +46,7 @@
char param[MAX_LEN];
}lynq_client_t;
-/* socket文件描述符 */
+/* socket file descriptor*/
int len_addr_serv;
struct sockaddr_in addr_serv;
static int sock_fd = 0;
@@ -703,6 +705,36 @@
return res;
}
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+/**@breif notice ril the sleep state
+*param num type: [IN] sleep_state,0:sleep,1:resume
+*param ret type: [OUT] result,0:success,other:fail
+*return int
+*/
+int lynq_sleep_status(int sleep_state)
+{
+ RLOGD("start lynq_get_sleep_status\n");
+ if(g_lynq_sim_init_flag == 0)
+ {
+ return -1;
+ }
+ if(!judge(sleep_state))
+ return -1;
+ Parcel p;
+ int res = lynq_send_common_request(&p,LYNQ_REQUEST_CHANGE_SLEEP_STATE,1,1,"%d\n",sleep_state);
+ if(res != 0)
+ {
+ RLOGD("function %s execute error\n", __FUNCTION__);
+ return res;
+ }
+ else
+ {
+ RLOGD("function %s execute success\n", __FUNCTION__);
+ }
+ return res;
+}
+#endif
+
/**@breif change screen state
*param num type: [IN] screen_state,0:close,1:open
*param ret type: [OUT] result,0:success,other:fail