mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
No lite background mode with active call
This commit is contained in:
parent
e6207f08b1
commit
9ebc8e70b7
1 changed files with 13 additions and 9 deletions
|
|
@ -809,15 +809,19 @@ static LinphoneCoreVTable linphonec_vtable = {
|
|||
linphone_core_get_default_proxy(theLinphoneCore, &proxyCfg);
|
||||
|
||||
|
||||
if (proxyCfg && [[NSUserDefaults standardUserDefaults] boolForKey:@"backgroundmode_preference"]) {
|
||||
//For registration register
|
||||
[self refreshRegisters];
|
||||
//wait for registration answer
|
||||
int i=0;
|
||||
while (!linphone_proxy_config_is_registered(proxyCfg) && i++<40 ) {
|
||||
linphone_core_iterate(theLinphoneCore);
|
||||
usleep(100000);
|
||||
}
|
||||
if ((proxyCfg || linphone_core_get_calls_nb(theLinphoneCore) > 0) &&
|
||||
[[NSUserDefaults standardUserDefaults] boolForKey:@"backgroundmode_preference"]) {
|
||||
|
||||
if(proxyCfg != NULL) {
|
||||
//For registration register
|
||||
[self refreshRegisters];
|
||||
//wait for registration answer
|
||||
int i=0;
|
||||
while (!linphone_proxy_config_is_registered(proxyCfg) && i++<40 ) {
|
||||
linphone_core_iterate(theLinphoneCore);
|
||||
usleep(100000);
|
||||
}
|
||||
}
|
||||
//register keepalive
|
||||
if ([[UIApplication sharedApplication] setKeepAliveTimeout:600/*(NSTimeInterval)linphone_proxy_config_get_expires(proxyCfg)*/
|
||||
handler:^{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue