From: snickersun Date: Thu, 24 Sep 2020 10:52:55 +0000 (+0800) Subject: release ICL02ProtocolV2 V632 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=8d900b2691f81651fbb7c49499a41f2b44d629a7;p=protocol_srv.git release ICL02ProtocolV2 V632 给 BLE扫描结果 增加 try catch ,增强健壮性。 --- diff --git a/app/release/ICSer_V630_2009241845_release.apk b/app/release/ICSer_V632_2009241851_release.apk similarity index 78% rename from app/release/ICSer_V630_2009241845_release.apk rename to app/release/ICSer_V632_2009241851_release.apk index d70f8f18..a1438977 100644 Binary files a/app/release/ICSer_V630_2009241845_release.apk and b/app/release/ICSer_V632_2009241851_release.apk differ diff --git a/app/release/output.json b/app/release/output.json index 05c732c4..76586984 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":630,"versionName":"2009241845","enabled":true,"outputFile":"ICSer_V630_2009241845_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V630_2009241845_release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":632,"versionName":"2009241851","enabled":true,"outputFile":"ICSer_V632_2009241851_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V632_2009241851_release.apk","properties":{}}] \ No newline at end of file diff --git a/app/src/main/java/com/enqualcomm/support/LocationClient.java b/app/src/main/java/com/enqualcomm/support/LocationClient.java index f6a9f9af..151a44bc 100644 --- a/app/src/main/java/com/enqualcomm/support/LocationClient.java +++ b/app/src/main/java/com/enqualcomm/support/LocationClient.java @@ -137,19 +137,23 @@ public class LocationClient { public void OnScanFinished(ArrayList btPairedScanResult, ArrayList btNewScanResult) { if (btNewScanResult.size() > 0) { - ICLogger.i("found bt mac " + btNewScanResult.size()+" btMacList "+runtime.bleInfo.btMacList.size()); + ICLogger.i("found bt mac " + btNewScanResult.size() + " btMacList " + runtime.bleInfo.btMacList.size()); boolean in_area = false; - for (String mac : btNewScanResult) { - ICLogger.i("bt mac "+mac.replace(":","").toLowerCase()+" "+mac.toLowerCase()); - String tmp=mac.replace(":","").toLowerCase(); - tmp=tmp.substring(0,tmp.indexOf(",")); - if (runtime.bleInfo.btMacList.contains(tmp)) { - in_area = true; - break; + try { + for (String mac : btNewScanResult) { + ICLogger.i("bt mac " + mac.replace(":", "").toLowerCase() + " " + mac.toLowerCase()); + String tmp = mac.replace(":", "").toLowerCase(); + tmp = tmp.substring(0, tmp.indexOf(",")); + if (runtime.bleInfo.btMacList.contains(tmp)) { + in_area = true; + break; + } } + runtime.bleInfo.is_in_area = in_area; + }catch(Exception e){//如果出错,原来的状态不要变。防止误报,最多延迟一个周期报。 + e.printStackTrace(); + ICLogger.i(e.getMessage()); } - runtime.bleInfo.is_in_area = in_area; - } else { runtime.bleInfo.is_in_area = false; } diff --git a/app/version_code.properties b/app/version_code.properties index 6f30b4d0..50853942 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Thu Sep 24 18:45:56 CST 2020 -VERSION_CODE=630 +#Thu Sep 24 18:51:22 CST 2020 +VERSION_CODE=632