Loading android/app/jni/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_MULTILIB := 32 #LOCAL_CFLAGS += -O0 -g LOCAL_CFLAGS += -Wall -Wextra -Wno-unused-parameter LOCAL_MODULE := libbluetooth_jni LOCAL_MODULE_TAGS := optional Loading android/app/jni/com_android_bluetooth_a2dp.cpp +0 −26 Original line number Diff line number Diff line Loading @@ -100,36 +100,11 @@ static btav_callbacks_t sBluetoothA2dpCallbacks = { }; static void classInitNative(JNIEnv* env, jclass clazz) { int err; const bt_interface_t* btInf; bt_status_t status; method_onConnectionStateChanged = env->GetMethodID(clazz, "onConnectionStateChanged", "(I[B)V"); method_onAudioStateChanged = env->GetMethodID(clazz, "onAudioStateChanged", "(I[B)V"); /* if ( (btInf = getBluetoothInterface()) == NULL) { ALOGE("Bluetooth module is not loaded"); return; } if ( (sBluetoothA2dpInterface = (btav_interface_t *) btInf->get_profile_interface(BT_PROFILE_ADVANCED_AUDIO_ID)) == NULL) { ALOGE("Failed to get Bluetooth A2DP Interface"); return; } */ // TODO(BT) do this only once or // Do we need to do this every time the BT reenables? /* if ( (status = sBluetoothA2dpInterface->init(&sBluetoothA2dpCallbacks)) != BT_STATUS_SUCCESS) { ALOGE("Failed to initialize Bluetooth A2DP, status: %d", status); sBluetoothA2dpInterface = NULL; return; }*/ ALOGI("%s: succeeds", __FUNCTION__); } Loading Loading @@ -172,7 +147,6 @@ static void initNative(JNIEnv *env, jobject object) { static void cleanupNative(JNIEnv *env, jobject object) { const bt_interface_t* btInf; bt_status_t status; if ( (btInf = getBluetoothInterface()) == NULL) { ALOGE("Bluetooth module is not loaded"); Loading android/app/jni/com_android_bluetooth_a2dp_sink.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -148,10 +148,6 @@ static btav_callbacks_t sBluetoothA2dpCallbacks = { }; static void classInitNative(JNIEnv* env, jclass clazz) { int err; const bt_interface_t* btInf; bt_status_t status; method_onConnectionStateChanged = env->GetMethodID(clazz, "onConnectionStateChanged", "(I[B)V"); Loading Loading @@ -205,7 +201,6 @@ static void initNative(JNIEnv *env, jobject object) { static void cleanupNative(JNIEnv *env, jobject object) { const bt_interface_t* btInf; bt_status_t status; if ( (btInf = getBluetoothInterface()) == NULL) { ALOGE("Bluetooth module is not loaded"); Loading android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -289,7 +289,6 @@ static void device_found_callback(int num_properties, bt_property_t *properties) static void bond_state_changed_callback(bt_status_t status, bt_bdaddr_t *bd_addr, bt_bond_state_t state) { jbyteArray addr; int i; if (!checkCallbackThread()) { ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__); return; Loading @@ -315,7 +314,6 @@ static void acl_state_changed_callback(bt_status_t status, bt_bdaddr_t *bd_addr, bt_acl_state_t state) { jbyteArray addr; int i; if (!checkCallbackThread()) { ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__); return; Loading @@ -338,7 +336,6 @@ static void acl_state_changed_callback(bt_status_t status, bt_bdaddr_t *bd_addr, } static void discovery_state_changed_callback(bt_discovery_state_t state) { jbyteArray addr; if (!checkCallbackThread()) { ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__); return; Loading android/app/jni/com_android_bluetooth_gatt.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -952,7 +952,6 @@ static void initializeNative(JNIEnv *env, jobject object) { } static void cleanupNative(JNIEnv *env, jobject object) { bt_status_t status; if (!btIf) return; if (sGattIf != NULL) { Loading Loading
android/app/jni/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_MULTILIB := 32 #LOCAL_CFLAGS += -O0 -g LOCAL_CFLAGS += -Wall -Wextra -Wno-unused-parameter LOCAL_MODULE := libbluetooth_jni LOCAL_MODULE_TAGS := optional Loading
android/app/jni/com_android_bluetooth_a2dp.cpp +0 −26 Original line number Diff line number Diff line Loading @@ -100,36 +100,11 @@ static btav_callbacks_t sBluetoothA2dpCallbacks = { }; static void classInitNative(JNIEnv* env, jclass clazz) { int err; const bt_interface_t* btInf; bt_status_t status; method_onConnectionStateChanged = env->GetMethodID(clazz, "onConnectionStateChanged", "(I[B)V"); method_onAudioStateChanged = env->GetMethodID(clazz, "onAudioStateChanged", "(I[B)V"); /* if ( (btInf = getBluetoothInterface()) == NULL) { ALOGE("Bluetooth module is not loaded"); return; } if ( (sBluetoothA2dpInterface = (btav_interface_t *) btInf->get_profile_interface(BT_PROFILE_ADVANCED_AUDIO_ID)) == NULL) { ALOGE("Failed to get Bluetooth A2DP Interface"); return; } */ // TODO(BT) do this only once or // Do we need to do this every time the BT reenables? /* if ( (status = sBluetoothA2dpInterface->init(&sBluetoothA2dpCallbacks)) != BT_STATUS_SUCCESS) { ALOGE("Failed to initialize Bluetooth A2DP, status: %d", status); sBluetoothA2dpInterface = NULL; return; }*/ ALOGI("%s: succeeds", __FUNCTION__); } Loading Loading @@ -172,7 +147,6 @@ static void initNative(JNIEnv *env, jobject object) { static void cleanupNative(JNIEnv *env, jobject object) { const bt_interface_t* btInf; bt_status_t status; if ( (btInf = getBluetoothInterface()) == NULL) { ALOGE("Bluetooth module is not loaded"); Loading
android/app/jni/com_android_bluetooth_a2dp_sink.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -148,10 +148,6 @@ static btav_callbacks_t sBluetoothA2dpCallbacks = { }; static void classInitNative(JNIEnv* env, jclass clazz) { int err; const bt_interface_t* btInf; bt_status_t status; method_onConnectionStateChanged = env->GetMethodID(clazz, "onConnectionStateChanged", "(I[B)V"); Loading Loading @@ -205,7 +201,6 @@ static void initNative(JNIEnv *env, jobject object) { static void cleanupNative(JNIEnv *env, jobject object) { const bt_interface_t* btInf; bt_status_t status; if ( (btInf = getBluetoothInterface()) == NULL) { ALOGE("Bluetooth module is not loaded"); Loading
android/app/jni/com_android_bluetooth_btservice_AdapterService.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -289,7 +289,6 @@ static void device_found_callback(int num_properties, bt_property_t *properties) static void bond_state_changed_callback(bt_status_t status, bt_bdaddr_t *bd_addr, bt_bond_state_t state) { jbyteArray addr; int i; if (!checkCallbackThread()) { ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__); return; Loading @@ -315,7 +314,6 @@ static void acl_state_changed_callback(bt_status_t status, bt_bdaddr_t *bd_addr, bt_acl_state_t state) { jbyteArray addr; int i; if (!checkCallbackThread()) { ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__); return; Loading @@ -338,7 +336,6 @@ static void acl_state_changed_callback(bt_status_t status, bt_bdaddr_t *bd_addr, } static void discovery_state_changed_callback(bt_discovery_state_t state) { jbyteArray addr; if (!checkCallbackThread()) { ALOGE("Callback: '%s' is not called on the correct thread", __FUNCTION__); return; Loading
android/app/jni/com_android_bluetooth_gatt.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -952,7 +952,6 @@ static void initializeNative(JNIEnv *env, jobject object) { } static void cleanupNative(JNIEnv *env, jobject object) { bt_status_t status; if (!btIf) return; if (sGattIf != NULL) { Loading