Prevent crash when openining app after bg call finished

Only happened in the settings view before the call starts
This commit is contained in:
Paul Cartier 2020-05-11 14:20:37 +02:00
parent 2520d5be7f
commit 658edc86a6
2 changed files with 2 additions and 0 deletions

View file

@ -63,6 +63,7 @@
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
LOGI(@"%@", NSStringFromSelector(_cmd));
[LinphoneManager.instance startLinphoneCore];
[LinphoneManager.instance.fastAddressBook reloadFriends];
[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneMessageReceived object:nil];

View file

@ -425,6 +425,7 @@ static RootViewManager *rootViewManagerInstance = nil;
case LinphoneCallReleased:
if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground) {
dispatch_async(dispatch_get_main_queue(), ^{
[PhoneMainView.instance popToView:DialerView.compositeViewDescription];
[CoreManager.instance stopLinphoneCore];
});
}