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