Merge "[Bugfix][T106BUG-660]Fixed the problem that no callback when deactive APN in special markets"
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/com.a b/ap/lib/libps/220A1_vehicle_dc/ps/com.a
index 06b9fb3..de25c26 100755
--- a/ap/lib/libps/220A1_vehicle_dc/ps/com.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/com.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/nas.a b/ap/lib/libps/220A1_vehicle_dc/ps/nas.a
index fda4d81..c1b52c3 100755
--- a/ap/lib/libps/220A1_vehicle_dc/ps/nas.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/nas.a
Binary files differ
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-gnss/liblynq-qser-gnss.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-gnss/liblynq-qser-gnss.bb
index ee700c0..2eb9488 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-gnss/liblynq-qser-gnss.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-gnss/liblynq-qser-gnss.bb
@@ -3,7 +3,7 @@
 DESCRIPTION = "liblynq-qser-gnss"

 LICENSE = "CLOSED"

 LIC_FILES_CHKSUM = "file://LICENSE;md5=3f86c7f456a6d0bbeca155e65084eee1"

-DEPENDS += "liblynq-log libxml2 liblynq-uci libsctel libscrtc libbsp"

+DEPENDS += "liblynq-log libxml2 liblynq-uci libsctel libscrtc libbsp liblynq-qser-autosuspend"

 #inherit workonsrc

 WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-qser-gnss/"

 FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/makefile
index 228b1bc..acf46cb 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/makefile
@@ -44,7 +44,7 @@
     -lscrtc \

     -lbsp \

     -lnvram \

-

+    -llynq-qser-autosuspend \

 

 SOURCES = $(wildcard *.c wildcard *.h src/*.cpp)

 

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/lynq_qser_gnss.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/lynq_qser_gnss.cpp
index 4fe61db..1aed4db 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/lynq_qser_gnss.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/lynq_qser_gnss.cpp
@@ -35,17 +35,20 @@
 #include "ringbuffer.h"
 #include "lynq_qser_gnss.h"
 #include "include/lynq_uci.h"
+#include "include/lynq-qser-autosuspend.h"
 DEFINE_LYNQ_LIB_LOG(LYNQ_QSER_GNSS)
 #ifdef __cplusplus
 extern "C" {
 #endif
-
+#define GNSS_WAKELOCK_NAME "GNSS_WAKELOCK"
 int ret;
 LYNQ_INJECT_TIME_INTO_T time_test;
 int g_gnss_sync_enable_flag = 0;
 int g_gnss_sync_done = 0;
 int inited = 0;
 int event = 0;
+int lock_fd = 0;
+
 int qser_Gnss_Init(uint32_t *h_gnss)
 {
     ret = lynq_gnss_client_init(h_gnss);
@@ -70,6 +73,15 @@
         login_information_t->password = NULL;
 #endif
     inited = 1;
+    lock_fd = qser_wakelock_create(GNSS_WAKELOCK_NAME, strlen(GNSS_WAKELOCK_NAME));
+    if(lock_fd < 0)
+    {
+        ALOGE("Create gnss wakelock failed %d",lock_fd);
+    }
+    if(qser_wakelock_lock(lock_fd) < 0)
+    {
+        ALOGE("Lock gnss wakelock failed");
+    }
     return 0;
 }
 
@@ -91,6 +103,16 @@
         login_information_t = NULL;
     }
     inited = 0;
+
+    if(qser_wakelock_unlock(lock_fd) < 0)
+    {
+        ALOGE("Unlock gnss wakelock failed");
+    }
+    if(qser_wakelock_destroy(lock_fd) < 0)
+    {
+        ALOGE("Destroy gnss wakelock failed");
+    }
+
     return 0;
 }