diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index c1ed2d108..417eb8fc7 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -2274,13 +2274,14 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { const MSList *lists = linphone_core_get_friends_lists(LC); while (lists) { - linphone_friend_list_enable_subscriptions( - lists->data, enabled && [LinphoneManager.instance lpConfigBoolForKey:@"use_rls_presence"]); + linphone_friend_list_enable_subscriptions(lists->data, enabled && [LinphoneManager.instance lpConfigBoolForKey:@"use_rls_presence"]); lists = lists->next; } } - (BOOL)enterBackgroundMode { + linphone_core_enter_background(LC); + LinphoneProxyConfig *proxyCfg = linphone_core_get_default_proxy_config(theLinphoneCore); BOOL shouldEnterBgMode = FALSE; @@ -2321,24 +2322,24 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) { linphone_core_stop_dtmf_stream(theLinphoneCore); LOGI(@"Entering [%s] bg mode", shouldEnterBgMode ? "normal" : "lite"); - if (!shouldEnterBgMode && floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max) { const char *refkey = proxyCfg ? linphone_proxy_config_get_ref_key(proxyCfg) : NULL; BOOL pushNotifEnabled = (refkey && strcmp(refkey, "push_notification") == 0); if (pushNotifEnabled) { LOGI(@"Keeping lc core to handle push"); - /*destroy voip socket if any and reset connectivity mode*/ + // Destroy voip socket if any and reset connectivity mode connectivity = none; linphone_core_set_network_reachable(theLinphoneCore, FALSE); return YES; } return NO; - - } else - return YES; + } + return YES; } - (void)becomeActive { + linphone_core_enter_foreground(LC); + // enable presence if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max || self.connectivity == none) { [self refreshRegisters]; diff --git a/submodules/linphone b/submodules/linphone index 6a5190d94..603bd91bb 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 6a5190d9475681451f029d76969c0718286868a0 +Subproject commit 603bd91bbb291c6e0f37a51f375c3e5d10d7201a