info("succeeds");
}
+static const bt_interface_t* btIf;
+
static void initializeNative(JNIEnv *env, jobject object) {
- static const bt_interface_t* btIf;
debug("pan");
if(btIf)
return;
}
static void cleanupNative(JNIEnv *env, jobject object) {
- const bt_interface_t* btInf;
bt_status_t status;
-
- if ( (btInf = getBluetoothInterface()) == NULL) {
- LOGE("Bluetooth module is not loaded");
- return;
- }
+ if (!btIf) return;
if (sPanIf !=NULL) {
LOGW("Cleaning up Bluetooth PAN Interface...");
env->DeleteGlobalRef(mCallbacksObj);
mCallbacksObj = NULL;
}
+ btIf = NULL;
}
static jboolean enablePanNative(JNIEnv *env, jobject object, jint local_role) {