Lines Matching refs:env
66 JNIEnv* env = AndroidRuntime::getJNIEnv(); in checkCallbackThread() local
67 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; in checkCallbackThread()
401 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
403 env->GetMethodID(clazz, "onConnectionStateChanged", "(I[B)V"); in classInitNative()
404 method_onAudioStateChanged = env->GetMethodID(clazz, "onAudioStateChanged", "(I[B)V"); in classInitNative()
405 method_onVrStateChanged = env->GetMethodID(clazz, "onVrStateChanged", "(I[B)V"); in classInitNative()
406 method_onAnswerCall = env->GetMethodID(clazz, "onAnswerCall", "([B)V"); in classInitNative()
407 method_onHangupCall = env->GetMethodID(clazz, "onHangupCall", "([B)V"); in classInitNative()
408 method_onVolumeChanged = env->GetMethodID(clazz, "onVolumeChanged", "(II[B)V"); in classInitNative()
409 method_onDialCall = env->GetMethodID(clazz, "onDialCall", "(Ljava/lang/String;[B)V"); in classInitNative()
410 method_onSendDtmf = env->GetMethodID(clazz, "onSendDtmf", "(I[B)V"); in classInitNative()
411 method_onNoiceReductionEnable = env->GetMethodID(clazz, "onNoiceReductionEnable", "(Z[B)V"); in classInitNative()
412 method_onWBS = env->GetMethodID(clazz,"onWBS","(I[B)V"); in classInitNative()
413 method_onAtChld = env->GetMethodID(clazz, "onAtChld", "(I[B)V"); in classInitNative()
414 method_onAtCnum = env->GetMethodID(clazz, "onAtCnum", "([B)V"); in classInitNative()
415 method_onAtCind = env->GetMethodID(clazz, "onAtCind", "([B)V"); in classInitNative()
416 method_onAtCops = env->GetMethodID(clazz, "onAtCops", "([B)V"); in classInitNative()
417 method_onAtClcc = env->GetMethodID(clazz, "onAtClcc", "([B)V"); in classInitNative()
418 method_onUnknownAt = env->GetMethodID(clazz, "onUnknownAt", "(Ljava/lang/String;[B)V"); in classInitNative()
419 method_onKeyPressed = env->GetMethodID(clazz, "onKeyPressed", "([B)V"); in classInitNative()
424 static void initializeNative(JNIEnv *env, jobject object, jint max_hf_clients) { in initializeNative() argument
441 env->DeleteGlobalRef(mCallbacksObj); in initializeNative()
458 mCallbacksObj = env->NewGlobalRef(object); in initializeNative()
461 static void cleanupNative(JNIEnv *env, jobject object) { in cleanupNative() argument
477 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative()
482 static jboolean connectHfpNative(JNIEnv *env, jobject object, jbyteArray address) { in connectHfpNative() argument
489 addr = env->GetByteArrayElements(address, NULL); in connectHfpNative()
491 jniThrowIOException(env, EINVAL); in connectHfpNative()
498 env->ReleaseByteArrayElements(address, addr, 0); in connectHfpNative()
502 static jboolean disconnectHfpNative(JNIEnv *env, jobject object, jbyteArray address) { in disconnectHfpNative() argument
508 addr = env->GetByteArrayElements(address, NULL); in disconnectHfpNative()
510 jniThrowIOException(env, EINVAL); in disconnectHfpNative()
517 env->ReleaseByteArrayElements(address, addr, 0); in disconnectHfpNative()
521 static jboolean connectAudioNative(JNIEnv *env, jobject object, jbyteArray address) { in connectAudioNative() argument
527 addr = env->GetByteArrayElements(address, NULL); in connectAudioNative()
529 jniThrowIOException(env, EINVAL); in connectAudioNative()
537 env->ReleaseByteArrayElements(address, addr, 0); in connectAudioNative()
541 static jboolean disconnectAudioNative(JNIEnv *env, jobject object, jbyteArray address) { in disconnectAudioNative() argument
547 addr = env->GetByteArrayElements(address, NULL); in disconnectAudioNative()
549 jniThrowIOException(env, EINVAL); in disconnectAudioNative()
557 env->ReleaseByteArrayElements(address, addr, 0); in disconnectAudioNative()
561 static jboolean startVoiceRecognitionNative(JNIEnv *env, jobject object, jbyteArray address) { in startVoiceRecognitionNative() argument
566 addr = env->GetByteArrayElements(address, NULL); in startVoiceRecognitionNative()
568 jniThrowIOException(env, EINVAL); in startVoiceRecognitionNative()
576 env->ReleaseByteArrayElements(address, addr, 0); in startVoiceRecognitionNative()
580 static jboolean stopVoiceRecognitionNative(JNIEnv *env, jobject object, jbyteArray address) { in stopVoiceRecognitionNative() argument
585 addr = env->GetByteArrayElements(address, NULL); in stopVoiceRecognitionNative()
587 jniThrowIOException(env, EINVAL); in stopVoiceRecognitionNative()
595 env->ReleaseByteArrayElements(address, addr, 0); in stopVoiceRecognitionNative()
599 static jboolean setVolumeNative(JNIEnv *env, jobject object, jint volume_type, in setVolumeNative() argument
605 addr = env->GetByteArrayElements(address, NULL); in setVolumeNative()
607 jniThrowIOException(env, EINVAL); in setVolumeNative()
615 env->ReleaseByteArrayElements(address, addr, 0); in setVolumeNative()
619 static jboolean notifyDeviceStatusNative(JNIEnv *env, jobject object, in notifyDeviceStatusNative() argument
633 static jboolean copsResponseNative(JNIEnv *env, jobject object, jstring operator_str, in copsResponseNative() argument
640 addr = env->GetByteArrayElements(address, NULL); in copsResponseNative()
642 jniThrowIOException(env, EINVAL); in copsResponseNative()
646 operator_name = env->GetStringUTFChars(operator_str, NULL); in copsResponseNative()
652 env->ReleaseByteArrayElements(address, addr, 0); in copsResponseNative()
653 env->ReleaseStringUTFChars(operator_str, operator_name); in copsResponseNative()
657 static jboolean cindResponseNative(JNIEnv *env, jobject object, in cindResponseNative() argument
666 addr = env->GetByteArrayElements(address, NULL); in cindResponseNative()
668 jniThrowIOException(env, EINVAL); in cindResponseNative()
677 env->ReleaseByteArrayElements(address, addr, 0); in cindResponseNative()
682 static jboolean atResponseStringNative(JNIEnv *env, jobject object, jstring response_str, in atResponseStringNative() argument
689 addr = env->GetByteArrayElements(address, NULL); in atResponseStringNative()
691 jniThrowIOException(env, EINVAL); in atResponseStringNative()
695 response = env->GetStringUTFChars(response_str, NULL); in atResponseStringNative()
701 env->ReleaseByteArrayElements(address, addr, 0); in atResponseStringNative()
702 env->ReleaseStringUTFChars(response_str, response); in atResponseStringNative()
706 static jboolean atResponseCodeNative(JNIEnv *env, jobject object, jint response_code, in atResponseCodeNative() argument
712 addr = env->GetByteArrayElements(address, NULL); in atResponseCodeNative()
714 jniThrowIOException(env, EINVAL); in atResponseCodeNative()
722 env->ReleaseByteArrayElements(address, addr, 0); in atResponseCodeNative()
726 static jboolean clccResponseNative(JNIEnv *env, jobject object, jint index, jint dir, in clccResponseNative() argument
734 addr = env->GetByteArrayElements(address, NULL); in clccResponseNative()
736 jniThrowIOException(env, EINVAL); in clccResponseNative()
741 number = env->GetStringUTFChars(number_str, NULL); in clccResponseNative()
749 env->ReleaseByteArrayElements(address, addr, 0); in clccResponseNative()
751 env->ReleaseStringUTFChars(number_str, number); in clccResponseNative()
755 static jboolean phoneStateChangeNative(JNIEnv *env, jobject object, jint num_active, jint num_held, in phoneStateChangeNative() argument
761 number = env->GetStringUTFChars(number_str, NULL); in phoneStateChangeNative()
768 env->ReleaseStringUTFChars(number_str, number); in phoneStateChangeNative()
773 static jboolean configureWBSNative(JNIEnv *env, jobject object, jbyteArray address, in configureWBSNative() argument
780 addr = env->GetByteArrayElements(address, NULL); in configureWBSNative()
782 jniThrowIOException(env, EINVAL); in configureWBSNative()
790 env->ReleaseByteArrayElements(address, addr, 0); in configureWBSNative()
816 int register_com_android_bluetooth_hfp(JNIEnv* env) in register_com_android_bluetooth_hfp() argument
818 return jniRegisterNativeMethods(env, "com/android/bluetooth/hfp/HeadsetStateMachine", in register_com_android_bluetooth_hfp()