Lines Matching refs:env
55 JNIEnv* env = AndroidRuntime::getJNIEnv(); in checkCallbackThread() local
56 if (sCallbackEnv != env || sCallbackEnv == NULL) return false; in checkCallbackThread()
198 static void classInitNative(JNIEnv* env, jclass clazz) { in classInitNative() argument
203 method_onConnectStateChanged = env->GetMethodID(clazz, "onConnectStateChanged", "([BI)V"); in classInitNative()
204 method_onGetProtocolMode = env->GetMethodID(clazz, "onGetProtocolMode", "([BI)V"); in classInitNative()
205 method_onGetReport = env->GetMethodID(clazz, "onGetReport", "([B[BI)V"); in classInitNative()
206 method_onHandshake = env->GetMethodID(clazz, "onHandshake", "([BI)V"); in classInitNative()
207 method_onVirtualUnplug = env->GetMethodID(clazz, "onVirtualUnplug", "([BI)V"); in classInitNative()
233 static void initializeNative(JNIEnv *env, jobject object) { in initializeNative() argument
250 env->DeleteGlobalRef(mCallbacksObj); in initializeNative()
269 mCallbacksObj = env->NewGlobalRef(object); in initializeNative()
272 static void cleanupNative(JNIEnv *env, jobject object) { in cleanupNative() argument
289 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative()
293 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative()
296 static jboolean connectHidNative(JNIEnv *env, jobject object, jbyteArray address) { in connectHidNative() argument
302 addr = env->GetByteArrayElements(address, NULL); in connectHidNative()
313 env->ReleaseByteArrayElements(address, addr, 0); in connectHidNative()
318 static jboolean disconnectHidNative(JNIEnv *env, jobject object, jbyteArray address) { in disconnectHidNative() argument
324 addr = env->GetByteArrayElements(address, NULL); in disconnectHidNative()
335 env->ReleaseByteArrayElements(address, addr, 0); in disconnectHidNative()
340 static jboolean getProtocolModeNative(JNIEnv *env, jobject object, jbyteArray address) { in getProtocolModeNative() argument
347 addr = env->GetByteArrayElements(address, NULL); in getProtocolModeNative()
358 env->ReleaseByteArrayElements(address, addr, 0); in getProtocolModeNative()
363 static jboolean virtualUnPlugNative(JNIEnv *env, jobject object, jbyteArray address) { in virtualUnPlugNative() argument
369 addr = env->GetByteArrayElements(address, NULL); in virtualUnPlugNative()
379 env->ReleaseByteArrayElements(address, addr, 0); in virtualUnPlugNative()
385 static jboolean setProtocolModeNative(JNIEnv *env, jobject object, jbyteArray address, jint protoco… in setProtocolModeNative() argument
393 addr = env->GetByteArrayElements(address, NULL); in setProtocolModeNative()
416 env->ReleaseByteArrayElements(address, addr, 0); in setProtocolModeNative()
421 static jboolean getReportNative(JNIEnv *env, jobject object, jbyteArray address, jbyte reportType, … in getReportNative() argument
429 addr = env->GetByteArrayElements(address, NULL); in getReportNative()
443 env->ReleaseByteArrayElements(address, addr, 0); in getReportNative()
449 static jboolean setReportNative(JNIEnv *env, jobject object, jbyteArray address, jbyte reportType, … in setReportNative() argument
456 addr = env->GetByteArrayElements(address, NULL); in setReportNative()
462 const char *c_report = env->GetStringUTFChars(report, NULL); in setReportNative()
469 env->ReleaseStringUTFChars(report, c_report); in setReportNative()
470 env->ReleaseByteArrayElements(address, addr, 0); in setReportNative()
475 static jboolean sendDataNative(JNIEnv *env, jobject object, jbyteArray address, jstring report) { in sendDataNative() argument
482 addr = env->GetByteArrayElements(address, NULL); in sendDataNative()
487 const char *c_report = env->GetStringUTFChars(report, NULL); in sendDataNative()
493 env->ReleaseStringUTFChars(report, c_report); in sendDataNative()
494 env->ReleaseByteArrayElements(address, addr, 0); in sendDataNative()
514 int register_com_android_bluetooth_hid(JNIEnv* env) in register_com_android_bluetooth_hid() argument
516 return jniRegisterNativeMethods(env, "com/android/bluetooth/hid/HidService", in register_com_android_bluetooth_hid()