From f91ef956cf482ed4ce0885dc47794b783c20c415 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 30 四月 2025 10:14:43 +0800
Subject: [PATCH] Merge branch '1.2.0' into 1.5.1_google

---
 app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
index 4ff1ed1..e71edf3 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
@@ -68,6 +68,7 @@
 import com.hdl.photovoltaic.uni.HDLUniMP;
 import com.hdl.photovoltaic.uni.HDLUniMPSDKManager;
 import com.hdl.photovoltaic.utils.NetworkUtils;
+import com.hdl.photovoltaic.utils.PermissionUtils;
 import com.hdl.photovoltaic.utils.WifiUtils;
 import com.hdl.sdk.link.common.exception.HDLLinkException;
 import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
@@ -149,7 +150,7 @@
             String type = getKeyValue("type", data);//灏忕被
             String logTag = getKeyValue("logTag", data);//鏍囪uni鎸囦护
             String mode_type = "澶х被-" + topic + "---" + "灏忕被-" + type;//鐢ㄦ潵鎵撳嵃鐨�
-            HdlLogLogic.print(logTag + ":" + "uni---鍙戦��---" + mode_type + "\r\n" + data, true);
+            HdlLogLogic.print(logTag + ":" + "uni---鍙戦��---" + mode_type + "---" + data, true);
             if (HDLUniMP.UNI_EVENT_REPLY_USER_MODEL.equals(topic)) {
                 //鐢ㄦ埛妯″潡
                 switch (type) {
@@ -179,7 +180,7 @@
                         jsonObject.addProperty("appKey", AppConfigManage.getAppKey());
                         jsonObject.addProperty("appSecret", AppConfigManage.getAppSecret());
                         uniSuccessCallback(mode_type, jsonObject, callback);
-                        HdlLogLogic.print("鑾峰彇鐢ㄦ埛鏈湴缂撳瓨淇℃伅---->>>" + jsonObject.toString());
+                        HdlLogLogic.print("鑾峰彇鐢ㄦ埛鏈湴缂撳瓨淇℃伅----" + jsonObject.toString());
                     }
                     break;
                 }
@@ -388,6 +389,14 @@
                 WifiUtils wifiUtils = WifiUtils.getInstance();
                 //wifi妯″潡
                 switch (type) {
+                    //鑾峰彇浣嶇疆鏉冮檺
+                    case HDLUniMP.UNI_EVENT_REPLY_AUTHORIZATION_GET: {
+                        boolean isLocalAuthor = PermissionUtils.checkPermission(HDLApp.getInstance(), Manifest.permission.ACCESS_FINE_LOCATION);
+                        if (callback != null) {
+                            uniSuccessCallback(mode_type, isLocalAuthor, callback);
+                        }
+                    }
+                    break;
                     //鑾峰彇鎵嬫満wifi鍒楄〃
                     case HDLUniMP.UNI_EVENT_REPLY_PHONE_WIFI_LIST: {
                         if (callback != null) {
@@ -646,6 +655,7 @@
             } else if (HDLUniMP.UNI_EVENT_REPLY_OTHER_MODEL.equals(topic)) {
                 //鍏跺畠妯″潡
                 switch (type) {
+
                     //鑾峰彇娓╁害鍗曚綅
                     case HDLUniMP.UNI_EVENT_REPLY_OTHER_UNIT: {
                         uniSuccessCallback(mode_type, UserConfigManage.getInstance().getTemperature_unit(), callback);
@@ -684,7 +694,7 @@
                     break;
                     //uni閫氱煡鍘熺敓閫�鍑虹櫥褰�
                     case HDLUniMP.UNI_EVENT_REPLY_OTHER_LOGOUT: {
-                        HdlLogLogic.print("uni閫氱煡鍘熺敓閫�鍑虹櫥褰�--->", true);
+                        HdlLogLogic.print("uni閫氱煡鍘熺敓閫�鍑虹櫥褰�---", true);
                         HDLLinkPMUser.getInstance().logout(0);
                     }
                     break;
@@ -906,7 +916,7 @@
                 if (callback != null) {
                     uniSuccessCallback(type, null, callback);
                 }
-                List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId);
+                List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId, null);
                 for (int i = 0; i < list.size(); i++) {
                     GatewayBean gatewayBean = list.get(i);
                     HdlDeviceLogic.getInstance().initializeInverter(gatewayBean.getDevice_mac(), null);
@@ -2017,7 +2027,7 @@
                             UserConfigManage.getInstance().setBingEmail(cUserInfo.getMemberEmail());
                             UserConfigManage.getInstance().setUserImageUrl(cUserInfo.getMemberHeadIcon());
                             UserConfigManage.getInstance().Save();
-                            HdlLogLogic.print("澶村儚璺緞---->>>" + cUserInfo.getMemberHeadIcon());
+                            HdlLogLogic.print("澶村儚璺緞----" + cUserInfo.getMemberHeadIcon());
                         }
 
                         @Override

--
Gitblit v1.8.0