From 5777c367f53c758546211d5f7f40a27f0b11c660 Mon Sep 17 00:00:00 2001
From: lss <lsc@hdlchina.com.cn>
Date: 星期二, 26 四月 2022 18:02:03 +0800
Subject: [PATCH] 2022-4-26

---
 ZigbeeApp/GateWay.Droid/Application.cs |   68 ++++++++--------------------------
 1 files changed, 16 insertions(+), 52 deletions(-)

diff --git a/ZigbeeApp/GateWay.Droid/Application.cs b/ZigbeeApp/GateWay.Droid/Application.cs
old mode 100755
new mode 100644
index 71da5ff..3a13e7b
--- a/ZigbeeApp/GateWay.Droid/Application.cs
+++ b/ZigbeeApp/GateWay.Droid/Application.cs
@@ -86,7 +86,7 @@
         /// <summary>
         /// 妫�娴嬪唴瀛樻硠闇茬殑涓滆タ
         /// </summary>
-        ///private Square.LeakCanary.RefWatcher _refWatcher;
+        //private Square.LeakCanary.RefWatcher _refWatcher;
 
         public override void OnCreate()
         {
@@ -104,7 +104,7 @@
             catch (Exception ex)
             {
                 //璋冭瘯:璁板綍绯荤粺寮傚父
-                Shared.Phone.HdlLogLogic.Current.WriteOtherText(Shared.Phone.HdlFileNameResourse.LogDirectory, ex.Message + "\r\n" + ex.StackTrace, true, false);
+                Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.SystemLogFile, ex.Message + "\r\n" + ex.StackTrace, true, false);
             }
             base.OnCreate();
             // 閫氳繃WXAPIFactory宸ュ巶锛岃幏鍙朓WXAPI鐨勫疄渚�
@@ -175,7 +175,7 @@
             {
                 try
                 {
-                    if (Shared.Common.Config.Instance.BackKeyCanClick == false)
+                    if (Shared.Common.CommonPage.BackKeyCanClick == false)
                     {
                         //涓嶅厑璁告寜杩斿洖閿�
                         return;
@@ -225,21 +225,17 @@
             {
                 Shared.Application.FontSize = 12;
                 AppCenter.Start("4802834a-e7e9-4dd8-93f1-c2f88f0bd464", typeof(Analytics), typeof(Crashes));
-#if DEBUG
-                //娴嬭瘯ID,鐬庡啓鐨�
-                Shared.Common.Config.Instance.RegistrationID = "93f1c2f88f0bd464";
-#endif
-#if Release
-                //淇濆瓨鑾峰彇鐨勬瀬鍏夋湇鍔″櫒涓婄殑娉ㄥ唽ID鍒版湰鍦版枃浠�
-                var registrationId = JPushInterface.GetRegistrationID(activity);
+#if Release
+				//淇濆瓨鑾峰彇鐨勬瀬鍏夋湇鍔″櫒涓婄殑娉ㄥ唽ID鍒版湰鍦版枃浠�
+				var registrationId = JPushInterface.GetRegistrationID(activity);
                 System.Console.WriteLine("registrationId-鏋佸厜id=" + registrationId);
-                if (!string.IsNullOrEmpty(registrationId))
-                {
-                    Shared.Common.Config.Instance.RegistrationID = registrationId;
-                    Shared.Common.Config.Instance.Save();
-                }
-                //璋冭瘯:璁板綍鏋佸厜ID
-                Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.JiguangFile, "receive1:" + registrationId, true, true);
+                if (!string.IsNullOrEmpty(registrationId))
+				{
+				Shared.Common.Config.Instance.RegistrationID = registrationId;
+				Shared.Common.Config.Instance.Save();
+				}
+				//璋冭瘯:璁板綍鏋佸厜ID
+				Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.JiguangFile, "receive1:" + registrationId, true, true);
 #endif
             };
             BaseActivity.RefreshUIAction += (activity) =>
@@ -379,6 +375,7 @@
                     if (!string.IsNullOrEmpty(regId))
                     {
                         Shared.Common.Config.Instance.RegistrationID = regId;
+                        Shared.Common.Config.Instance.Save();
                     }
 #if Release
                     //璋冭瘯:璁板綍鏋佸厜ID
@@ -427,7 +424,7 @@
             System.Console.WriteLine(TAG, "extras : " + extras);
 
             //澶勭悊鏋佸厜娑堟伅鎺ㄩ�佺殑閫昏緫鍑芥暟
-            Shared.Phone.HdlJiguangMsgPushLogic.Current.AdjustJiguangMsgPush(title, message, extras);
+            Shared.Phone.UserCenter.HdlJiguangMsgPushLogic.Current.AdjustJiguangMsgPush(title, message, extras);
         }
         /// <summary>
         /// 鎵撳紑娑堟伅鏄剧ず鐣岄潰
@@ -479,40 +476,7 @@
         /// <param name="hiddenJson">浜戠鎺ㄨ繃鏉ョ殑鏁版嵁</param>
         private void VideoMethod(string hiddenJson)
         {
-            var hiddanJson = Newtonsoft.Json.Linq.JObject.Parse(hiddenJson);
-            if (hiddanJson == null)
-            {
-                return;
-            }
-            var json = Newtonsoft.Json.Linq.JObject.Parse(hiddanJson["HiddanJson"].ToString());
-            if (json == null)
-            {
-                return;
-            }
-            Shared.Phone.VideoPhone.ESVideoInfo eSVideoInfo = new Shared.Phone.VideoPhone.ESVideoInfo();
-            if (json["uuid"].ToString().Contains(","))
-            {
-                var uuid = json["uuid"].ToString().Split(',');
-                eSVideoInfo.ESVideoUUID = uuid[0];
-
-            }
-            else
-            {
-                eSVideoInfo.ESVideoUUID = json["uuid"].ToString();
-            }
-
-            eSVideoInfo.DeviceName = Language.StringByID(Shared.R.MyInternationalizationString.theOutdoorUnit);
-            eSVideoInfo.ESRoomID = int.Parse(json["roomno"].ToString());
-            if (!string.IsNullOrEmpty(json["unitno"].ToString()))
-            {
-                string str = json["unitno"].ToString();
-                string str1 = str.Substring(0, 2).TrimStart('0');
-                string str2 = str.Substring(2, 2).TrimStart('0');
-                eSVideoInfo.RoomName = str1 + Language.StringByID(Shared.R.MyInternationalizationString.dong) + str2 + Language.StringByID(Shared.R.MyInternationalizationString.unit);
-            }
-
-            Shared.Phone.VideoPhone.ESVideo.ShowESvideoVideoIntercom(eSVideoInfo);
-
+            Com.Evoyohome.Sphonelibs.Global.Global.OpenCallActivity(null);
         }
     }
 }

--
Gitblit v1.8.0