mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Fixed issue with removeListener in Java wrapper
This commit is contained in:
parent
4a5d2e4cb5
commit
a573636c6b
1 changed files with 3 additions and 1 deletions
|
|
@ -386,8 +386,10 @@ void Java_{{jniPackage}}{{className}}Impl_removeListener(JNIEnv* env, jobject th
|
|||
bctbx_list_t *it;
|
||||
for (it = (bctbx_list_t *)cbs_list; it != NULL; it = it->next) {
|
||||
{{classCName}}Cbs *cbs = ({{classCName}}Cbs *)it->data;
|
||||
if ({{cPrefix}}_cbs_get_user_data(cbs) == jlistener) {
|
||||
jobject listener = (jobject) {{cPrefix}}_cbs_get_user_data(cbs);
|
||||
if (env->IsSameObject(listener, jlistener)) {
|
||||
{{cPrefix}}_remove_callbacks(cptr, cbs);
|
||||
env->DeleteGlobalRef(listener);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue