Merge "[Bugfix][bug-view-1352]Add whitelist clear API"
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend_wakeup_count.c b/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend_wakeup_count.c
index 74c980c..6cbc665 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend_wakeup_count.c
+++ b/cap/zx297520v3/src/lynq/framework/lynq-autosuspend/autosuspend_wakeup_count.c
@@ -450,6 +450,25 @@
char buf[80];
int ret = 0;
int flag = -1;
+
+#ifdef MOBILETEK_SUSPEND_CFG
+ ret = t800_early_suspend();
+ if(ret != 0)
+ {
+ ALOGD("t800_early_suspend fail\n");
+ return -1;
+ }
+#endif
+
+
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+ ret = t106_early_suspend();
+ if(ret != 0)
+ {
+ ALOGD("t106_early_suspend fail\n");
+ return -1;
+ }
+#endif
for(int i=0;i<5;i++)
{
@@ -475,24 +494,7 @@
RLOGE("Error writing to %s: %s\n", SYS_POWER_WAKEUP_COUNT,buf);
continue;
}
-#ifdef MOBILETEK_SUSPEND_CFG
- ret = t800_early_suspend();
- if(ret != 0)
- {
- ALOGD("t800_early_suspend fail\n");
- return -1;
- }
-#endif
-
-
-#ifdef MOBILETEK_TARGET_PLATFORM_T106
- ret = t106_early_suspend();
- if(ret != 0)
- {
- ALOGD("t106_early_suspend fail\n");
- return -1;
- }
-#endif
+
system("echo \"autosuspend:Sys suspend\" >/dev/console");
RLOGI("suspend_ctrl: start write power_state\n");
if(TEMP_FAILURE_RETRY(write(state_fd, sleep_state, strlen(sleep_state))) < 0) //enter suspend procedures in kernel