diff --git a/Classes/IncallViewController.m b/Classes/IncallViewController.m index fd1518bc5..a5b991804 100644 --- a/Classes/IncallViewController.m +++ b/Classes/IncallViewController.m @@ -22,7 +22,7 @@ #import "linphonecore.h" #include "LinphoneManager.h" #include "private.h" -#import "ContactPickerDelegate.h" +#import "ContactPickerDelegate.h"Òß @implementation IncallViewController diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 46c8b1a9b..dcb97b6b7 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -42,10 +42,6 @@ } - (void)applicationDidBecomeActive:(UIApplication *)application { [[LinphoneManager instance] becomeActive]; - - if (myPhoneViewController != nil) { - [myPhoneViewController updateCallAndBackButtons]; - } } - (void) loadDefaultSettings { diff --git a/Classes/LinphoneUI/LinphoneManager.h b/Classes/LinphoneUI/LinphoneManager.h index 32f403dee..5da93e076 100644 --- a/Classes/LinphoneUI/LinphoneManager.h +++ b/Classes/LinphoneUI/LinphoneManager.h @@ -48,7 +48,6 @@ typedef enum _Connectivity { } +(LinphoneManager*) instance; +(LinphoneCore*) getLc; -+(BOOL) audioSessionInterrupted; -(void) registerLogView:(id) view; diff --git a/Classes/LinphoneUI/LinphoneManager.m b/Classes/LinphoneUI/LinphoneManager.m index 75c5dee6e..de012d74c 100644 --- a/Classes/LinphoneUI/LinphoneManager.m +++ b/Classes/LinphoneUI/LinphoneManager.m @@ -30,7 +30,6 @@ static LinphoneCore* theLinphoneCore=nil; static LinphoneManager* theLinphoneManager=nil; -static BOOL audioSessionInterrupted = NO; extern void libmsilbc_init(); #ifdef HAVE_AMR @@ -836,8 +835,6 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach } -(void) beginInterruption { - audioSessionInterrupted = YES; - LinphoneCall* c = linphone_core_get_current_call(theLinphoneCore); ms_message("Sound interruption detected!"); if (c) { @@ -853,12 +850,7 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach ms_message("Auto resuming call"); linphone_core_resume_call(theLinphoneCore, (LinphoneCall*) c->data); } - - audioSessionInterrupted = NO; -} - -+(BOOL) audioSessionInterrupted { - return audioSessionInterrupted; + } diff --git a/Classes/PhoneViewController.h b/Classes/PhoneViewController.h index 03947ff5c..b9f5f09e2 100644 --- a/Classes/PhoneViewController.h +++ b/Classes/PhoneViewController.h @@ -64,8 +64,6 @@ IncallViewController* mIncallViewController; } --(void) updateCallAndBackButtons; - @property (nonatomic, retain) IBOutlet UIView* dialerView; @property (nonatomic, retain) IBOutlet UITextField* address; diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m index 26c44d9ce..1e06fbf61 100644 --- a/Classes/PhoneViewController.m +++ b/Classes/PhoneViewController.m @@ -164,12 +164,6 @@ [exc.name cStringUsingEncoding:[NSString defaultCStringEncoding]], [exc.reason cStringUsingEncoding:[NSString defaultCStringEncoding]]); } - - /* if audio session is unavailable -> disable call buttons */ - if ([LinphoneManager audioSessionInterrupted]) { - [callShort setEnabled:NO]; - [callLarge setEnabled:NO]; - } } -(void)viewWillAppear:(BOOL)animated { @@ -218,13 +212,7 @@ -(void) displayIncomingCall:(LinphoneCall*) call NotificationFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName { - if ([LinphoneManager audioSessionInterrupted]) { - // TODO: should we notify the user and let him cancel the call (without letting him accept it) ? - ms_message("Call refused: audio session is not available"); - linphone_core_terminate_call([LinphoneManager getLc], call); - return; - } - + if ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)] && [UIApplication sharedApplication].applicationState != UIApplicationStateActive) { // Create a new notification @@ -245,16 +233,17 @@ cd.delegate = self; cd.call = call; - mIncomingCallActionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:username] - delegate:cd - cancelButtonTitle:NSLocalizedString(@"Decline",nil) + mIncomingCallActionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),[displayName length]>0?displayName:username] + delegate:cd + cancelButtonTitle:NSLocalizedString(@"Decline",nil) destructiveButtonTitle:NSLocalizedString(@"Answer",nil) - otherButtonTitles:nil]; - + otherButtonTitles:nil]; + mIncomingCallActionSheet.actionSheetStyle = UIActionSheetStyleDefault; [mIncomingCallActionSheet showInView:self.parentViewController.view]; [mIncomingCallActionSheet release]; } + } -(void) backToCallViewPressed { @@ -303,7 +292,7 @@ - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void *)datas{ LinphoneCall* call = (LinphoneCall*)datas; - if (buttonIndex == actionSheet.destructiveButtonIndex ) { + if (buttonIndex == 0 ) { linphone_core_accept_call([LinphoneManager getLc],call); } else { linphone_core_terminate_call ([LinphoneManager getLc], call); diff --git a/submodules/externals/exosip b/submodules/externals/exosip index f28804413..c3da03035 160000 --- a/submodules/externals/exosip +++ b/submodules/externals/exosip @@ -1 +1 @@ -Subproject commit f288044136b3e60baf6c0805e8cf87e5cdbc7890 +Subproject commit c3da0303519ad3120355cb85baee9cf6d0e4d1c2