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
199 method_onConnectStateChanged = env->GetMethodID(clazz, "onConnectStateChanged", "([BI)V"); in classInitNative()
200 method_onGetProtocolMode = env->GetMethodID(clazz, "onGetProtocolMode", "([BI)V"); in classInitNative()
201 method_onGetReport = env->GetMethodID(clazz, "onGetReport", "([B[BI)V"); in classInitNative()
202 method_onHandshake = env->GetMethodID(clazz, "onHandshake", "([BI)V"); in classInitNative()
203 method_onVirtualUnplug = env->GetMethodID(clazz, "onVirtualUnplug", "([BI)V"); in classInitNative()
208 static void initializeNative(JNIEnv *env, jobject object) { in initializeNative() argument
225 env->DeleteGlobalRef(mCallbacksObj); in initializeNative()
244 mCallbacksObj = env->NewGlobalRef(object); in initializeNative()
247 static void cleanupNative(JNIEnv *env, jobject object) { in cleanupNative() argument
263 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative()
267 env->DeleteGlobalRef(mCallbacksObj); in cleanupNative()
270 static jboolean connectHidNative(JNIEnv *env, jobject object, jbyteArray address) { in connectHidNative() argument
276 addr = env->GetByteArrayElements(address, NULL); in connectHidNative()
287 env->ReleaseByteArrayElements(address, addr, 0); in connectHidNative()
292 static jboolean disconnectHidNative(JNIEnv *env, jobject object, jbyteArray address) { in disconnectHidNative() argument
298 addr = env->GetByteArrayElements(address, NULL); in disconnectHidNative()
309 env->ReleaseByteArrayElements(address, addr, 0); in disconnectHidNative()
314 static jboolean getProtocolModeNative(JNIEnv *env, jobject object, jbyteArray address) { in getProtocolModeNative() argument
321 addr = env->GetByteArrayElements(address, NULL); in getProtocolModeNative()
332 env->ReleaseByteArrayElements(address, addr, 0); in getProtocolModeNative()
337 static jboolean virtualUnPlugNative(JNIEnv *env, jobject object, jbyteArray address) { in virtualUnPlugNative() argument
343 addr = env->GetByteArrayElements(address, NULL); in virtualUnPlugNative()
353 env->ReleaseByteArrayElements(address, addr, 0); in virtualUnPlugNative()
359 static jboolean setProtocolModeNative(JNIEnv *env, jobject object, jbyteArray address, jint protoco… in setProtocolModeNative() argument
367 addr = env->GetByteArrayElements(address, NULL); in setProtocolModeNative()
390 env->ReleaseByteArrayElements(address, addr, 0); in setProtocolModeNative()
395 static jboolean getReportNative(JNIEnv *env, jobject object, jbyteArray address, jbyte reportType, … in getReportNative() argument
403 addr = env->GetByteArrayElements(address, NULL); in getReportNative()
417 env->ReleaseByteArrayElements(address, addr, 0); in getReportNative()
423 static jboolean setReportNative(JNIEnv *env, jobject object, jbyteArray address, jbyte reportType, … in setReportNative() argument
430 addr = env->GetByteArrayElements(address, NULL); in setReportNative()
436 const char *c_report = env->GetStringUTFChars(report, NULL); in setReportNative()
443 env->ReleaseStringUTFChars(report, c_report); in setReportNative()
444 env->ReleaseByteArrayElements(address, addr, 0); in setReportNative()
449 static jboolean sendDataNative(JNIEnv *env, jobject object, jbyteArray address, jstring report) { in sendDataNative() argument
456 addr = env->GetByteArrayElements(address, NULL); in sendDataNative()
461 const char *c_report = env->GetStringUTFChars(report, NULL); in sendDataNative()
467 env->ReleaseStringUTFChars(report, c_report); in sendDataNative()
468 env->ReleaseByteArrayElements(address, addr, 0); in sendDataNative()
488 int register_com_android_bluetooth_hid(JNIEnv* env) in register_com_android_bluetooth_hid() argument
490 return jniRegisterNativeMethods(env, "com/android/bluetooth/hid/HidService", in register_com_android_bluetooth_hid()