解耦能使和wake的操作关联,关闭设置睡眠默认关闭gps的操作

Change-Id: I7d488ee612a934843c82be689bd65f433db5fb40
diff --git a/mbtk/liblynq_lib/src/lynq_sleep.c b/mbtk/liblynq_lib/src/lynq_sleep.c
index 84f6d75..8c14793 100755
--- a/mbtk/liblynq_lib/src/lynq_sleep.c
+++ b/mbtk/liblynq_lib/src/lynq_sleep.c
@@ -115,7 +115,8 @@
 
     if((enable == 1) || enable == '1')
     {
-        if(!mbtk_system_sleep())
+        //if(!mbtk_system_sleep())
+        if(!access("/sys/power/autosleep", W_OK))
         {
             system("echo mem > /sys/power/autosleep");
             autosleep_enable = TRUE;
@@ -155,12 +156,12 @@
     //UNUSED(name);
     //UNUSED(len);
     int len_t;
-
+/*
     if(!autosleep_enable) {
         LOGE("Autosleep not enable.");
         return -1;
     }
-
+*/
     len_t = strlen(name);
 
     if((name != NULL) && (len < 33) && (len_t < 33))
@@ -201,12 +202,12 @@
 int qser_wakelock_lock(int fd)
 {
     //UNUSED(fd);
-
+/*
     if(!autosleep_enable) {
         LOGE("Autosleep not enable.");
         return -1;
     }
-
+*/
     int i;
     for(i=1;i<LOCK_MAX_SIZE;i++)
     {
@@ -238,12 +239,12 @@
 int qser_wakelock_unlock(int fd)
 {
     //UNUSED(fd);
-
+/*
     if(!autosleep_enable) {
         LOGE("Autosleep not enable.");
         return -1;
     }
-
+*/
     int i;
     for(i=1;i<LOCK_MAX_SIZE;i++)
     {
@@ -275,12 +276,12 @@
 int qser_wakelock_destroy(int fd)
 {
     //UNUSED(fd);
-
+/*
     if(!autosleep_enable) {
         LOGE("Autosleep not enable.");
         return -1;
     }
-
+*/
     int i;
     for(i=1;i<LOCK_MAX_SIZE;i++)
     {