Loading libsuspend/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ cc_library { srcs: [ "autosuspend.c", "autosuspend_wakeup_count.c", "autosuspend_wakeup_count.cpp", ], export_include_dirs: ["include"], local_include_dirs: ["include"], Loading libsuspend/autosuspend_ops.h +2 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ struct autosuspend_ops { void (*set_wakeup_callback)(void (*func)(bool success)); }; __BEGIN_DECLS struct autosuspend_ops *autosuspend_wakeup_count_init(void); __END_DECLS #endif libsuspend/autosuspend_wakeup_count.c→libsuspend/autosuspend_wakeup_count.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -21,8 +21,8 @@ #include <fcntl.h> #include <pthread.h> #include <semaphore.h> #include <stddef.h> #include <stdbool.h> #include <stddef.h> #include <string.h> #include <sys/param.h> #include <sys/stat.h> Loading Loading @@ -68,8 +68,8 @@ static void* suspend_thread_func(void* arg __attribute__((unused))) { success = false; ALOGV("%s: read wakeup_count", __func__); lseek(wakeup_count_fd, 0, SEEK_SET); wakeup_count_len = TEMP_FAILURE_RETRY(read(wakeup_count_fd, wakeup_count, sizeof(wakeup_count))); wakeup_count_len = TEMP_FAILURE_RETRY(read(wakeup_count_fd, wakeup_count, sizeof(wakeup_count))); if (wakeup_count_len < 0) { strerror_r(errno, buf, sizeof(buf)); ALOGE("Error reading from %s: %s", SYS_POWER_WAKEUP_COUNT, buf); Loading Loading
libsuspend/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ cc_library { srcs: [ "autosuspend.c", "autosuspend_wakeup_count.c", "autosuspend_wakeup_count.cpp", ], export_include_dirs: ["include"], local_include_dirs: ["include"], Loading
libsuspend/autosuspend_ops.h +2 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ struct autosuspend_ops { void (*set_wakeup_callback)(void (*func)(bool success)); }; __BEGIN_DECLS struct autosuspend_ops *autosuspend_wakeup_count_init(void); __END_DECLS #endif
libsuspend/autosuspend_wakeup_count.c→libsuspend/autosuspend_wakeup_count.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -21,8 +21,8 @@ #include <fcntl.h> #include <pthread.h> #include <semaphore.h> #include <stddef.h> #include <stdbool.h> #include <stddef.h> #include <string.h> #include <sys/param.h> #include <sys/stat.h> Loading Loading @@ -68,8 +68,8 @@ static void* suspend_thread_func(void* arg __attribute__((unused))) { success = false; ALOGV("%s: read wakeup_count", __func__); lseek(wakeup_count_fd, 0, SEEK_SET); wakeup_count_len = TEMP_FAILURE_RETRY(read(wakeup_count_fd, wakeup_count, sizeof(wakeup_count))); wakeup_count_len = TEMP_FAILURE_RETRY(read(wakeup_count_fd, wakeup_count, sizeof(wakeup_count))); if (wakeup_count_len < 0) { strerror_r(errno, buf, sizeof(buf)); ALOGE("Error reading from %s: %s", SYS_POWER_WAKEUP_COUNT, buf); Loading