/packages/apps/Bluetooth/jni/ |
com_android_bluetooth_hfp.cpp | 56 static JNIEnv *sCallbackEnv = NULL; 60 // Caching this could cause this sCallbackEnv to go out-of-sync 63 //if (sCallbackEnv == NULL) { 64 sCallbackEnv = getCallbackEnv(); 67 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; 74 addr = sCallbackEnv->NewByteArray(sizeof(bt_bdaddr_t)); 77 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); 80 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(bt_bdaddr_t), (jbyte *) bd_addr); 90 addr = sCallbackEnv->NewByteArray(sizeof(bt_bdaddr_t)) [all...] |
com_android_bluetooth_hfpclient.cpp | 36 static JNIEnv *sCallbackEnv = NULL; 62 // Caching this could cause this sCallbackEnv to go out-of-sync 65 sCallbackEnv = getCallbackEnv(); 67 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; 76 addr = sCallbackEnv->NewByteArray(sizeof(bt_bdaddr_t)); 79 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); 83 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(bt_bdaddr_t), (jbyte*) bd_addr); 84 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectionStateChanged, (jint) state, (jint) peer_feat, (jint) chld_feat, addr); 85 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__) [all...] |
com_android_bluetooth_a2dp.cpp | 34 static JNIEnv *sCallbackEnv = NULL; 38 // Caching this could cause this sCallbackEnv to go out-of-sync 41 //if (sCallbackEnv == NULL) { 42 sCallbackEnv = getCallbackEnv(); 46 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; 59 addr = sCallbackEnv->NewByteArray(sizeof(bt_bdaddr_t)); 62 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); 66 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(bt_bdaddr_t), (jbyte*) bd_addr); 67 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectionStateChanged, (jint) state [all...] |
com_android_bluetooth_hid.cpp | 44 static JNIEnv *sCallbackEnv = NULL; 49 // Caching this could cause this sCallbackEnv to go out-of-sync 53 sCallbackEnv = getCallbackEnv(); 56 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; 64 addr = sCallbackEnv->NewByteArray(sizeof(bt_bdaddr_t)); 67 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); 70 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(bt_bdaddr_t), (jbyte *) bd_addr); 72 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectStateChanged, addr, (jint) state); 73 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__) [all...] |
com_android_bluetooth_a2dp_sink.cpp | 35 static JNIEnv *sCallbackEnv = NULL; 39 // Caching this could cause this sCallbackEnv to go out-of-sync 42 //if (sCallbackEnv == NULL) { 43 sCallbackEnv = getCallbackEnv(); 47 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; 60 addr = sCallbackEnv->NewByteArray(sizeof(bt_bdaddr_t)); 63 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); 67 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(bt_bdaddr_t), (jbyte*) bd_addr); 68 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onConnectionStateChanged, (jint) state [all...] |
com_android_bluetooth_avrcp_controller.cpp | 34 static JNIEnv *sCallbackEnv = NULL; 38 // Caching this could cause this sCallbackEnv to go out-of-sync 41 sCallbackEnv = getCallbackEnv(); 44 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; 57 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_handlePassthroughRsp, (jint)id, 59 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); 73 addr = sCallbackEnv->NewByteArray(sizeof(bt_bdaddr_t)); 76 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); 80 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(bt_bdaddr_t), (jbyte*) bd_addr) [all...] |
com_android_bluetooth_avrcp.cpp | 38 static JNIEnv *sCallbackEnv = NULL; 42 // Caching this could cause this sCallbackEnv to go out-of-sync 45 sCallbackEnv = getCallbackEnv(); 48 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; 60 addr = sCallbackEnv->NewByteArray(sizeof(bt_bdaddr_t)); 63 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); 67 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(bt_bdaddr_t), (jbyte*) bd_addr); 68 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_getRcFeatures, addr, (jint)features); 69 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__) [all...] |
com_android_bluetooth_hdp.cpp | 41 static JNIEnv *sCallbackEnv = NULL; 44 sCallbackEnv = getCallbackEnv(); 47 if (sCallbackEnv != env || sCallbackEnv == NULL) { 48 ALOGE("Callback env check fail: env: %p, callback: %p", env, sCallbackEnv); 57 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onAppRegistrationState, app_id, 59 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); 68 addr = sCallbackEnv->NewByteArray(sizeof(bt_bdaddr_t)); 71 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); 77 fileDescriptor = jniCreateFileDescriptor(sCallbackEnv, fd) [all...] |
com_android_bluetooth_gatt.cpp | 201 static JNIEnv *sCallbackEnv = NULL; 204 sCallbackEnv = getCallbackEnv(); 207 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; 218 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onClientRegistered, status, 220 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); 232 jstring address = sCallbackEnv->NewStringUTF(c_address); 233 jbyteArray jb = sCallbackEnv->NewByteArray(62); 234 sCallbackEnv->SetByteArrayRegion(jb, 0, 62, (jbyte *) adv_data); 236 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onScanResul [all...] |
com_android_bluetooth_pan.cpp | 49 static JNIEnv *sCallbackEnv = NULL; 52 sCallbackEnv = getCallbackEnv(); 55 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; 63 jstring js_ifname = sCallbackEnv->NewStringUTF(ifname); 64 sCallbackEnv->CallVoidMethod(mCallbacksObj, method_onControlStateChanged, (jint)local_role, (jint)state, 66 sCallbackEnv->DeleteLocalRef(js_ifname); 74 addr = sCallbackEnv->NewByteArray(sizeof(bt_bdaddr_t)); 77 checkAndClearExceptionFromCallback(sCallbackEnv, __FUNCTION__); 80 sCallbackEnv->SetByteArrayRegion(addr, 0, sizeof(bt_bdaddr_t), (jbyte *) bd_addr) [all...] |
/frameworks/base/services/core/jni/ |
com_android_server_location_FlpHardwareProvider.cpp | 31 static JNIEnv *sCallbackEnv = NULL; 80 if(sCallbackEnv == NULL || sCallbackEnv != env) { 81 ALOGE("CallbackThread check fail: env=%p, expected=%p", env, sCallbackEnv); 94 if(sCallbackEnv != NULL) { 108 jint attachResult = javaVm->AttachCurrentThread(&sCallbackEnv, &args); 114 ALOGV("Callback thread attached: %p", sCallbackEnv); 131 sCallbackEnv = NULL; 383 jclass locationClass = sCallbackEnv->FindClass(LOCATION_CLASS_NAME); 384 jmethodID locationCtor = sCallbackEnv->GetMethodID [all...] |