Lines Matching refs:env

45     JNIEnv* env = AndroidRuntime::getJNIEnv();  in checkCallbackThread()  local
46 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; in checkCallbackThread()
103 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
105 env->GetMethodID(clazz, "onConnectionStateChanged", "(I[B)V"); in classInitNative()
108 env->GetMethodID(clazz, "onAudioStateChanged", "(I[B)V"); in classInitNative()
113 static void initNative(JNIEnv *env, jobject object) { in initNative() argument
130 env->DeleteGlobalRef(mCallbacksObj); in initNative()
146 mCallbacksObj = env->NewGlobalRef(object); in initNative()
149 static void cleanupNative(JNIEnv *env, jobject object) { in cleanupNative() argument
163 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative()
168 static jboolean connectA2dpNative(JNIEnv *env, jobject object, jbyteArray address) { in connectA2dpNative() argument
176 addr = env->GetByteArrayElements(address, NULL); in connectA2dpNative()
179 jniThrowIOException(env, EINVAL); in connectA2dpNative()
186 env->ReleaseByteArrayElements(address, addr, 0); in connectA2dpNative()
190 static jboolean disconnectA2dpNative(JNIEnv *env, jobject object, jbyteArray address) { in disconnectA2dpNative() argument
196 addr = env->GetByteArrayElements(address, NULL); in disconnectA2dpNative()
198 jniThrowIOException(env, EINVAL); in disconnectA2dpNative()
205 env->ReleaseByteArrayElements(address, addr, 0); in disconnectA2dpNative()
217 int register_com_android_bluetooth_a2dp(JNIEnv* env) in register_com_android_bluetooth_a2dp() argument
219 return jniRegisterNativeMethods(env, "com/android/bluetooth/a2dp/A2dpStateMachine", in register_com_android_bluetooth_a2dp()