From: TrillGates Date: Thu, 8 Apr 2021 12:22:03 +0000 (+0800) Subject: fixed image upload issues. X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=8e56eb770d6769be42487852f17845cdc065461e;p=protocol_srv.git fixed image upload issues. --- diff --git a/app/src/main/java/com/ic/protocols/protocol_fzd.java b/app/src/main/java/com/ic/protocols/protocol_fzd.java index 8ae8700c..98c8b399 100644 --- a/app/src/main/java/com/ic/protocols/protocol_fzd.java +++ b/app/src/main/java/com/ic/protocols/protocol_fzd.java @@ -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: