JLChen
2021-12-02 a03799e08e7cc9b984b89cd125fd01e31f78486d
HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/config/HDLLinkConfig.java
@@ -28,6 +28,7 @@
     * instance
     */
    private volatile static HDLLinkConfig instance;
    /**
     * getInstance
     *
@@ -71,6 +72,7 @@
    /**
     * 保存配置
     *
     * @param localSecret
     * @param gatewayId
     * @param ipAddress
@@ -86,6 +88,7 @@
    /**
     * 检测是否已经认证过
     *
     * @return
     */
    public boolean checkIfCertified(){
@@ -127,10 +130,18 @@
    public void setCurrentGateway(GatewaySearchBean currentGateway) {
        this.currentGateway = currentGateway;
        if (this.currentGateway != null && !TextUtils.isEmpty(this.currentGateway.getIp_address())) {
            if (!this.ipAddress.equals(this.currentGateway.getIp_address())) {
                //如果IP地址有变化则更新
                this.ipAddress = this.currentGateway.getIp_address();
                SPUtils.put(AUTHENTICATE_IPADDRESS_KEY, ipAddress);
            }
        }
    }
    /**
     * 判断当前主题数据是否需要加密
     *
     * @param topicStr 当前主题
     * @return
     */
@@ -145,6 +156,7 @@
    /**
     * 拼接网关ID获取完整的主题
     *
     * @param topicStr
     * @return
     */