roll back anan protocol for AP10 and AP02 AP01
authorTrillGates <williamtrillgates@gmail.com>
Wed, 28 Apr 2021 12:46:29 +0000 (20:46 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Wed, 28 Apr 2021 12:46:29 +0000 (20:46 +0800)
app/release/ICSer_V780_2104281128_release.apk [moved from app/release/ICSer_V779_2104251624_release.apk with 78% similarity]
app/release/output.json
app/src/main/java/com/enqualcomm/support/service/Deliver.java
app/src/main/java/com/ic/protocols/protocolAPIHelper.java
app/src/main/java/com/ic/protocols/protocol_anan.java
app/version_code.properties

similarity index 78%
rename from app/release/ICSer_V779_2104251624_release.apk
rename to app/release/ICSer_V780_2104281128_release.apk
index 35619b1..dd0c6d9 100644 (file)
Binary files a/app/release/ICSer_V779_2104251624_release.apk and b/app/release/ICSer_V780_2104281128_release.apk differ
index 0b31224..2c81d25 100644 (file)
@@ -1 +1 @@
-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":779,"versionName":"2104251624","enabled":true,"outputFile":"ICSer_V779_2104251624_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V779_2104251624_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":780,"versionName":"2104281128","enabled":true,"outputFile":"ICSer_V780_2104281128_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V780_2104281128_release.apk","properties":{}}]
\ No newline at end of file
index 9054703..ab97550 100644 (file)
@@ -162,13 +162,17 @@ public class Deliver extends AbstractConnectionService {
     private static int CheckCount = 0;
 
     private static boolean checkNeedServerResponse(StringMessage cmd) {
-
         boolean NeedCheckServerResponse;
         if (cmd != null &&
                 Config.protocol_no == Config.PROTOCOL_FZD &&
-                (protocolAPIHelper.isCmdStr(cmd).equals("UD") || protocolAPIHelper.isCmdStr(cmd).equals("UD2"))
+                (protocolAPIHelper.isCmdStr(cmd).equals("UD")
+                        || protocolAPIHelper.isCmdStr(cmd).equals("UD2"))
         ) {
             NeedCheckServerResponse = false;
+        } else if (cmd != null &&
+                Config.protocol_no == Config.PROTOCOL_FZD &&
+                (protocolAPIHelper.isCmdStr(cmd).equals("AP10"))) {
+            NeedCheckServerResponse = false;
         } else {
             NeedCheckServerResponse = true;
         }
index 63b33d9..4efed98 100644 (file)
@@ -1,7 +1,5 @@
 package com.ic.protocols;
 
-import android.text.TextUtils;
-
 import com.enqualcomm.support.Config;
 import com.enqualcomm.support.CoreService;
 import com.enqualcomm.support.bean.Runtime;
@@ -260,9 +258,6 @@ public class protocolAPIHelper {
                 ret = protocol_mqtt.AL(runtime);
                 break;
             case PROTOCOL_ANAN:
-                if (TextUtils.isEmpty(runtime.getWifiInfo())) {
-                    return null;
-                }
                 ret = protocol_anan.AP10(runtime);
                 break;
         }
index de9685a..9f85e6f 100644 (file)
@@ -114,7 +114,7 @@ public class protocol_anan {
                         .append(ds.getLanguage()).append(CMDSPLIT)
                         .append(0).append(CMDSPLIT) //为0时不回复地址
                         .append(ds.getLBSMultiStationData()).append(CMDSPLIT)  //基站信息数据
-                        .append(apsum).append(TextUtils.isEmpty(wifiInfo) ? "" : CMDSPLIT).append(TextUtils.isEmpty(wifiInfo) ? "" : wifiInfo)
+                        .append(apsum).append(CMDSPLIT).append(wifiInfo)
                         .append(CMDEND).toString());  //wifi信息数据
     }
 
@@ -455,8 +455,8 @@ public class protocol_anan {
                 new StringBuffer(CMDHEADER).append(cmdMap.get(CMD_TYPE.AP10))
                         .append(TimeUtil.getShortDate())
                         .append(ds.getGPSData())
-                        .append(ds.getGPSHeading())
                         .append(TimeUtil.getShortTime())
+                        .append(ds.getGPSHeading())
                         .append(String.format("%03d", abs(ds.getSignalStrength())))
                         .append(ds.getGPSLocationStarNums())
                         .append(ds.getBattery()).append("0")
@@ -465,8 +465,9 @@ public class protocol_anan {
                         .append(ds.getLBSData()).append(CMDSPLIT)
                         .append(ds.getAlarmType()).append(CMDSPLIT)
                         .append(ds.getLanguage()).append(CMDSPLIT)
-                        .append("00").append(TextUtils.isEmpty(wifiInfo) ? "" : CMDSPLIT)  //不回复地址
-                        .append(TextUtils.isEmpty(wifiInfo) ? "" : wifiInfo.replace("AP","HOME")).append(CMDEND).toString());
+                        .append("00").append(CMDSPLIT)  //不回复地址
+                        .append(wifiInfo).append(CMDEND).toString());
+
     }
 
     public static StringMessage AP03(Runtime ds) {
@@ -504,8 +505,8 @@ public class protocol_anan {
                         .append(ds.getBattery()).append("0")
                         .append(ds.getProtection())
                         .append(ds.getWorkModeStr()).append(CMDSPLIT)
-                        .append(ds.getLBSData()).append(TextUtils.isEmpty(wifiInfo) ? "" : CMDSPLIT)
-                        .append(TextUtils.isEmpty(wifiInfo) ? "" : wifiInfo).append(CMDEND).toString());
+                        .append(ds.getLBSData()).append(CMDSPLIT)
+                        .append(wifiInfo).append(CMDEND).toString());
     }
 
 
index 66e01c0..b237352 100644 (file)
@@ -1,2 +1,2 @@
-#Sun Apr 25 16:24:46 CST 2021
-VERSION_CODE=779
+#Wed Apr 28 11:28:45 CST 2021
+VERSION_CODE=780