mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Revert "fix crash when applicationDidEnterBackground is called twice"
This reverts commit 3e191259aa.
This commit is contained in:
parent
69a11ef639
commit
506d7b3703
1 changed files with 12 additions and 12 deletions
|
|
@ -57,6 +57,9 @@
|
|||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application {
|
||||
LOGI(@"%@", NSStringFromSelector(_cmd));
|
||||
[LinphoneManager.instance enterBackgroundMode];
|
||||
[LinphoneManager.instance.fastAddressBook clearFriends];
|
||||
[CoreManager.instance stopLinphoneCore];
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
|
|
@ -70,20 +73,17 @@
|
|||
LOGI(@"%@", NSStringFromSelector(_cmd));
|
||||
LinphoneCall *call = linphone_core_get_current_call(LC);
|
||||
|
||||
if (call) {
|
||||
/* save call context */
|
||||
LinphoneManager *instance = LinphoneManager.instance;
|
||||
instance->currentCallContextBeforeGoingBackground.call = call;
|
||||
instance->currentCallContextBeforeGoingBackground.cameraIsEnabled = linphone_call_camera_enabled(call);
|
||||
if (!call)
|
||||
return;
|
||||
|
||||
const LinphoneCallParams *params = linphone_call_get_current_params(call);
|
||||
if (linphone_call_params_video_enabled(params))
|
||||
linphone_call_enable_camera(call, false);
|
||||
}
|
||||
/* save call context */
|
||||
LinphoneManager *instance = LinphoneManager.instance;
|
||||
instance->currentCallContextBeforeGoingBackground.call = call;
|
||||
instance->currentCallContextBeforeGoingBackground.cameraIsEnabled = linphone_call_camera_enabled(call);
|
||||
|
||||
[LinphoneManager.instance enterBackgroundMode];
|
||||
[LinphoneManager.instance.fastAddressBook clearFriends];
|
||||
[CoreManager.instance stopLinphoneCore];
|
||||
const LinphoneCallParams *params = linphone_call_get_current_params(call);
|
||||
if (linphone_call_params_video_enabled(params))
|
||||
linphone_call_enable_camera(call, false);
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue