From: snickersun Date: Thu, 23 Apr 2020 07:11:04 +0000 (+0800) Subject: release V407 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=5932c016c7a73ac1a54e7697707ede0d0f124ed1;p=icsupport.git release V407 在服务器连接和断开增加broadcast 消息。 com.ic.protocol.ACTION_IS_SERVER_CONNECTED isConnected true/false --- diff --git a/app/release/ICSer_V402_2004131603_release.apk b/app/release/ICSer_V402_2004131603_release.apk deleted file mode 100644 index 97e6899e..00000000 Binary files a/app/release/ICSer_V402_2004131603_release.apk and /dev/null differ diff --git a/app/release/ICSer_V407_2004231507_release.apk b/app/release/ICSer_V407_2004231507_release.apk new file mode 100644 index 00000000..3ce629ec Binary files /dev/null and b/app/release/ICSer_V407_2004231507_release.apk differ diff --git a/app/src/main/java/com/enqualcomm/support/Constants.java b/app/src/main/java/com/enqualcomm/support/Constants.java index 51d412da..45740288 100644 --- a/app/src/main/java/com/enqualcomm/support/Constants.java +++ b/app/src/main/java/com/enqualcomm/support/Constants.java @@ -45,7 +45,7 @@ public interface Constants { public static final String ACTION_IMESSAGE = "action.message"; - public static final String ACTION_ISCONNECTED = "com.enqualcomm.support.ACTION_ISCONNECTED"; + public static final String ACTION_ISCONNECTED = "com.ic.protocol.ACTION_IS_SERVER_CONNECTED"; public static final String ACTION_ISSILENCE = "com.enqualcomm.icare.ACTION_ISSILENCE"; 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 5e5984cc..85e90e69 100644 --- a/app/src/main/java/com/enqualcomm/support/service/KeepAlive.java +++ b/app/src/main/java/com/enqualcomm/support/service/KeepAlive.java @@ -223,7 +223,7 @@ public class KeepAlive extends AbstractConnectionService { connectionError = true; isConnected = false; paramRuntime.setServerProtocolConnected(false); - paramRuntime.getContextProxy().sendBroadcast(false); + paramRuntime.getContextProxy().sendBroadcastServerConnectionChanged(false); StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("onConnectionClose="); stringBuilder.append(",set KeepAlive isConnected = false"); @@ -310,7 +310,7 @@ public class KeepAlive extends AbstractConnectionService { // isConnected = true; is_heartBeat_send_success=true; //广播服务器连接成功的消息 - paramRuntime.getContextProxy().sendBroadcast(true); + paramRuntime.getContextProxy().sendBroadcastServerConnectionChanged(true); // LauncherCtrl.getInstance(this.mContext).setStatusBarIcon("server_connected", STATUS_BAR_STATE_SERVER_CONNECTED_ON); // Deliver.triggerSendThread(); //链接上就尝试清除 buffer中的数据 CoreService.getInstance().stopConnectionRetryTimer(); diff --git a/app/src/main/java/com/enqualcomm/support/utils/CellInfoUtil.java b/app/src/main/java/com/enqualcomm/support/utils/CellInfoUtil.java index a30ff016..26889097 100644 --- a/app/src/main/java/com/enqualcomm/support/utils/CellInfoUtil.java +++ b/app/src/main/java/com/enqualcomm/support/utils/CellInfoUtil.java @@ -31,6 +31,9 @@ import java.util.List; public class CellInfoUtil { public static int getSignal(TelephonyManager tm , Runtime runtime){ + + if(tm==null) + return 5; CellLocation celllocation = tm.getCellLocation(); if (celllocation == null) { ICLogger.i("cellLocation = null"); diff --git a/app/src/main/java/com/enqualcomm/support/utils/ContextProxy.java b/app/src/main/java/com/enqualcomm/support/utils/ContextProxy.java index 92f9af99..392a4fc4 100644 --- a/app/src/main/java/com/enqualcomm/support/utils/ContextProxy.java +++ b/app/src/main/java/com/enqualcomm/support/utils/ContextProxy.java @@ -310,7 +310,7 @@ public class ContextProxy { // this.context.sendBroadcast(intent); // } - public void sendBroadcast(boolean paramBoolean) { + public void sendBroadcastServerConnectionChanged(boolean paramBoolean) { Intent intent = new Intent(); intent.setAction(ACTION_ISCONNECTED); intent.putExtra("isConnected", paramBoolean); diff --git a/app/version_code.properties b/app/version_code.properties index 9fceacda..cf3b5128 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Sun Apr 19 05:20:52 CST 2020 -VERSION_CODE=406 +#Thu Apr 23 15:07:00 CST 2020 +VERSION_CODE=407 diff --git a/local.properties b/local.properties index 218d050f..be381b4c 100644 --- a/local.properties +++ b/local.properties @@ -4,5 +4,5 @@ # Location of the SDK. This is only used by Gradle. # For customization when using a Version Control System, please read the # header note. -#Sun Apr 12 23:38:56 CST 2020 -sdk.dir=E\:\\Android\\sdk +#Thu Apr 23 14:33:06 CST 2020 +sdk.dir=C\:\\Users\\incar\\AppData\\Local\\Android\\Sdk