wxr
2022-06-30 23bbed132eea46eef51c6d01c21b346238e29ee2
HDL-ON_Android/Application.cs
@@ -84,7 +84,6 @@
                BusSocketStart();
                //后台回到前台
                new HDL_ON.UI.AppUnlockPage().LoadPage();
            }
        }
@@ -94,10 +93,6 @@
            mCount--;
            if (mCount == 0)
            {
                //if(activity.GetType().Name.Contains("LeChengVideoActivity"))
                //{
                //    //UserInfo.Current.PushMesLogTime = DateTime.MinValue;
                //}
                Console.WriteLine("HHH OnActivityStopped: background");
                BusSocketStop();
                //进入后台
@@ -115,6 +110,11 @@
        public int mCount;
        ///// <summary>
        ///// 是否进入后台
        ///// </summary>
        //public bool IsEnterBackground = false;
        /// <summary>
        /// 进入后台的时间
        /// </summary>
@@ -125,6 +125,7 @@
        /// </summary>
        void BusSocketStop()
        {
            //IsEnterBackground = true;
            CloseTime = DateTime.Now;
            MainPage.IsEnterBackground = true;
            //进入后台mqtt正在连接重置状态
@@ -138,6 +139,8 @@
        /// </summary>
        void BusSocketStart()
        {
            //IsEnterBackground = false;
            if (CloseTime.AddSeconds(10) < DateTime.Now)
            {
                //后台超过10s就断开MQTT重连