summaryrefslogtreecommitdiffstats
path: root/utils/src/bt_utils.c
diff options
context:
space:
mode:
authorSharvil Nanavati <sharvil@google.com>2014-12-23 23:08:58 -0800
committerAndre Eisenbach <eisenbach@google.com>2015-03-16 16:51:40 -0700
commit44802768c447ab480d4227b3a852a97d923b816d (patch)
tree52f2bdda1fa934f89af3b2161a26cb47170f8567 /utils/src/bt_utils.c
parent3b24dfb998e76b389b9c850f53e0c8016383f2b8 (diff)
downloadandroid_system_bt-44802768c447ab480d4227b3a852a97d923b816d.tar.gz
android_system_bt-44802768c447ab480d4227b3a852a97d923b816d.tar.bz2
android_system_bt-44802768c447ab480d4227b3a852a97d923b816d.zip
Add platform-independent logging macros to OSI.
These macros should replace ALOG* and the various trace macros used throughout bluedroid. This change eliminates all uses of the ALOG* macros in favor of the new ones.
Diffstat (limited to 'utils/src/bt_utils.c')
-rw-r--r--utils/src/bt_utils.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/utils/src/bt_utils.c b/utils/src/bt_utils.c
index 06f5ac202..d0ee1720c 100644
--- a/utils/src/bt_utils.c
+++ b/utils/src/bt_utils.c
@@ -25,6 +25,8 @@
*
***********************************************************************************/
+#define LOG_TAG "BT_UTILS"
+
#include <cutils/properties.h>
#include <cutils/sched_policy.h>
#include <errno.h>
@@ -35,13 +37,10 @@
#include <unistd.h>
#include <utils/ThreadDefs.h>
-#define LOG_TAG "BT_UTILS"
-
-#include <utils/Log.h>
-
#include "bt_types.h"
#include "bt_utils.h"
#include "module.h"
+#include "osi/include/log.h"
/*******************************************************************************
** Type definitions for callback functions
@@ -131,7 +130,7 @@ void raise_priority_a2dp(tHIGH_PRIORITY_TASK high_task) {
pthread_mutex_unlock(&gIdxLock);
if (rc) {
- ALOGW("failed to change sched policy, tid %d, err: %d", tid, errno);
+ LOG_WARN("failed to change sched policy, tid %d, err: %d", tid, errno);
}
// always use urgent priority for HCI worker thread until we can adjust
@@ -142,7 +141,7 @@ void raise_priority_a2dp(tHIGH_PRIORITY_TASK high_task) {
priority = ANDROID_PRIORITY_URGENT_AUDIO;
if (setpriority(PRIO_PROCESS, tid, priority) < 0) {
- ALOGW("failed to change priority tid: %d to %d", tid, priority);
+ LOG_WARN("failed to change priority tid: %d to %d", tid, priority);
}
}
@@ -169,7 +168,7 @@ void adjust_priority_a2dp(int start) {
{
if (setpriority(PRIO_PROCESS, tid, priority) < 0)
{
- ALOGW("failed to change priority tid: %d to %d", tid, priority);
+ LOG_WARN("failed to change priority tid: %d to %d", tid, priority);
}
}
}