From 705006fe0c1187ace53ee6505f71ba98fe4b44e6 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期五, 26 四月 2024 18:27:45 +0800
Subject: [PATCH] 2024年04月26日18:26:42
---
app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java | 96 ++++++++++++++++++++++++------------------------
1 files changed, 48 insertions(+), 48 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 467ca14..f94c1b4 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
@@ -11,12 +11,9 @@
import android.location.LocationManager;
import android.os.IBinder;
import android.text.TextUtils;
-import android.view.View;
-import android.widget.TextView;
import androidx.core.app.ActivityCompat;
-import com.alibaba.fastjson.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
@@ -54,7 +51,6 @@
import com.hdl.photovoltaic.uni.HDLUniMPSDKManager;
import com.hdl.photovoltaic.utils.NetworkUtils;
import com.hdl.photovoltaic.utils.WifiUtils;
-import com.hdl.photovoltaic.widget.ConfirmationCancelDialog;
import com.hdl.sdk.link.common.exception.HDLLinkCode;
import com.hdl.sdk.link.common.exception.HDLLinkException;
import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
@@ -76,7 +72,6 @@
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
@@ -376,49 +371,6 @@
break;
}
- } else if (HDLUniMP.UNI_EVENT_REPLY_OTHER_MODEL.equals(topic)) {
- //鍏跺畠妯″潡
- switch (type) {
- //鑾峰彇娓╁害鍗曚綅
- case HDLUniMP.UNI_EVENT_REPLY_OTHER_UNIT: {
- uniCallbackData(mode_type, UserConfigManage.getInstance().getTemperature_unit(), callback);
- }
- break;
- //鑾峰彇褰撳墠app璇█
- case HDLUniMP.UNI_EVENT_REPLY_OTHER_APP_LANGUAGE: {
- uniCallbackData(mode_type, UserConfigManage.getInstance().getCurrentAppLanguage(), callback);
- }
- break;
- //鑾峰彇浣嶇疆淇℃伅
- case HDLUniMP.UNI_EVENT_REPLY_OTHER_LOCATION_INFO: {
- this.uniGetLocationInfo(mode_type, data, callback);
- }
- break;
- //搴旂敤鍐茬獊
- case HDLUniMP.UNI_EVENT_REPLY_OTHER_APPLICATION_CONFLICT: {
- if (callback != null) {
- uniCallbackData(type, HDLUdpConnect.getInstance().isBindSuccess(), callback);
- }
- }
- break;
- //涓撻棬鏀堕泦uni鏃ュ織
- case HDLUniMP.UNI_EVENT_REPLY_OTHER_UNI_LOG: {
- String customizeContentFormat = getKeyValue("customizeContentFormat", getKeyValue("data", data));
- HdlLogLogic.print("uni--->log--->" + customizeContentFormat, true);
-
- }
- break;
- //uni涓婚〉鐐瑰嚮杩斿洖閫氱煡
- case HDLUniMP.UNI_EVENT_REPLY_OTHER_BACK: {
- //EventBus浜嬩欢鍒嗗彂
- BaseEventBus baseEventBus = new BaseEventBus();
- baseEventBus.setTopic(HDLUniMP.UNI_EVENT_REPLY_OTHER_MODEL);
- baseEventBus.setType(HDLUniMP.UNI_EVENT_REPLY_OTHER_BACK);
- EventBus.getDefault().post(baseEventBus);
-
- }
- break;
- }
} else if (HDLUniMP.UNI_EVENT_REPLY_MINE_MODEL.equals(topic)) {
//鎴戠殑妯″潡
switch (type) {
@@ -465,6 +417,54 @@
}
+ } else if (HDLUniMP.UNI_EVENT_REPLY_OTHER_MODEL.equals(topic)) {
+ //鍏跺畠妯″潡
+ switch (type) {
+ //鑾峰彇娓╁害鍗曚綅
+ case HDLUniMP.UNI_EVENT_REPLY_OTHER_UNIT: {
+ uniCallbackData(mode_type, UserConfigManage.getInstance().getTemperature_unit(), callback);
+ }
+ break;
+ //鑾峰彇褰撳墠app璇█
+ case HDLUniMP.UNI_EVENT_REPLY_OTHER_APP_LANGUAGE: {
+ uniCallbackData(mode_type, UserConfigManage.getInstance().getCurrentAppLanguage(), callback);
+ }
+ break;
+ //鑾峰彇浣嶇疆淇℃伅
+ case HDLUniMP.UNI_EVENT_REPLY_OTHER_LOCATION_INFO: {
+ this.uniGetLocationInfo(mode_type, data, callback);
+ }
+ break;
+ //搴旂敤鍐茬獊
+ case HDLUniMP.UNI_EVENT_REPLY_OTHER_APPLICATION_CONFLICT: {
+ if (callback != null) {
+ uniCallbackData(type, HDLUdpConnect.getInstance().isBindSuccess(), callback);
+ }
+ }
+ break;
+ //涓撻棬鏀堕泦uni鏃ュ織
+ case HDLUniMP.UNI_EVENT_REPLY_OTHER_UNI_LOG: {
+ String customizeContentFormat = getKeyValue("customizeContentFormat", getKeyValue("data", data));
+ HdlLogLogic.print("uni--->log--->" + customizeContentFormat, true);
+
+ }
+ break;
+ //uni涓婚〉鐐瑰嚮杩斿洖閫氱煡
+ case HDLUniMP.UNI_EVENT_REPLY_OTHER_BACK: {
+ //EventBus浜嬩欢鍒嗗彂
+ BaseEventBus baseEventBus = new BaseEventBus();
+ baseEventBus.setTopic(HDLUniMP.UNI_EVENT_REPLY_OTHER_MODEL);
+ baseEventBus.setType(HDLUniMP.UNI_EVENT_REPLY_OTHER_BACK);
+ EventBus.getDefault().post(baseEventBus);
+
+ }
+ break;
+ //uni閫氱煡鍘熺敓閫�鍑虹櫥褰�
+ case HDLUniMP.UNI_EVENT_REPLY_OTHER_LOGOUT: {
+ HDLLinkPMUser.getInstance().logout(0);
+ }
+ break;
+ }
}
} catch (Exception e) {
--
Gitblit v1.8.0