From ff097fe37a8131e9f67d2440dbcf12c02ee4ede2 Mon Sep 17 00:00:00 2001 From: Julien Wadel <julien.wadel@belledonne-communications.com> Date: Wed, 1 Jun 2022 11:44:13 +0200 Subject: [PATCH] Allow receiving multiple call. Fix crash on settings. Add broadFileSystemAccess permission. Fix crash on multiple call. --- .gitignore | 2 ++ Linphone/Assets/linphonerc-factory | 2 +- Linphone/Model/SettingsManager.cs | 3 ++- Linphone/Package.appxmanifest | 5 +++-- Linphone/Views/Dialer.xaml.cs | 8 +++++--- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index b1d71466..c4bda29d 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,8 @@ Linphone.sdf Linphone.opensdf Agents/RegistrationHelper.cs Linphone/Linphone.csproj.user +Linphone/AppPackages +Linphone/Tasks/obj *.vcxproj.filters *.sdf **/packages/* diff --git a/Linphone/Assets/linphonerc-factory b/Linphone/Assets/linphonerc-factory index 53c16212..40ca1380 100644 --- a/Linphone/Assets/linphonerc-factory +++ b/Linphone/Assets/linphonerc-factory @@ -23,4 +23,4 @@ dtmf_player_amp=0.1 [misc] history_max_size=30 -max_calls=1 +max_calls=2 diff --git a/Linphone/Model/SettingsManager.cs b/Linphone/Model/SettingsManager.cs index 39c525dc..580fa947 100644 --- a/Linphone/Model/SettingsManager.cs +++ b/Linphone/Model/SettingsManager.cs @@ -297,7 +297,8 @@ namespace Linphone.Model { dict[TransportKeyName] = EnumToTransport[proxyAddress.Transport]; dict[UsernameKeyName] = address.Username; dict[DomainKeyName] = address.Domain; - dict[OutboundProxyKeyName] = cfg.Routes.GetEnumerator().Current.ToString(); + if(cfg.Routes.GetEnumerator().Current != null) + dict[OutboundProxyKeyName] = cfg.Routes.GetEnumerator().Current.ToString(); dict[ExpireKeyName] = String.Format("{0}", cfg.Expires); AuthInfo authInfo = LinphoneManager.Instance.Core.FindAuthInfo(address.Domain, address.Username, address.Domain); if (authInfo != null) { diff --git a/Linphone/Package.appxmanifest b/Linphone/Package.appxmanifest index b22e762d..981642c3 100644 --- a/Linphone/Package.appxmanifest +++ b/Linphone/Package.appxmanifest @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp"> - <Identity Name="BelledonneCommunications.Linphone" Publisher="CN=2D80E0B6-DE43-45FF-97F7-D17E115F1D12" Version="1.3.0.0" /> +<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap mp rescap"> + <Identity Name="BelledonneCommunications.Linphone" Publisher="CN=Julien Wadel" Version="1.3.0.0" /> <mp:PhoneIdentity PhoneProductId="ed47fa26-a45b-4bda-82e1-cdc792d1d9bd" PhonePublisherId="00000000-0000-0000-0000-000000000000" /> <Properties> <DisplayName>Linphone</DisplayName> @@ -30,6 +30,7 @@ </Application> </Applications> <Capabilities> + <rescap:Capability Name="broadFileSystemAccess" /> <Capability Name="internetClient" /> <Capability Name="codeGeneration" /> <uap:Capability Name="contacts" /> diff --git a/Linphone/Views/Dialer.xaml.cs b/Linphone/Views/Dialer.xaml.cs index a49bfd14..0d870b48 100644 --- a/Linphone/Views/Dialer.xaml.cs +++ b/Linphone/Views/Dialer.xaml.cs @@ -147,9 +147,11 @@ namespace Linphone.Views { if (LinphoneManager.Instance.Core.CallsNb > 0) { Call call = LinphoneManager.Instance.Core.CurrentCall; - List<String> parameters = new List<String>(); - parameters.Add(call.RemoteAddress.AsStringUriOnly()); - Frame.Navigate(typeof(Views.InCall), parameters); + if( call != null){ + List<String> parameters = new List<String>(); + parameters.Add(call.RemoteAddress.AsStringUriOnly()); + Frame.Navigate(typeof(Views.InCall), parameters); + } } if (LinphoneManager.Instance.GetUnreadMessageCount() > 0) { -- GitLab