mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 14:18:07 +00:00
Dispose the call notification in LinphoneManager
This commit is contained in:
parent
4eb1ec1b19
commit
9fa089c2ef
2 changed files with 15 additions and 22 deletions
|
|
@ -455,16 +455,7 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(state == LinphoneCallReleased) {
|
||||
if(data != NULL) {
|
||||
[data release];
|
||||
linphone_call_set_user_pointer(call, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Disable speaker when no more call
|
||||
if ((state == LinphoneCallEnd || state == LinphoneCallError)) {
|
||||
if(linphone_core_get_calls_nb(theLinphoneCore) == 0) {
|
||||
|
|
@ -474,7 +465,20 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
if (incallBgTask) {
|
||||
[[UIApplication sharedApplication] endBackgroundTask:incallBgTask];
|
||||
incallBgTask=0;
|
||||
}
|
||||
}
|
||||
if(data != nil && data->notification != nil) {
|
||||
// cancel local notif if needed
|
||||
[[UIApplication sharedApplication] cancelLocalNotification:data->notification];
|
||||
[data->notification release];
|
||||
data->notification = nil;
|
||||
}
|
||||
}
|
||||
|
||||
if(state == LinphoneCallReleased) {
|
||||
if(data != NULL) {
|
||||
[data release];
|
||||
linphone_call_set_user_pointer(call, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
// Enable speaker when video
|
||||
|
|
|
|||
|
|
@ -288,7 +288,6 @@ static PhoneMainView* phoneMainViewInstance=nil;
|
|||
}
|
||||
case LinphoneCallEnd:
|
||||
{
|
||||
[self dismissIncomingCall:call];
|
||||
if (canHideInCallView) {
|
||||
// Go to dialer view
|
||||
DialerViewController *controller = DYNAMIC_CAST([self changeCurrentView:[DialerViewController compositeViewDescription]], DialerViewController);
|
||||
|
|
@ -528,16 +527,6 @@ static PhoneMainView* phoneMainViewInstance=nil;
|
|||
[error release];
|
||||
}
|
||||
|
||||
- (void)dismissIncomingCall:(LinphoneCall*)call {
|
||||
LinphoneCallAppData* appData = (LinphoneCallAppData*) linphone_call_get_user_pointer(call);
|
||||
|
||||
if(appData != nil && appData->notification != nil) {
|
||||
// cancel local notif if needed
|
||||
[[UIApplication sharedApplication] cancelLocalNotification:appData->notification];
|
||||
[appData->notification release];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)addInhibitedEvent:(id)event {
|
||||
[inhibitedEvents addObject:event];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue