Commit 84cf4852 authored by Sylvain Berfini's avatar Sylvain Berfini

Removed useless async/await in LinphoneCore init

parent 037db3f9
......@@ -269,7 +269,7 @@ namespace Linphone.Model
/// <summary>
/// Creates a new LinphoneCore (if not created yet) using a LinphoneCoreFactory.
/// </summary>
public async Task InitLinphoneCore()
public async void InitLinphoneCore()
{
if (server.LinphoneCoreFactory != null && server.LinphoneCore != null)
{
......@@ -287,7 +287,6 @@ namespace Linphone.Model
// It happens server.LinphoneCore is available but the real core behind is broken, we'll catch this here and force recreate a new core
Logger.Dbg("[LinphoneManager] Exception happened while setting the UA, force creation of a new LinphoneCore");
}
//TODO: Crash not fixed
}
Debug.WriteLine("[LinphoneManager] Creating LinphoneCore");
......
......@@ -74,7 +74,7 @@ namespace Linphone.Views
{
base.OnNavigatedTo(e);
// Create LinphoneCore if not created yet, otherwise do nothing
await LinphoneManager.Instance.InitLinphoneCore();
LinphoneManager.Instance.InitLinphoneCore();
}
/// <summary>
......
......@@ -107,7 +107,7 @@ namespace Linphone.Views
base.OnNavigatedTo(e);
saveSettingsOnLeave = true;
// Create LinphoneCore if not created yet, otherwise do nothing
await LinphoneManager.Instance.InitLinphoneCore();
LinphoneManager.Instance.InitLinphoneCore();
}
/// <summary>
......
......@@ -50,7 +50,7 @@ namespace Linphone.Views
LinphoneManager.Instance.ECListener = this;
// Create LinphoneCore if not created yet, otherwise do nothing
await LinphoneManager.Instance.InitLinphoneCore();
LinphoneManager.Instance.InitLinphoneCore();
}
/// <summary>
......
......@@ -96,7 +96,7 @@ namespace Linphone.Views
_SentMessages = new List<OutgoingChatBubble>();
// Create LinphoneCore if not created yet, otherwise do nothing
await LinphoneManager.Instance.InitLinphoneCore();
LinphoneManager.Instance.InitLinphoneCore();
ContactManager cm = ContactManager.Instance;
cm.ContactFound += cm_ContactFound;
......
......@@ -80,7 +80,7 @@ namespace Linphone
BasePage.StatusBar.RefreshStatus(LinphoneManager.Instance.LastKnownState);
// Create LinphoneCore if not created yet, otherwise do nothing
await LinphoneManager.Instance.InitLinphoneCore();
LinphoneManager.Instance.InitLinphoneCore();
BuildLocalizedApplicationBar();
......
......@@ -35,7 +35,7 @@ namespace Linphone.Views
base.OnNavigatedTo(e);
// Create LinphoneCore if not created yet, otherwise do nothing
await LinphoneManager.Instance.InitLinphoneCore();
LinphoneManager.Instance.InitLinphoneCore();
if (LinphoneManager.Instance.LinphoneCore.GetProxyConfigList().Count > 0)
{
......
......@@ -40,7 +40,7 @@ namespace Linphone.Views
base.OnNavigatedTo(e);
// Create LinphoneCore if not created yet, otherwise do nothing
await LinphoneManager.Instance.InitLinphoneCore();
LinphoneManager.Instance.InitLinphoneCore();
LinphoneManager.Instance.LinphoneCore.ResetMissedCallsCount();
......
......@@ -139,7 +139,7 @@ namespace Linphone.Views
protected override async void OnNavigatedTo(NavigationEventArgs nee)
{
// Create LinphoneCore if not created yet, otherwise do nothing
Task t = LinphoneManager.Instance.InitLinphoneCore();
LinphoneManager.Instance.InitLinphoneCore();
base.OnNavigatedTo(nee);
this.ViewModel.MuteListener = this;
......@@ -164,8 +164,6 @@ namespace Linphone.Views
cm.FindContact(calledNumber);
}
}
await t;
}
private void CallStateChanged(LinphoneCall call, LinphoneCallState state)
......
......@@ -63,7 +63,7 @@ namespace Linphone.Views
protected override async void OnNavigatedTo(NavigationEventArgs nee)
{
// Create LinphoneCore if not created yet, otherwise do nothing
Task t = LinphoneManager.Instance.InitLinphoneCore();
LinphoneManager.Instance.InitLinphoneCore();
base.OnNavigatedTo(nee);
......@@ -84,8 +84,6 @@ namespace Linphone.Views
cm.FindContact(_callingNumber);
}
}
await t;
}
/// <summary>
......
......@@ -29,7 +29,7 @@ namespace Linphone.Views
base.OnNavigatedTo(e);
// Create LinphoneCore if not created yet, otherwise do nothing
await LinphoneManager.Instance.InitLinphoneCore();
LinphoneManager.Instance.InitLinphoneCore();
bool isVideoEnabled = LinphoneManager.Instance.LinphoneCore.IsVideoSupported() && (LinphoneManager.Instance.LinphoneCore.IsVideoDisplayEnabled() || LinphoneManager.Instance.LinphoneCore.IsVideoCaptureEnabled());
Video.Visibility = isVideoEnabled ? Visibility.Visible : Visibility.Collapsed;
}
......
......@@ -41,7 +41,7 @@ namespace Linphone.Views
{
base.OnNavigatedTo(e);
// Create LinphoneCore if not created yet, otherwise do nothing
await LinphoneManager.Instance.InitLinphoneCore();
LinphoneManager.Instance.InitLinphoneCore();
}
/// <summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment