[Bugfix][bug-view-1352]Add whitelist clear API
Only Configure:No
Affected branch:master
Affected module:autosuspend
Is it affected on both ZXIC and MTK:only ZXIC
Self-test:Yes
Change-Id: I1f728300bd59be6f0ed00e2d6e5f74f25be8d2a6
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/include/libauto/lynq_autosuspend.h b/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/include/libauto/lynq_autosuspend.h
old mode 100644
new mode 100755
index efd1219..63f1918
--- a/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/include/libauto/lynq_autosuspend.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/include/libauto/lynq_autosuspend.h
@@ -25,7 +25,7 @@
int lynq_autosleep_enable(void);
int lynq_autosleep_disable(void);
int lynq_wait_wakeup_event(long *sleep_start_time, long * wakeup_time);
-
+int lynq_whitelist_clear(void);
#ifdef MOBILETEK_TARGET_PLATFORM_T106
int lynq_set_lpmode(int lp_mode);
int release_wake_lock(char *name);
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/lynq-autosuspend.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/lynq-autosuspend.cpp
index 5dc3fe5..65f6517 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/lynq-autosuspend.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/lynq-autosuspend.cpp
@@ -11,7 +11,7 @@
#include <stdbool.h>
#include <time.h>
#include <liblog/lynq_deflog.h>
-
+#include <sc_mnet_whitelist.h>
#include "include/libauto/lynq_autosuspend.h"
#ifdef MOBILETEK_TARGET_PLATFORM_T106
#include <sc_bsp.h>
@@ -465,6 +465,17 @@
}
#endif
+int lynq_whitelist_clear(void)
+{
+ int ret;
+ ret = sc_mnet_whitelist_clear();
+ if(ret)
+ {
+ LYINFLOG("sc_mnet_whitelist_clear ret=%d\n", ret);
+ }
+ return ret;
+}
+
DEFINE_LYNQ_LIB_LOG(LIBLYNQ_AUTOSUSPEND)
#ifdef __cplusplus
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/makefile
old mode 100644
new mode 100755
index b97b48c..021cb61
--- a/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-autosuspend/makefile
@@ -39,6 +39,7 @@
-lpthread \
-llynq-log \
-lbsp \
+ -lsctel \
SOURCES = $(wildcard *.cpp)
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/include/lynq-qser-autosuspend.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/include/lynq-qser-autosuspend.h
index 5d4b91d..692056f 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/include/lynq-qser-autosuspend.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/include/lynq-qser-autosuspend.h
@@ -67,7 +67,7 @@
int qser_whitelist_set(char *whitelist);
int qser_whitelist_get(char *whitelist);
-
+int qser_whitelist_clear(void);
#ifdef __cplusplus
}
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/lynq-qser-autosuspend.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/lynq-qser-autosuspend.cpp
index 6fbedd5..ce1b692 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/lynq-qser-autosuspend.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-autosuspend/lynq-qser-autosuspend.cpp
@@ -8,7 +8,7 @@
#include <pthread.h>
#include <unistd.h>
-#include <lynq_autosuspend.h>
+
#include "lynq-qser-autosuspend.h"
#include "liblog/lynq_deflog.h"
#include <include/lynq_uci.h>
@@ -17,7 +17,7 @@
extern "C" {
#endif
-
+#include "lynq_autosuspend.h"
extern int lynq_autosleep_enable(void);
extern int lynq_autosleep_disable(void);
extern int release_wake_lock(char *name);
@@ -464,6 +464,15 @@
}
+int qser_whitelist_clear(void)
+{
+ int ret;
+ ret = lynq_whitelist_clear();
+ LYERRLOG("clear ret =%d\n", ret);
+ return ret;
+
+}
+
DEFINE_LYNQ_LIB_LOG(LYNQ_QSER_AUTOSUSPEND)
#ifdef __cplusplus