Loading system/hci/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ LOCAL_SRC_FILES := \ LOCAL_CFLAGS := -Wall -Werror $(bdroid_CFLAGS) LOCAL_MODULE := net_test_hci LOCAL_MODULE_TAGS := tests LOCAL_SHARED_LIBRARIES := liblog libdl LOCAL_SHARED_LIBRARIES := liblog libdl libpower LOCAL_STATIC_LIBRARIES := libbt-hci libosi libcutils libbtcore include $(BUILD_NATIVE_TEST) system/osi/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ LOCAL_SRC_FILES := \ LOCAL_CFLAGS := -Wall -UNDEBUG LOCAL_MODULE := net_test_osi LOCAL_MODULE_TAGS := tests LOCAL_SHARED_LIBRARIES := liblog LOCAL_SHARED_LIBRARIES := liblog libpower LOCAL_STATIC_LIBRARIES := libosi include $(BUILD_NATIVE_TEST) system/osi/src/alarm.c +4 −3 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <assert.h> #include <errno.h> #include <hardware/bluetooth.h> #include <hardware_legacy/power.h> #include <inttypes.h> #include <malloc.h> #include <string.h> Loading Loading @@ -303,8 +304,8 @@ static void reschedule_root_alarm(void) { int64_t next_expiration = next->deadline - now(); if (next_expiration < TIMER_INTERVAL_FOR_WAKELOCK_IN_MS) { if (!timer_set) { int status = bt_os_callouts->acquire_wake_lock(WAKE_LOCK_ID); if (status != BT_STATUS_SUCCESS) { int status = acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_ID); if (status != (int) strlen(WAKE_LOCK_ID)) { LOG_ERROR("%s unable to acquire wake lock: %d", __func__, status); goto done; } Loading @@ -320,7 +321,7 @@ static void reschedule_root_alarm(void) { done: timer_set = wakeup_time.it_value.tv_sec != 0 || wakeup_time.it_value.tv_nsec != 0; if (timer_was_set && !timer_set) { bt_os_callouts->release_wake_lock(WAKE_LOCK_ID); release_wake_lock(WAKE_LOCK_ID); } if (timer_settime(timer, TIMER_ABSTIME, &wakeup_time, NULL) == -1) Loading Loading
system/hci/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ LOCAL_SRC_FILES := \ LOCAL_CFLAGS := -Wall -Werror $(bdroid_CFLAGS) LOCAL_MODULE := net_test_hci LOCAL_MODULE_TAGS := tests LOCAL_SHARED_LIBRARIES := liblog libdl LOCAL_SHARED_LIBRARIES := liblog libdl libpower LOCAL_STATIC_LIBRARIES := libbt-hci libosi libcutils libbtcore include $(BUILD_NATIVE_TEST)
system/osi/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ LOCAL_SRC_FILES := \ LOCAL_CFLAGS := -Wall -UNDEBUG LOCAL_MODULE := net_test_osi LOCAL_MODULE_TAGS := tests LOCAL_SHARED_LIBRARIES := liblog LOCAL_SHARED_LIBRARIES := liblog libpower LOCAL_STATIC_LIBRARIES := libosi include $(BUILD_NATIVE_TEST)
system/osi/src/alarm.c +4 −3 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <assert.h> #include <errno.h> #include <hardware/bluetooth.h> #include <hardware_legacy/power.h> #include <inttypes.h> #include <malloc.h> #include <string.h> Loading Loading @@ -303,8 +304,8 @@ static void reschedule_root_alarm(void) { int64_t next_expiration = next->deadline - now(); if (next_expiration < TIMER_INTERVAL_FOR_WAKELOCK_IN_MS) { if (!timer_set) { int status = bt_os_callouts->acquire_wake_lock(WAKE_LOCK_ID); if (status != BT_STATUS_SUCCESS) { int status = acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_ID); if (status != (int) strlen(WAKE_LOCK_ID)) { LOG_ERROR("%s unable to acquire wake lock: %d", __func__, status); goto done; } Loading @@ -320,7 +321,7 @@ static void reschedule_root_alarm(void) { done: timer_set = wakeup_time.it_value.tv_sec != 0 || wakeup_time.it_value.tv_nsec != 0; if (timer_was_set && !timer_set) { bt_os_callouts->release_wake_lock(WAKE_LOCK_ID); release_wake_lock(WAKE_LOCK_ID); } if (timer_settime(timer, TIMER_ABSTIME, &wakeup_time, NULL) == -1) Loading