From: Sharvil Nanavati Date: Fri, 4 Sep 2015 09:06:45 +0000 (-0700) Subject: DO NOT MERGE Revert "am b3ca1b37: resolved conflicts for merge of a905eb62 to mnc... X-Git-Tag: android-x86-7.1-r1~522^2~13 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e60250577ddd55c013f47a93946ce6367457b316;p=android-x86%2Fsystem-bt.git DO NOT MERGE Revert "am b3ca1b37: resolved conflicts for merge of a905eb62 to mnc-dr-dev-plus-aosp" This reverts commit 2f86b2fc188edb0ba50483e624bd982a594c6633, reversing changes made to 15c3ad9c08b864f63ed2581a10a65107fbe04752. Change-Id: I43500eb0513180db8ba5b4ecc9f2dec934173c7f --- diff --git a/hci/Android.mk b/hci/Android.mk index 689d9b462..dd25d3d4f 100644 --- a/hci/Android.mk +++ b/hci/Android.mk @@ -69,7 +69,7 @@ LOCAL_SRC_FILES := \ LOCAL_CFLAGS := -Wall -Werror $(bdroid_CFLAGS) LOCAL_MODULE := net_test_hci LOCAL_MODULE_TAGS := tests -LOCAL_SHARED_LIBRARIES := liblog libdl libpower +LOCAL_SHARED_LIBRARIES := liblog libdl LOCAL_STATIC_LIBRARIES := libbt-hci libosi libcutils libbtcore include $(BUILD_NATIVE_TEST) diff --git a/osi/Android.mk b/osi/Android.mk index 632fc3e85..2706ba948 100644 --- a/osi/Android.mk +++ b/osi/Android.mk @@ -121,7 +121,7 @@ LOCAL_SRC_FILES := $(btosiCommonTestSrc) LOCAL_CFLAGS := -Wall -UNDEBUG LOCAL_MODULE := net_test_osi LOCAL_MODULE_TAGS := tests -LOCAL_SHARED_LIBRARIES := liblog libpower +LOCAL_SHARED_LIBRARIES := liblog LOCAL_STATIC_LIBRARIES := libosi include $(BUILD_NATIVE_TEST) diff --git a/osi/src/alarm.c b/osi/src/alarm.c index f37080aec..1fe8a7f25 100644 --- a/osi/src/alarm.c +++ b/osi/src/alarm.c @@ -30,7 +30,6 @@ #include #include -#include #include "osi/include/allocator.h" #include "osi/include/list.h" @@ -308,8 +307,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 = acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_ID); - if (status != (int) strlen(WAKE_LOCK_ID)) { + int status = bt_os_callouts->acquire_wake_lock(WAKE_LOCK_ID); + if (status != BT_STATUS_SUCCESS) { LOG_ERROR(LOG_TAG, "%s unable to acquire wake lock: %d", __func__, status); goto done; } @@ -325,7 +324,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) { - release_wake_lock(WAKE_LOCK_ID); + bt_os_callouts->release_wake_lock(WAKE_LOCK_ID); } if (timer_settime(timer, TIMER_ABSTIME, &wakeup_time, NULL) == -1)