From 293c666a1d6726ae17c92f0434fa24d08679c603 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 24 Apr 2012 17:24:02 +0200 Subject: [PATCH] fix double call acceptance, and don't resume automatically after gsm interruption --- Classes/CallDelegate.m | 5 +++++ Classes/LinphoneUI/LinphoneManager.m | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Classes/CallDelegate.m b/Classes/CallDelegate.m index 4aef98fa9..b7b6ed366 100644 --- a/Classes/CallDelegate.m +++ b/Classes/CallDelegate.m @@ -38,13 +38,18 @@ } -(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex { + + if (timeout) { [timeout invalidate]; timeout = nil; } + if (buttonIndex != actionSheet.cancelButtonIndex) return; + if (eventType == CD_UNDEFINED) { ms_error("Incorrect usage of CallDelegate/ActionSheet: eventType must be set"); } + [delegate actionSheet:actionSheet ofType:eventType clickedButtonAtIndex:buttonIndex withUserDatas:call]; } diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index 195058561..923ff225c 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -987,13 +987,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach -(void) endInterruption { ms_message("Sound interruption ended!"); - const MSList* c = linphone_core_get_calls(theLinphoneCore); - - if (c) { - ms_message("Auto resuming call"); - linphone_core_resume_call(theLinphoneCore, (LinphoneCall*) c->data); - } - + //let the user resume the call manually. } +(BOOL) runningOnIpad { #ifdef UI_USER_INTERFACE_IDIOM