Lines Matching refs:env
47 JNIEnv* env = AndroidRuntime::getJNIEnv(); in checkCallbackThread() local
48 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; in checkCallbackThread()
161 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
163 env->GetMethodID(clazz, "getRcFeatures", "([BI)V"); in classInitNative()
165 env->GetMethodID(clazz, "getPlayStatus", "()V"); in classInitNative()
168 env->GetMethodID(clazz, "getElementAttr", "(B[I)V"); in classInitNative()
171 env->GetMethodID(clazz, "registerNotification", "(II)V"); in classInitNative()
174 env->GetMethodID(clazz, "volumeChangeCallback", "(II)V"); in classInitNative()
177 env->GetMethodID(clazz, "handlePassthroughCmd", "(II)V"); in classInitNative()
182 static void initNative(JNIEnv *env, jobject object) { in initNative() argument
199 env->DeleteGlobalRef(mCallbacksObj); in initNative()
216 mCallbacksObj = env->NewGlobalRef(object); in initNative()
219 static void cleanupNative(JNIEnv *env, jobject object) { in cleanupNative() argument
233 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative()
238 static jboolean getPlayStatusRspNative(JNIEnv *env, jobject object, jint playStatus, in getPlayStatusRspNative() argument
253 static jboolean getElementAttrRspNative(JNIEnv *env, jobject object, jbyte numAttr, in getElementAttrRspNative() argument
275 attr = env->GetIntArrayElements(attrIds, NULL); in getElementAttrRspNative()
278 jniThrowIOException(env, EINVAL); in getElementAttrRspNative()
283 text = (jstring) env->GetObjectArrayElement(textArray, i); in getElementAttrRspNative()
284 textStr = env->GetStringUTFChars(text, NULL); in getElementAttrRspNative()
287 env->DeleteLocalRef(text); in getElementAttrRspNative()
299 env->ReleaseStringUTFChars(text, textStr); in getElementAttrRspNative()
300 env->DeleteLocalRef(text); in getElementAttrRspNative()
305 env->ReleaseIntArrayElements(attrIds, attr, 0); in getElementAttrRspNative()
315 env->ReleaseIntArrayElements(attrIds, attr, 0); in getElementAttrRspNative()
319 static jboolean registerNotificationRspPlayStatusNative(JNIEnv *env, jobject object, in registerNotificationRspPlayStatusNative() argument
336 static jboolean registerNotificationRspTrackChangeNative(JNIEnv *env, jobject object, in registerNotificationRspTrackChangeNative() argument
346 trk = env->GetByteArrayElements(track, NULL); in registerNotificationRspTrackChangeNative()
348 jniThrowIOException(env, EINVAL); in registerNotificationRspTrackChangeNative()
361 env->ReleaseByteArrayElements(track, trk, 0); in registerNotificationRspTrackChangeNative()
365 static jboolean registerNotificationRspPlayPosNative(JNIEnv *env, jobject object, in registerNotificationRspPlayPosNative() argument
382 static jboolean setVolumeNative(JNIEnv *env, jobject object, jint volume) { in setVolumeNative() argument
414 int register_com_android_bluetooth_avrcp(JNIEnv* env) in register_com_android_bluetooth_avrcp() argument
416 return jniRegisterNativeMethods(env, "com/android/bluetooth/avrcp/Avrcp", in register_com_android_bluetooth_avrcp()