wxr
2024-09-22 4e95d87dec43de5f7e8bd6ef579053c1fb44414d
西墨可视对讲

iOS更新,iOS17以上不显示TCP/UDP连接切换,启动时默认UDP切换,
IOS17以上linphone Sdk启动TCP连接时会导致APP闪退,无法捕抓异常,原生代码跑起来是线程崩溃
5个文件已修改
131 ■■■■■ 已修改文件
HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/TopViewDiv.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/View/TopView.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
@@ -127,7 +127,17 @@
            //登录sip服务器
#if __IOS__
            Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm,"UDP");
            string systemVersion = UIKit.UIDevice.CurrentDevice.SystemVersion;
            System.Version currentVersion = new System.Version(systemVersion);
            System.Version version17 = new System.Version(17, 0);
            if (currentVersion.CompareTo(version17) > 0)
            {
                HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm, "udp");
            }
            else
            {
                HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm, DB_ResidenceData.Instance.linphoneConnectType.ToString());
            }
#else
            if (mInterphoneType == InterphoneType.FREEVIEW.ToString())
            {
HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -228,31 +228,6 @@
            };
        }
        public void LoadTopView_Linphone()
        {
            LoadTopView();
            var btnSetting = new Button()
            {
                X = Application.GetRealWidth(337),
                Y = Application.GetRealHeight(28 + maginY),
                Width = Application.GetMinRealAverage(32),
                Height = Application.GetMinRealAverage(32),
                UnSelectedImagePath = "Public/FuncInfoSetIcon.png",
            };
            contentView.AddChidren(btnSetting);
            btnSetting.MouseUpEventHandler = (sender, e) =>
            {
                var infoView = new FunctionBaseInfoSetPage();
                MainPage.BasePageView.AddChidren(infoView);
                infoView.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
        }
        /// <summary>
        /// 房间标题区域
        /// </summary>
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -53,12 +53,6 @@
            actionRefresh = action;
        }
        public FunctionBaseInfoSetPage()
        {
            bodyView = this;
        }
        public override void RemoveFromParent()
        {
            new System.Threading.Thread(() =>
@@ -90,10 +84,10 @@
                ScrollEnabled = false,
            };
            bodyView.AddChidren(contentView);
            //可视对讲
            if(function == null)
            {
            //可视对讲
            if (function.spk == SPK.LinphoneXiMo)
            {
                var linphoneConnectView = new FrameLayout()
                {
                    Height = Application.GetRealHeight(55),
@@ -250,8 +244,6 @@
                return;
            }
            #region name view
@@ -741,38 +733,6 @@
            }
            #endregion
#if stage2
            #region 添加到桌面
            var addToDesktopView = new FrameLayout()
            {
                Height = Application.GetRealHeight(55),
                BackgroundColor = CSS_Color.MainBackgroundColor,
            };
            contentView.AddChidren(addToDesktopView);
            var btnAddToDesktopText = new Button()
            {
                X = Application.GetRealWidth(16),
                Width = Application.GetRealWidth(160),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextID = StringId.AddToDesktop,
            };
            addToDesktopView.AddChidren(btnAddToDesktopText);
            var btnAddToDesktopRight = new Button()
            {
                X = Application.GetRealWidth(339),
                Gravity = Gravity.CenterVertical,
                Width = Application.GetMinRealAverage(16),
                Height = Application.GetMinRealAverage(16),
                UnSelectedImagePath = "Public/RightIcon.png",
            };
            addToDesktopView.AddChidren(btnAddToDesktopRight);
            #endregion
#endif
            if (function.spk == SPK.ElectricEnergy)
            {
HDL_ON/UI/UI2/FuntionControlView/Music/View/TopView.cs
@@ -1,5 +1,6 @@
using System;
using System.Drawing.Printing;
using HDL_ON.Entity;
using HDL_ON.UI.Music;
using Shared;
@@ -123,7 +124,7 @@
            btnSetting.MouseUpEventHandler = (sender, e) =>
            {
                var infoView = new FunctionBaseInfoSetPage();
                var infoView = new FunctionBaseInfoSetPage(new Entity.Function() { spk = SPK.LinphoneXiMo }, () => { });
                MainPage.BasePageView.AddChidren(infoView);
                infoView.LoadPage();
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
@@ -24,16 +24,45 @@
            #region 布局界面
            this.BackgroundColor = MusicColor.ViewColor;
            var topView = new TopView();
            //this.AddChidren(topView.TopFLayoutView());
#if __IOS__
            // 获取当前系统的版本号
            string systemVersion = UIKit.UIDevice.CurrentDevice.SystemVersion;
            // 将系统版本字符串转换为 Version 对象
            System.Version currentVersion = new System.Version(systemVersion);
            // 定义 iOS 17 作为比较的版本
            System.Version version17 = new System.Version(17, 0);
            // 比较当前版本是否大于 iOS 17
            if (currentVersion.CompareTo(version17) > 0)
            {
                this.AddChidren(topView.TopFLayoutView());
            //if (xiMoVideoList.Count > 0)
            //{
            //    this.AddChidren(topView.TopFLayoutView());
            //}
            //else
            //{
            //    this.AddChidren(topView.TopFLayoutView2());
            //}
            }
            else
            {
                if (xiMoVideoList.Count > 0)
                {
                    this.AddChidren(topView.TopFLayoutView2());
                }
                else
                {
                    this.AddChidren(topView.TopFLayoutView());
                }
                topView.topNameBtn.TextID = StringId.keshiduijiang;
            }
#else
            if (xiMoVideoList.Count > 0)
            {
                this.AddChidren(topView.TopFLayoutView2());
            }
            else
            {
                this.AddChidren(topView.TopFLayoutView());
            }
            topView.topNameBtn.TextID = StringId.keshiduijiang;
#endif
            var pageView = new PageLayout()