From: snickersun Date: Thu, 22 Oct 2020 06:25:41 +0000 (+0800) Subject: release V673 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=ee616369b41518daea34f8ef42338d7fcca01a25;p=protocol_srv.git release V673 确保 ping函数只在重新登录后执行一次。 --- diff --git a/app/release/ICSer_V671_2010221304_release.apk b/app/release/ICSer_V673_2010221423_release.apk similarity index 78% rename from app/release/ICSer_V671_2010221304_release.apk rename to app/release/ICSer_V673_2010221423_release.apk index 1d382f64..6a4b92fc 100644 Binary files a/app/release/ICSer_V671_2010221304_release.apk and b/app/release/ICSer_V673_2010221423_release.apk differ diff --git a/app/release/output.json b/app/release/output.json index e7b64fc0..b9c6efa6 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":671,"versionName":"2010221304","enabled":true,"outputFile":"ICSer_V671_2010221304_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V671_2010221304_release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":673,"versionName":"2010221423","enabled":true,"outputFile":"ICSer_V673_2010221423_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V673_2010221423_release.apk","properties":{}}] \ No newline at end of file diff --git a/app/src/main/java/com/enqualcomm/support/service/KeepAlive.java b/app/src/main/java/com/enqualcomm/support/service/KeepAlive.java index a9a37f56..de2de23f 100644 --- a/app/src/main/java/com/enqualcomm/support/service/KeepAlive.java +++ b/app/src/main/java/com/enqualcomm/support/service/KeepAlive.java @@ -56,6 +56,8 @@ public class KeepAlive extends AbstractConnectionService { //服务器收到AP03 会返回BP03,如果PB03 规定时间没收到,则认为发送心跳失败,需要重发, private boolean is_heartBeat_send_success=false; private boolean is_login_send_success=false; + private boolean is_ping_send_success=false; + //如果重试5次还没有连接上,则需要重新断开连接重新连接服务器。 private int hearBeatResendCount=0; private int MaxHeartbeatResendTime=6; @@ -257,7 +259,11 @@ public class KeepAlive extends AbstractConnectionService { isConnected = false; paramRuntime.setServerProtocolConnected(false); - //发送广播 服务器断开链接 + is_ping_send_success=false; + is_login_send_success=false; + is_heartBeat_send_success=false; + + //发送广播 服务器断开链接 paramRuntime.getContextProxy().sendBroadcastServerConnectionChanged(false); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("onConnectionClose="); @@ -334,9 +340,11 @@ public class KeepAlive extends AbstractConnectionService { // LauncherCtrl.getInstance(this.mContext).setStatusBarIcon("server_connected", STATUS_BAR_STATE_SERVER_CONNECTED_ON); // Deliver.triggerSendThread(); //链接上就尝试清除 buffer中的数据 - //心跳结束后执行 - mHandler.post(msendMsgAfterHeartbeat); - + if(!is_ping_send_success) { + //心跳结束后执行,且只在重新登陆后执行一次 + mHandler.post(msendMsgAfterHeartbeat); + is_ping_send_success=true; + } if (CoreService.needLocateInAfterHeartBeat==true){ //第一次启动或者系统Close后重连的时候,重置LocationCycle CoreService.needLocateInAfterHeartBeat=false; @@ -353,7 +361,7 @@ public class KeepAlive extends AbstractConnectionService { //心跳开始发送的时候,先重置response检测标志 is_heartBeat_send_success=false; - + is_ping_send_success=false; paramRuntime.lastLoginSuccessTime=System.currentTimeMillis(); //发送心跳包 diff --git a/app/version_code.properties b/app/version_code.properties index ca210889..d6c3dd1a 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Thu Oct 22 13:04:43 CST 2020 -VERSION_CODE=671 +#Thu Oct 22 14:23:56 CST 2020 +VERSION_CODE=673