fixed image upload issues.
authorTrillGates <williamtrillgates@gmail.com>
Thu, 8 Apr 2021 12:22:03 +0000 (20:22 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Thu, 8 Apr 2021 12:22:03 +0000 (20:22 +0800)
app/src/main/java/com/ic/protocols/protocol_fzd.java

index 8ae8700..98c8b39 100644 (file)
@@ -49,6 +49,7 @@ import java.io.IOException;
 import java.io.RandomAccessFile;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
@@ -291,9 +292,10 @@ public class protocol_fzd {
                 ByteArrayOutputStream bos = new ByteArrayOutputStream();
                 String cmd = cmdMap.get(CMD_TYPE.img);
                 //发送消息
-                String timeStr = String.valueOf(System.currentTimeMillis());
+                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyMMddHHmmss");
+                String timeFormat = simpleDateFormat.format(System.currentTimeMillis());
                 int cmdLength = cmd.length() + CMDSPLIT.length() + "5".length() + CMDSPLIT.length()
-                        + timeStr.length() + CMDSPLIT.length() + result.length;
+                        + timeFormat.length() + CMDSPLIT.length() + result.length;
 
                 ICLogger.d("cmdLength == > " + cmdLength);
                 String header = genHeader(cmdLength, cmd);
@@ -310,7 +312,7 @@ public class protocol_fzd {
                 sb.append("5");
                 sb.append(CMDSPLIT);
                 //追加Y
-                sb.append(timeStr);
+                sb.append(timeFormat);
                 sb.append(CMDSPLIT);
                 //转成byte
                 bos.write(sb.toString().getBytes());
@@ -1567,7 +1569,7 @@ public class protocol_fzd {
                 mConnection.DeliverCMDMessageToSystem("rcapture", cmd);
                 break;
             case CALL:
-                handleCALL(data);
+                handleCALL(data, mRuntime);
                 mConnection.DeliverCMDMessageToSystem("CALL", cmd);
                 break;
             case MONITOR: