| | |
| | | package com.hdl.sdk.connect.protocol;
|
| | |
|
| | |
|
| | | import android.annotation.TargetApi;
|
| | | import android.os.Build;
|
| | | import android.util.Log;
|
| | |
|
| | | import androidx.annotation.RequiresApi;
|
| | |
|
| | | 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.connect.bean.LinkResponse;
|
| | | 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;
|
| | |
| | | try {
|
| | | //之前的版本这块是明文的
|
| | | if (!topic.contains("heartbeat_reply")) {
|
| | | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
| | | /*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
| | | LogUtils.e("解密失败,数据内容是:\r\n" + Base64.getEncoder().encodeToString(body));
|
| | | else {
|
| | | LogUtils.e("解密失败,数据内容是:\r\n" + new String(body, "utf-8"));
|
| | | }
|
| | | }*/
|
| | | LogUtils.e("解密失败,数据内容是:\r\n" + new String(body, "utf-8"));
|
| | | }
|
| | | } catch (Exception e) {
|
| | | }
|