From: SnickerSun Date: Wed, 14 Jun 2023 10:00:34 +0000 (+0800) Subject: relase ICProtocol81_V965_2306132258_release.apk X-Git-Url: http://git.snicker.com.cn/sitemap.xml?a=commitdiff_plain;h=a9beaa8e0b5902f8019e4926ab95d2ff5749868f;p=protocol_srv.git relase ICProtocol81_V965_2306132258_release.apk 优化binder ,增加心率和体温binder成功率 --- diff --git a/app/release/ICProtocol81_V964_2306112300_release.apk b/app/release/ICProtocol81_V965_2306132258_release.apk similarity index 78% rename from app/release/ICProtocol81_V964_2306112300_release.apk rename to app/release/ICProtocol81_V965_2306132258_release.apk index 6d1962da..9e3a409f 100644 Binary files a/app/release/ICProtocol81_V964_2306112300_release.apk and b/app/release/ICProtocol81_V965_2306132258_release.apk differ diff --git a/app/release/output.json b/app/release/output.json index 77d49738..272ad26f 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":964,"versionName":"2306112300","enabled":true,"outputFile":"ICProtocol81_V964_2306112300_release.apk","fullName":"release","baseName":"release"},"path":"ICProtocol81_V964_2306112300_release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":965,"versionName":"2306132258","enabled":true,"outputFile":"ICProtocol81_V965_2306132258_release.apk","fullName":"release","baseName":"release"},"path":"ICProtocol81_V965_2306132258_release.apk","properties":{}}] \ No newline at end of file diff --git a/app/src/main/java/com/ic/protocolSrv/service/HeartRateManager.java b/app/src/main/java/com/ic/protocolSrv/service/HeartRateManager.java index c721d236..715b567e 100644 --- a/app/src/main/java/com/ic/protocolSrv/service/HeartRateManager.java +++ b/app/src/main/java/com/ic/protocolSrv/service/HeartRateManager.java @@ -134,7 +134,9 @@ public class HeartRateManager extends AbstractInvokeHandlerService { private HeartRateManager() { - + if(heartRateSensorService == null) { + bindServer(); + } } public void bindServer(){ //这是4.4的ICWorkService @@ -145,15 +147,28 @@ public class HeartRateManager extends AbstractInvokeHandlerService { //intent.setPackage(ICApplication.sContext.getPackageName()); intent.setPackage("com.ic.work"); ICApplication.sContext.bindService(intent, mRemoteConnection, Context.BIND_AUTO_CREATE); - //绑定8.1的WorkService - //使用的时候,谁不空就使用谁 - ICLogger.d(" start bind service..."); - Intent intent8541 = new Intent(); - intent8541.setAction(ACTION_HEART_RATE); - intent8541.setPackage("com.ic.work"); - ICApplication.sContext.bindService(intent8541, mRemoteConnection8541, Context.BIND_AUTO_CREATE); +// //绑定8.1的WorkService +// //使用的时候,谁不空就使用谁 +// ICLogger.d(" start bind service..."); +// Intent intent8541 = new Intent(); +// intent8541.setAction(ACTION_HEART_RATE); +// intent8541.setPackage("com.ic.work"); +// ICApplication.sContext.bindService(intent8541, mRemoteConnection8541, Context.BIND_AUTO_CREATE); + } + public void unbindServer(){ + //取消服务注册 + try { + heartRateSensorService.unRegisterCallback(mRemoteCallback); + } catch (Exception e) { + e.printStackTrace(); + } + if (heartRateSensorService != null) { + ICApplication.sContext.unbindService(mRemoteConnection); + } + if (iBloodRemoteService8521 != null) { + ICApplication.sContext.unbindService(mRemoteConnection8541); + } } - public void init(Runtime runtime) { this.runtime = runtime; } @@ -477,18 +492,7 @@ public class HeartRateManager extends AbstractInvokeHandlerService { public void onDetach(Connection paramConnection, Runtime paramRuntime) { ICLogger.d("onDetach..."); // unRegReceiver(); - //取消服务注册 - try { - heartRateSensorService.unRegisterCallback(mRemoteCallback); - } catch (Exception e) { - e.printStackTrace(); - } - if (heartRateSensorService != null) { - ICApplication.sContext.unbindService(mRemoteConnection); - } - if (iBloodRemoteService8521 != null) { - ICApplication.sContext.unbindService(mRemoteConnection8541); - } + unbindServer(); } @@ -501,10 +505,12 @@ public class HeartRateManager extends AbstractInvokeHandlerService { } //开始去测试 ICLogger.d("from == > " + from); + + if(heartRateSensorService == null) { + bindServer(); + } new Thread(() -> { try { - if(heartRateSensorService == null) - bindServer(); if (heartRateSensorService != null) { //判断类型,如果不是GH301的硬件,直接走全部测试 String isGh301 = Util.getSystemProperties("persist.sys.is_gh301", "false"); diff --git a/app/src/main/java/com/ic/protocolSrv/utils/TemperatureUtil.java b/app/src/main/java/com/ic/protocolSrv/utils/TemperatureUtil.java index a0917fd2..2a2321ca 100644 --- a/app/src/main/java/com/ic/protocolSrv/utils/TemperatureUtil.java +++ b/app/src/main/java/com/ic/protocolSrv/utils/TemperatureUtil.java @@ -36,7 +36,8 @@ public class TemperatureUtil { private ITempSensorService temperatureRemoteService; private TemperatureUtil() { - + if(temperatureRemoteService == null) + bind_server(); } public void bind_server(){ Intent intent = new Intent(); @@ -47,7 +48,7 @@ public class TemperatureUtil { } - public void release() { + public void unbindserver() { if (temperatureRemoteService != null) { try { temperatureRemoteService.unRegisterCallback(mRemoteCallback); @@ -225,10 +226,12 @@ public class TemperatureUtil { ICLogger.i("未佩戴,取消TempTest!" + from); return; } + + if(temperatureRemoteService == null) + bind_server(); + new Thread(() -> { try { - if(temperatureRemoteService == null) - bind_server(); if (temperatureRemoteService != null) { ICLogger.d("get temperature info..."); diff --git a/app/version_code.properties b/app/version_code.properties index d75c4c44..f0e097a9 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Sun Jun 11 23:00:31 GMT+08:00 2023 -VERSION_CODE=964 +#Tue Jun 13 22:58:31 GMT+08:00 2023 +VERSION_CODE=965