From 3a9326a9eb453a0eb4dc49103325eb7d62bf1ecd Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Mon, 30 May 2011 09:52:06 +0200 Subject: [PATCH] avoid speaker button to switch from on to off at the begenning of a call --- Classes/PhoneViewController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/PhoneViewController.m b/Classes/PhoneViewController.m index 4350dde71..4c1663ef4 100644 --- a/Classes/PhoneViewController.m +++ b/Classes/PhoneViewController.m @@ -216,7 +216,7 @@ withDisplayName:displayName]; [call setEnabled:false]; [callDuration setText:NSLocalizedString(@"Calling...",nil)]; - [speaker reset]; + if ([speaker isOn]) [speaker toggle] ; //preset to off } -(void) displayIncallFromUI:(UIViewController*) viewCtrl forUser:(NSString*) username withDisplayName:(NSString*) displayName { @@ -226,7 +226,7 @@ if (linphone_call_get_dir(linphone_core_get_current_call([LinphoneManager getLc])) == LinphoneCallIncoming) { [self displayIncalViewforUser:username withDisplayName:displayName]; - [speaker reset]; + if ([speaker isOn]) [speaker toggle] ; //preset to off; } } //status reporting