bluetooth: Tone down the logspam
Change-Id: I2d1c37c36429d7a3646fa05237027edda6a7730e
diff --git a/jni/com_android_bluetooth_avrcp.cpp b/jni/com_android_bluetooth_avrcp.cpp
index 2a85e30..693847d 100644
--- a/jni/com_android_bluetooth_avrcp.cpp
+++ b/jni/com_android_bluetooth_avrcp.cpp
@@ -19,7 +19,7 @@
#define LOG_TAG "BluetoothAvrcpServiceJni"
-#define LOG_NDEBUG 0
+//#define LOG_NDEBUG 0
#include "com_android_bluetooth.h"
#include "hardware/bt_rc.h"
@@ -67,7 +67,7 @@
}
static void btavrcp_remote_features_callback(bt_bdaddr_t* bd_addr, btrc_remote_features_t features) {
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
jbyteArray addr;
if (!checkCallbackThread()) {
@@ -94,7 +94,7 @@
}
static void btavrcp_get_play_status_callback(bt_bdaddr_t* bd_addr) {
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
jbyteArray addr;
if (!checkCallbackThread()) {
@@ -120,7 +120,7 @@
static void btavrcp_get_player_seeting_value_callback(btrc_player_attr_t player_att,
bt_bdaddr_t* bd_addr) {
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
jbyteArray addr;
if (!checkCallbackThread()) {
@@ -146,7 +146,7 @@
}
static void btavrcp_get_player_attribute_id_callback(bt_bdaddr_t* bd_addr) {
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
jbyteArray addr;
if (!checkCallbackThread()) {
@@ -174,7 +174,7 @@
btrc_player_attr_t *p_attrs,
bt_bdaddr_t* bd_addr) {
jintArray attrs;
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
jbyteArray addr;
if (!checkCallbackThread()) {
@@ -213,7 +213,7 @@
{
jbyteArray attrs_ids;
jbyteArray attrs_value;
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
jbyteArray addr;
if (!checkCallbackThread()) {
@@ -256,7 +256,7 @@
bt_bdaddr_t* bd_addr)
{
jbyteArray attrs;
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
jbyteArray addr;
if (!checkCallbackThread()) {
@@ -291,7 +291,7 @@
bt_bdaddr_t* bd_addr)
{
jbyteArray Attr_Value ;
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
jbyteArray addr;
if (!checkCallbackThread()) {
@@ -326,7 +326,7 @@
jintArray attrs;
jbyteArray addr;
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
if (!checkCallbackThread()) {
ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__);
@@ -360,7 +360,7 @@
static void btavrcp_register_notification_callback(btrc_event_id_t event_id, uint32_t param,
bt_bdaddr_t* bd_addr) {
jbyteArray addr;
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
if (!checkCallbackThread()) {
ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__);
@@ -386,7 +386,7 @@
static void btavrcp_volume_change_callback(uint8_t volume, uint8_t ctype, bt_bdaddr_t* bd_addr) {
jbyteArray addr;
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
if (!checkCallbackThread()) {
ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__);
@@ -445,7 +445,7 @@
}
sCallbackEnv->SetIntArrayRegion(attrs, 0, num_attr, (jint *)param->attrs);
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
ALOGI("scope: %d", scope);
ALOGI("start entry: %d", start);
ALOGI("end entry: %d", end);
@@ -465,7 +465,7 @@
static void btavrcp_passthrough_command_callback(int id, int pressed , bt_bdaddr_t* bd_addr) {
jbyteArray addr;
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
if (!checkCallbackThread()) {
ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__);
@@ -490,8 +490,8 @@
static void btavrcp_set_addressed_player_callback(uint32_t player_id, bt_bdaddr_t* bd_addr) {
jbyteArray addr;
- ALOGI("%s", __FUNCTION__);
- ALOGI("player id: %d", player_id);
+ ALOGV("%s", __FUNCTION__);
+ ALOGV("player id: %d", player_id);
if (!checkCallbackThread()) {
ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__);
@@ -518,8 +518,8 @@
static void btavrcp_set_browsed_player_callback(uint32_t player_id, bt_bdaddr_t* bd_addr) {
jbyteArray addr;
- ALOGI("%s", __FUNCTION__);
- ALOGI("player id: %d", player_id);
+ ALOGV("%s", __FUNCTION__);
+ ALOGV("player id: %d", player_id);
if (!checkCallbackThread()) {
ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__);
@@ -544,8 +544,8 @@
static void btavrcp_change_path_callback(uint8_t direction, uint64_t uid, bt_bdaddr_t* bd_addr) {
jbyteArray addr;
- ALOGI("%s", __FUNCTION__);
- ALOGI("direction: %d, uid: %lu", direction, uid);
+ ALOGV("%s", __FUNCTION__);
+ ALOGV("direction: %d, uid: %lu", direction, uid);
if (!checkCallbackThread()) {
ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__);
@@ -570,8 +570,8 @@
static void btavrcp_play_item_callback(uint8_t scope, uint64_t uid, bt_bdaddr_t* bd_addr) {
jbyteArray addr;
- ALOGI("%s", __FUNCTION__);
- ALOGI("scope: %d, uid: %lu", scope, uid);
+ ALOGV("%s", __FUNCTION__);
+ ALOGV("scope: %d, uid: %lu", scope, uid);
if (!checkCallbackThread()) {
ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__);
@@ -607,7 +607,7 @@
num_attr = 7; // 0x00 signifies all attributes required in response
}
- ALOGI("%s", __FUNCTION__);
+ ALOGV("%s", __FUNCTION__);
if (!checkCallbackThread()) {
ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__);
@@ -733,7 +733,7 @@
env->GetMethodID(clazz, "getItemAttr", "(BJB[I[B)V");
method_onConnectionStateChanged =
env->GetMethodID(clazz, "onConnectionStateChanged", "(Z[B)V");
- ALOGI("%s: succeeds", __FUNCTION__);
+ ALOGV("%s: succeeds", __FUNCTION__);
}
static void initNative(JNIEnv *env, jobject object,
@@ -799,7 +799,7 @@
bt_status_t status;
jbyte *addr;
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
if (!sBluetoothMultiAvrcpInterface) return JNI_FALSE;
addr = env->GetByteArrayElements(address, NULL);
@@ -1245,7 +1245,7 @@
jbyte *addr;
btrc_register_notification_t param;
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
if (!sBluetoothMultiAvrcpInterface) return JNI_FALSE;
addr = env->GetByteArrayElements(address, NULL);
@@ -1274,7 +1274,7 @@
jbyte *trk;
int i;
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
if (!sBluetoothMultiAvrcpInterface) return JNI_FALSE;
addr = env->GetByteArrayElements(address, NULL);
@@ -1310,7 +1310,7 @@
btrc_register_notification_t param;
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
if (!sBluetoothMultiAvrcpInterface) return JNI_FALSE;
addr = env->GetByteArrayElements(address, NULL);
@@ -1335,9 +1335,9 @@
jbyte *addr;
//TODO: delete test code
- ALOGI("%s: jint: %d, uint8_t: %u", __FUNCTION__, volume, (uint8_t) volume);
+ ALOGV("%s: jint: %d, uint8_t: %u", __FUNCTION__, volume, (uint8_t) volume);
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
if (!sBluetoothMultiAvrcpInterface) return JNI_FALSE;
addr = env->GetByteArrayElements(address, NULL);
@@ -1361,8 +1361,8 @@
jbyte *addr;
btrc_register_notification_t param;
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
- ALOGI("playerId: %d", playerId);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("playerId: %d", playerId);
if (!sBluetoothMultiAvrcpInterface) return JNI_FALSE;
addr = env->GetByteArrayElements(address, NULL);
@@ -1388,7 +1388,7 @@
jbyte *addr;
btrc_register_notification_t param;
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
if (!sBluetoothMultiAvrcpInterface) return JNI_FALSE;
addr = env->GetByteArrayElements(address, NULL);
@@ -1412,7 +1412,7 @@
jbyte *addr;
btrc_register_notification_t param;
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
if (!sBluetoothMultiAvrcpInterface) return JNI_FALSE;
addr = env->GetByteArrayElements(address, NULL);
@@ -1450,7 +1450,7 @@
jsize utfStringLength = 0;
int num_attr;
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
if (!sBluetoothMultiAvrcpInterface) return JNI_FALSE;
addr = env->GetByteArrayElements(address, NULL);
@@ -1648,7 +1648,7 @@
int32_t checkLength = 0;
btrc_folder_list_entries_t param;
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
if (!sBluetoothMultiAvrcpInterface) return JNI_FALSE;
addr = env->GetByteArrayElements(address, NULL);
@@ -1751,7 +1751,7 @@
bt_status_t status;
jbyte *addr;
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
if (!sBluetoothMultiAvrcpInterface) return JNI_FALSE;
addr = env->GetByteArrayElements(address, NULL);
@@ -1861,7 +1861,7 @@
btrc_set_browsed_player_rsp_t param;
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
if (!sBluetoothMultiAvrcpInterface) return JNI_FALSE;
addr = env->GetByteArrayElements(address, NULL);
@@ -1928,8 +1928,8 @@
jniThrowIOException(env, EINVAL);
return JNI_FALSE;
}
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
- ALOGI("status: %d, itemCount: %l", errStatus, itemCount);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("status: %d, itemCount: %l", errStatus, itemCount);
if ((status = sBluetoothMultiAvrcpInterface->change_path_rsp((uint8_t)errStatus,
(uint32_t)itemCount,
@@ -1952,8 +1952,8 @@
jniThrowIOException(env, EINVAL);
return JNI_FALSE;
}
- ALOGI("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
- ALOGI("status: %d", errStatus);
+ ALOGV("%s: sBluetoothMultiAvrcpInterface: %p", __FUNCTION__, sBluetoothMultiAvrcpInterface);
+ ALOGV("status: %d", errStatus);
if ((status = sBluetoothMultiAvrcpInterface->play_item_rsp((uint8_t)errStatus,
(bt_bdaddr_t *)addr))!= BT_STATUS_SUCCESS) {
diff --git a/src/com/android/bluetooth/avrcp/Avrcp.java b/src/com/android/bluetooth/avrcp/Avrcp.java
index 97a03b3..7f0a033 100644
--- a/src/com/android/bluetooth/avrcp/Avrcp.java
+++ b/src/com/android/bluetooth/avrcp/Avrcp.java
@@ -80,7 +80,7 @@
* support metadata, play status and event notification
*/
public final class Avrcp {
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
private static final String TAG = "Avrcp";
private Context mContext;