From 8adb5e06a5fcfad9a634944c0d65fc70c5c2527f Mon Sep 17 00:00:00 2001
From: Tong <1025782220@qq.com>
Date: 星期二, 19 四月 2022 10:12:57 +0800
Subject: [PATCH] 去掉依赖库

---
 HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/protocol/LinkMessageDecoder.java |   19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/protocol/LinkMessageDecoder.java b/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/protocol/LinkMessageDecoder.java
index f5ba2c0..20df34d 100644
--- a/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/protocol/LinkMessageDecoder.java
+++ b/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/protocol/LinkMessageDecoder.java
@@ -1,19 +1,14 @@
 package com.hdl.sdk.connect.protocol;
 
 
-import android.annotation.TargetApi;
 import android.os.Build;
-import android.util.Log;
 
-
-import com.google.gson.internal.bind.DateTypeAdapter;
-import com.hdl.sdk.common.utils.LogUtils;
-import com.hdl.sdk.connect.config.HDLLinkConfig;
 import com.hdl.sdk.common.event.EventDispatcher;
 import com.hdl.sdk.common.utils.ByteUtils;
+import com.hdl.sdk.common.utils.LogUtils;
 import com.hdl.sdk.connect.bean.LinkResponse;
+import com.hdl.sdk.connect.config.HDLLinkConfig;
 import com.hdl.sdk.connect.utils.AesUtil;
-import com.hdl.sdk.connect.utils.ProtocolParse;
 import com.hdl.sdk.socket.codec.ByteToMessageDecoder;
 
 import java.util.ArrayList;
@@ -110,7 +105,7 @@
             }
 
             list.clear();
-            for(int i=0;i<tempList.size();i++){
+            for (int i = 0; i < tempList.size(); i++) {
                 list.add(tempList.get(i));
             }
         }
@@ -118,7 +113,7 @@
 
 
     @Override
-    protected synchronized LinkResponse decoder(Object msg,String ipaddress) throws Exception {
+    protected synchronized LinkResponse decoder(Object msg, String ipaddress) throws Exception {
         if (msg instanceof byte[]) {
             bytes.addAll(ByteUtils.toByteList((byte[]) msg));
             //濡傛灉澶氭潯鍛戒护鎵撳寘鍦ㄤ竴鏉℃暟鎹腑锛岄兘闇�瑕佸鐞嗗畬
@@ -180,10 +175,10 @@
 
                 String bodyString = new String(body, "utf-8");
                 response.setData(bodyString);
-                LogUtils.i( "鎺ユ敹鍒版暟鎹�:" + response.getTopic() + "\r\n" + response.getData());
+                LogUtils.i("鎺ユ敹鍒版暟鎹�:" + response.getTopic() + "\r\n" + response.getData());
                 //闈炴甯告暟鎹紝杩斿洖
-                if (!((bodyString.startsWith("{") &&bodyString.endsWith("}"))
-                        || (bodyString.startsWith("[")&&bodyString.endsWith("]")))) {
+                if (!((bodyString.startsWith("{") && bodyString.endsWith("}"))
+                        || (bodyString.startsWith("[") && bodyString.endsWith("]")))) {
                     continue;
                 }
                 //瑙f瀽瀹屾垚,topic鍙戦�佷竴娆�

--
Gitblit v1.8.0