From 68d9078b49cfa8e83ed553835b05d4042c183969 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 16 三月 2023 09:39:34 +0800
Subject: [PATCH] 云台不显示问题修复,LC问题

---
 AndroidOpenDemo/DeviceAddModule/src/main/java/com/mm/android/deviceaddmodule/openapi/HttpSend.java |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/AndroidOpenDemo/DeviceAddModule/src/main/java/com/mm/android/deviceaddmodule/openapi/HttpSend.java b/AndroidOpenDemo/DeviceAddModule/src/main/java/com/mm/android/deviceaddmodule/openapi/HttpSend.java
index cd6c3a5..1af77fd 100644
--- a/AndroidOpenDemo/DeviceAddModule/src/main/java/com/mm/android/deviceaddmodule/openapi/HttpSend.java
+++ b/AndroidOpenDemo/DeviceAddModule/src/main/java/com/mm/android/deviceaddmodule/openapi/HttpSend.java
@@ -8,12 +8,14 @@
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 import com.google.gson.reflect.TypeToken;
+import hdl.onpro.HdlData;
 import com.mm.android.deviceaddmodule.LCDeviceEngine;
 import com.mm.android.deviceaddmodule.mobilecommon.AppConsume.BusinessException;
 import com.mm.android.deviceaddmodule.mobilecommon.utils.LogUtil;
 import com.mm.android.deviceaddmodule.mobilecommon.utils.MD5Helper;
 
 import org.apache.http.conn.ConnectTimeoutException;
+import org.greenrobot.eventbus.EventBus;
 import org.json.JSONObject;
 
 import java.io.IOException;
@@ -56,21 +58,13 @@
         if (!"0".equals(code)) {
             try {
                 String msg = jsonResult.get("msg").getAsString();
-                if (method.equals("bindDevice")) {
-                    Intent intent = new Intent();
-                    intent.setAction("hdlUserDeviceBind");
-                    intent.putExtra("data", jsonResult.toString());
-                    LCDeviceEngine.newInstance().getContext().sendBroadcast(intent);
-                }
+                EventBus.getDefault().post("InterfaceException");
+                hdl.onpro.HdlData.getInstance().getiRegisterDeviceFeedback().feedback(method,jsonResult.toString());
                 throw new BusinessException(code + msg);
             }catch (Exception exception){
                 String msg = jsonResult.get("message").getAsString();
-                if (method.equals("bindDevice")) {
-                    Intent intent = new Intent();
-                    intent.setAction("hdlUserDeviceBind");
-                    intent.putExtra("data", jsonResult.toString());
-                    LCDeviceEngine.newInstance().getContext().sendBroadcast(intent);
-                }
+                EventBus.getDefault().post("InterfaceException");
+                hdl.onpro.HdlData.getInstance().getiRegisterDeviceFeedback().feedback(method,jsonResult.toString());
                 throw new BusinessException(code + msg);
             }
         }

--
Gitblit v1.8.0