/packages/modules/Bluetooth/android/app/jni/ |
D | com_android_bluetooth_avrcp_controller.cpp | 69 CallbackEnv sCallbackEnv(__func__); in btavrcp_connection_state_callback() local 70 if (!sCallbackEnv.valid()) return; in btavrcp_connection_state_callback() 77 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in btavrcp_connection_state_callback() 83 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in btavrcp_connection_state_callback() 85 sCallbackEnv->CallVoidMethod(sCallbacksObj, method_onConnectionStateChanged, in btavrcp_connection_state_callback() 105 CallbackEnv sCallbackEnv(__func__); in btavrcp_playerapplicationsetting_callback() local 106 if (!sCallbackEnv.valid()) return; in btavrcp_playerapplicationsetting_callback() 113 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in btavrcp_playerapplicationsetting_callback() 118 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in btavrcp_playerapplicationsetting_callback() 131 sCallbackEnv.get(), sCallbackEnv->NewByteArray(arraylen)); in btavrcp_playerapplicationsetting_callback() [all …]
|
D | com_android_bluetooth_gatt.cpp | 216 CallbackEnv sCallbackEnv(__func__); in btgattc_register_app_cb() local 217 if (!sCallbackEnv.valid() || !mCallbacksObj) return; in btgattc_register_app_cb() 218 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onClientRegistered, status, in btgattc_register_app_cb() 230 CallbackEnv sCallbackEnv(__func__); in btgattc_scan_result_cb() local 231 if (!sCallbackEnv.valid() || !mScanCallbacksObj) return; in btgattc_scan_result_cb() 233 ScopedLocalRef<jstring> address(sCallbackEnv.get(), in btgattc_scan_result_cb() 234 bdaddr2newjstr(sCallbackEnv.get(), bda)); in btgattc_scan_result_cb() 235 ScopedLocalRef<jbyteArray> jb(sCallbackEnv.get(), in btgattc_scan_result_cb() 236 sCallbackEnv->NewByteArray(adv_data.size())); in btgattc_scan_result_cb() 237 sCallbackEnv->SetByteArrayRegion(jb.get(), 0, adv_data.size(), in btgattc_scan_result_cb() [all …]
|
D | com_android_bluetooth_hfpclient.cpp | 58 CallbackEnv sCallbackEnv(__func__); in marshall_bda() local 59 if (!sCallbackEnv.valid()) return NULL; in marshall_bda() 61 jbyteArray addr = sCallbackEnv->NewByteArray(sizeof(RawAddress)); in marshall_bda() 66 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(RawAddress), in marshall_bda() 76 CallbackEnv sCallbackEnv(__func__); in connection_state_cb() local 77 if (!sCallbackEnv.valid() || mCallbacksObj == NULL) return; in connection_state_cb() 79 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), marshall_bda(bd_addr)); in connection_state_cb() 83 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectionStateChanged, in connection_state_cb() 91 CallbackEnv sCallbackEnv(__func__); in audio_state_cb() local 92 if (!sCallbackEnv.valid() || mCallbacksObj == NULL) return; in audio_state_cb() [all …]
|
D | com_android_bluetooth_avrcp_target.cpp | 353 CallbackEnv sCallbackEnv(__func__); in sendMediaKeyEvent() local 354 if (!sCallbackEnv.valid() || !mJavaInterface) return; in sendMediaKeyEvent() 355 sCallbackEnv->CallVoidMethod( in sendMediaKeyEvent() 524 CallbackEnv sCallbackEnv(__func__); in getSongInfo() local 525 if (!sCallbackEnv.valid() || !mJavaInterface) return SongInfo(); in getSongInfo() 528 sCallbackEnv->CallObjectMethod(mJavaInterface, method_getCurrentSongInfo); in getSongInfo() 529 SongInfo info = getSongInfoFromJavaObj(sCallbackEnv.get(), metadata); in getSongInfo() 530 sCallbackEnv->DeleteLocalRef(metadata); in getSongInfo() 537 CallbackEnv sCallbackEnv(__func__); in getCurrentPlayStatus() local 538 if (!sCallbackEnv.valid() || !mJavaInterface) return PlayStatus(); in getCurrentPlayStatus() [all …]
|
D | com_android_bluetooth_hfp.cpp | 60 CallbackEnv sCallbackEnv(__func__); in marshall_bda() local 61 if (!sCallbackEnv.valid()) return nullptr; in marshall_bda() 63 jbyteArray addr = sCallbackEnv->NewByteArray(sizeof(RawAddress)); in marshall_bda() 68 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(RawAddress), in marshall_bda() 86 CallbackEnv sCallbackEnv(__func__); in ConnectionStateCallback() local 87 if (!sCallbackEnv.valid() || !mCallbacksObj) return; in ConnectionStateCallback() 89 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), marshall_bda(bd_addr)); in ConnectionStateCallback() 92 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectionStateChanged, in ConnectionStateCallback() 101 CallbackEnv sCallbackEnv(__func__); in AudioStateCallback() local 102 if (!sCallbackEnv.valid() || !mCallbacksObj) return; in AudioStateCallback() [all …]
|
D | com_android_bluetooth_hap_client.cpp | 78 CallbackEnv sCallbackEnv(__func__); in OnConnectionState() local 79 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in OnConnectionState() 82 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in OnConnectionState() 88 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in OnConnectionState() 90 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectionStateChanged, in OnConnectionState() 96 CallbackEnv sCallbackEnv(__func__); in OnDeviceAvailable() local 97 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in OnDeviceAvailable() 100 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in OnDeviceAvailable() 105 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in OnDeviceAvailable() 108 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onDeviceAvailable, in OnDeviceAvailable() [all …]
|
D | com_android_bluetooth_vc.cpp | 55 CallbackEnv sCallbackEnv(__func__); in OnConnectionState() local 56 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in OnConnectionState() 59 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in OnConnectionState() 65 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in OnConnectionState() 67 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectionStateChanged, in OnConnectionState() 76 CallbackEnv sCallbackEnv(__func__); in OnVolumeStateChanged() local 77 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in OnVolumeStateChanged() 80 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in OnVolumeStateChanged() 86 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in OnVolumeStateChanged() 88 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onVolumeStateChanged, in OnVolumeStateChanged() [all …]
|
D | com_android_bluetooth_csip_set_coordinator.cpp | 81 CallbackEnv sCallbackEnv(__func__); in OnConnectionState() local 82 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in OnConnectionState() 85 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in OnConnectionState() 91 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in OnConnectionState() 93 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectionStateChanged, in OnConnectionState() 101 CallbackEnv sCallbackEnv(__func__); in OnDeviceAvailable() local 102 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in OnDeviceAvailable() 105 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in OnDeviceAvailable() 110 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in OnDeviceAvailable() 113 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onDeviceAvailable, in OnDeviceAvailable() [all …]
|
D | com_android_bluetooth_btservice_AdapterService.cpp | 122 CallbackEnv sCallbackEnv(__func__); in adapter_state_change_callback() local 123 if (!sCallbackEnv.valid()) return; in adapter_state_change_callback() 126 sCallbackEnv->CallVoidMethod(sJniCallbacksObj, method_stateChangeCallback, in adapter_state_change_callback() 156 CallbackEnv sCallbackEnv(__func__); in adapter_properties_callback() local 157 if (!sCallbackEnv.valid()) return; in adapter_properties_callback() 168 sCallbackEnv.get(), in adapter_properties_callback() 169 (jbyteArray)sCallbackEnv->NewByteArray(num_properties)); in adapter_properties_callback() 175 ScopedLocalRef<jclass> mclass(sCallbackEnv.get(), in adapter_properties_callback() 176 sCallbackEnv->GetObjectClass(val.get())); in adapter_properties_callback() 182 sCallbackEnv.get(), in adapter_properties_callback() [all …]
|
D | com_android_bluetooth_a2dp.cpp | 60 CallbackEnv sCallbackEnv(__func__); in bta2dp_connection_state_callback() local 61 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in bta2dp_connection_state_callback() 64 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in bta2dp_connection_state_callback() 70 sCallbackEnv->SetByteArrayRegion( in bta2dp_connection_state_callback() 73 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectionStateChanged, in bta2dp_connection_state_callback() 82 CallbackEnv sCallbackEnv(__func__); in bta2dp_audio_state_callback() local 83 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in bta2dp_audio_state_callback() 86 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in bta2dp_audio_state_callback() 92 sCallbackEnv->SetByteArrayRegion( in bta2dp_audio_state_callback() 95 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onAudioStateChanged, in bta2dp_audio_state_callback() [all …]
|
D | com_android_bluetooth_a2dp_sink.cpp | 43 CallbackEnv sCallbackEnv(__func__); in a2dp_sink_connection_state_callback() local 44 if (!sCallbackEnv.valid()) return; in a2dp_sink_connection_state_callback() 47 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in a2dp_sink_connection_state_callback() 53 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in a2dp_sink_connection_state_callback() 55 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectionStateChanged, in a2dp_sink_connection_state_callback() 65 CallbackEnv sCallbackEnv(__func__); in a2dp_sink_audio_state_callback() local 66 if (!sCallbackEnv.valid()) return; in a2dp_sink_audio_state_callback() 69 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in a2dp_sink_audio_state_callback() 75 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in a2dp_sink_audio_state_callback() 77 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onAudioStateChanged, in a2dp_sink_audio_state_callback() [all …]
|
D | com_android_bluetooth_hid_device.cpp | 38 CallbackEnv sCallbackEnv(__func__); in marshall_bda() local 39 if (!sCallbackEnv.valid()) return NULL; in marshall_bda() 41 jbyteArray addr = sCallbackEnv->NewByteArray(sizeof(RawAddress)); in marshall_bda() 46 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(RawAddress), in marshall_bda() 55 CallbackEnv sCallbackEnv(__func__); in application_state_callback() local 61 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), NULL); in application_state_callback() 71 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onApplicationStateChanged, in application_state_callback() 77 CallbackEnv sCallbackEnv(__func__); in connection_state_callback() local 79 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), marshall_bda(bd_addr)); in connection_state_callback() 85 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectStateChanged, in connection_state_callback() [all …]
|
D | com_android_bluetooth_hid_host.cpp | 39 CallbackEnv sCallbackEnv(__func__); in marshall_bda() local 40 if (!sCallbackEnv.valid()) return NULL; in marshall_bda() 42 jbyteArray addr = sCallbackEnv->NewByteArray(sizeof(RawAddress)); in marshall_bda() 47 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(RawAddress), in marshall_bda() 57 CallbackEnv sCallbackEnv(__func__); in connection_state_callback() local 58 if (!sCallbackEnv.valid()) return; in connection_state_callback() 63 ScopedLocalRef<jbyteArray> addr(sCallbackEnv.get(), marshall_bda(bd_addr)); in connection_state_callback() 69 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectStateChanged, in connection_state_callback() 80 CallbackEnv sCallbackEnv(__func__); in get_protocol_mode_callback() local 81 if (!sCallbackEnv.valid()) return; in get_protocol_mode_callback() [all …]
|
D | com_android_bluetooth_le_audio.cpp | 159 CallbackEnv sCallbackEnv(__func__); in OnInitialized() local 160 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in OnInitialized() 161 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onInitialized); in OnInitialized() 170 CallbackEnv sCallbackEnv(__func__); in OnConnectionState() local 171 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in OnConnectionState() 174 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in OnConnectionState() 180 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in OnConnectionState() 182 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectionStateChanged, in OnConnectionState() 190 CallbackEnv sCallbackEnv(__func__); in OnGroupStatus() local 191 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in OnGroupStatus() [all …]
|
D | com_android_bluetooth_pan.cpp | 33 CallbackEnv sCallbackEnv(__func__); in marshall_bda() local 34 if (!sCallbackEnv.valid()) return NULL; in marshall_bda() 36 jbyteArray addr = sCallbackEnv->NewByteArray(sizeof(RawAddress)); in marshall_bda() 41 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(RawAddress), in marshall_bda() 53 CallbackEnv sCallbackEnv(__func__); in control_state_callback() local 54 if (!sCallbackEnv.valid()) return; in control_state_callback() 55 ScopedLocalRef<jstring> js_ifname(sCallbackEnv.get(), in control_state_callback() 56 sCallbackEnv->NewStringUTF(ifname)); in control_state_callback() 57 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onControlStateChanged, in control_state_callback() 72 CallbackEnv sCallbackEnv(__func__); in connection_state_callback() local [all …]
|
D | com_android_bluetooth_btservice_BluetoothKeystore.cpp | 49 CallbackEnv sCallbackEnv(__func__); in set_encrypt_key_or_remove_key() local 50 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in set_encrypt_key_or_remove_key() 52 jstring j_prefixString = sCallbackEnv->NewStringUTF(prefixString.c_str()); in set_encrypt_key_or_remove_key() 54 sCallbackEnv->NewStringUTF(decryptedString.c_str()); in set_encrypt_key_or_remove_key() 56 sCallbackEnv->CallVoidMethod(mCallbacksObj, in set_encrypt_key_or_remove_key() 65 CallbackEnv sCallbackEnv(__func__); in get_key() local 66 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return ""; in get_key() 68 jstring j_prefixString = sCallbackEnv->NewStringUTF(prefixString.c_str()); in get_key() 70 jstring j_decrypt_str = (jstring)sCallbackEnv->CallObjectMethod( in get_key() 78 const char* value = sCallbackEnv->GetStringUTFChars(j_decrypt_str, nullptr); in get_key() [all …]
|
D | com_android_bluetooth_hearing_aid.cpp | 47 CallbackEnv sCallbackEnv(__func__); in OnConnectionState() local 48 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in OnConnectionState() 51 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in OnConnectionState() 57 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in OnConnectionState() 59 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectionStateChanged, in OnConnectionState() 68 CallbackEnv sCallbackEnv(__func__); in OnDeviceAvailable() local 69 if (!sCallbackEnv.valid() || mCallbacksObj == nullptr) return; in OnDeviceAvailable() 72 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in OnDeviceAvailable() 78 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in OnDeviceAvailable() 80 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onDeviceAvailable, in OnDeviceAvailable()
|
D | com_android_bluetooth_BluetoothQualityReport.cpp | 51 CallbackEnv sCallbackEnv(__func__); in bqr_delivery_callback() local 52 if (!sCallbackEnv.valid()) return; in bqr_delivery_callback() 57 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in bqr_delivery_callback() 63 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in bqr_delivery_callback() 67 sCallbackEnv.get(), sCallbackEnv->NewByteArray(bqr_raw_data.size())); in bqr_delivery_callback() 72 sCallbackEnv->SetByteArrayRegion(raw_data.get(), 0, bqr_raw_data.size(), in bqr_delivery_callback() 75 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_bqrDeliver, addr.get(), in bqr_delivery_callback()
|
D | com_android_bluetooth_sdp.cpp | 111 CallbackEnv sCallbackEnv(__func__); in sdp_search_callback() local 112 if (!sCallbackEnv.valid()) return; in sdp_search_callback() 115 sCallbackEnv.get(), sCallbackEnv->NewByteArray(sizeof(RawAddress))); in sdp_search_callback() 118 ScopedLocalRef<jbyteArray> uuid(sCallbackEnv.get(), in sdp_search_callback() 119 sCallbackEnv->NewByteArray(sizeof(Uuid))); in sdp_search_callback() 122 sCallbackEnv->SetByteArrayRegion(addr.get(), 0, sizeof(RawAddress), in sdp_search_callback() 124 sCallbackEnv->SetByteArrayRegion(uuid.get(), 0, sizeof(Uuid), in sdp_search_callback() 133 ScopedLocalRef<jstring> service_name(sCallbackEnv.get(), NULL); in sdp_search_callback() 137 (jstring)sCallbackEnv->NewStringUTF(record->mas.hdr.service_name)); in sdp_search_callback() 142 sCallbackEnv->CallVoidMethod( in sdp_search_callback() [all …]
|