forked from mirrors/linphone-iphone
Revert "Do not allow user to start/answer a SIP call when a GSM call is active"
This reverts commit 2ab0771646.
This commit is contained in:
parent
2ab0771646
commit
710076633f
7 changed files with 11 additions and 37 deletions
|
|
@ -22,7 +22,7 @@
|
|||
#import "linphonecore.h"
|
||||
#include "LinphoneManager.h"
|
||||
#include "private.h"
|
||||
#import "ContactPickerDelegate.h"
|
||||
#import "ContactPickerDelegate.h"Òß
|
||||
|
||||
@implementation IncallViewController
|
||||
|
||||
|
|
|
|||
|
|
@ -42,10 +42,6 @@
|
|||
}
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application {
|
||||
[[LinphoneManager instance] becomeActive];
|
||||
|
||||
if (myPhoneViewController != nil) {
|
||||
[myPhoneViewController updateCallAndBackButtons];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) loadDefaultSettings {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ typedef enum _Connectivity {
|
|||
}
|
||||
+(LinphoneManager*) instance;
|
||||
+(LinphoneCore*) getLc;
|
||||
+(BOOL) audioSessionInterrupted;
|
||||
|
||||
-(void) registerLogView:(id<LogView>) view;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -64,8 +64,6 @@
|
|||
IncallViewController* mIncallViewController;
|
||||
}
|
||||
|
||||
-(void) updateCallAndBackButtons;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIView* dialerView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UITextField* address;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
2
submodules/externals/exosip
vendored
2
submodules/externals/exosip
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit f288044136b3e60baf6c0805e8cf87e5cdbc7890
|
||||
Subproject commit c3da0303519ad3120355cb85baee9cf6d0e4d1c2
|
||||
Loading…
Add table
Reference in a new issue