Commit d7b16228 authored by jehan's avatar jehan

release localref on Android

parent 411e1c3e
......@@ -128,9 +128,10 @@ unsigned long wake_lock_acquire(const char *tag) {
(*env)->DeleteLocalRef(env, tagString);
if(lock != NULL) {
(*env)->CallVoidMethod(env, lock, ctx.acquireID);
lock = (*env)->NewGlobalRef(env, lock);
belle_sip_message("bellesip_wake_lock_acquire(): Android wake lock [%s] acquired [ref=%p]", tag, (void *)lock);
return (unsigned long)lock;
jobject lock2 = (*env)->NewGlobalRef(env, lock);
(*env)->DeleteLocalRef(env, lock);
belle_sip_message("bellesip_wake_lock_acquire(): Android wake lock [%s] acquired [ref=%p]", tag, (void *)lock2);
return (unsigned long)lock2;
} else {
belle_sip_message("bellesip_wake_lock_acquire(): wake lock creation failed");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment