From: snickersun Date: Mon, 28 Sep 2020 02:49:13 +0000 (+0800) Subject: release V638 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=9cbac3bc2881474b7409805576dfd0768681b0d2;p=protocol_srv.git release V638 解决低电报警未报出的问题。 --- diff --git a/app/release/ICSer_V637_2009272008_release.apk b/app/release/ICSer_V638_2009281042_release.apk similarity index 78% rename from app/release/ICSer_V637_2009272008_release.apk rename to app/release/ICSer_V638_2009281042_release.apk index 8ca1b0b7..216e34bf 100644 Binary files a/app/release/ICSer_V637_2009272008_release.apk and b/app/release/ICSer_V638_2009281042_release.apk differ diff --git a/app/release/output.json b/app/release/output.json index e939c125..20e02ad2 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":637,"versionName":"2009272008","enabled":true,"outputFile":"ICSer_V637_2009272008_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V637_2009272008_release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":638,"versionName":"2009281042","enabled":true,"outputFile":"ICSer_V638_2009281042_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V638_2009281042_release.apk","properties":{}}] \ No newline at end of file diff --git a/app/src/main/java/com/enqualcomm/support/utils/BatteryUtil.java b/app/src/main/java/com/enqualcomm/support/utils/BatteryUtil.java index 65410338..c49776e6 100644 --- a/app/src/main/java/com/enqualcomm/support/utils/BatteryUtil.java +++ b/app/src/main/java/com/enqualcomm/support/utils/BatteryUtil.java @@ -94,7 +94,7 @@ public class BatteryUtil { if (Config.LOG_TOFILE) ICLogger.logToFile("Battery","BatteryLow less than 15%!"); //没有充电,上次电池level > 15% , 上次电池并且不是 低电状态,则报警 - if (mRuntime.isPowerConnected()==false && mRuntime.getBatterylevel()>15 && mRuntime.getBatteryLow()==false) { + if (mRuntime.isPowerConnected()==false && mRuntime.getBatterylevel()<15 && mRuntime.getBatteryLow()==false) { send_batterylow_event_broadcast(param1Context, 1); play_waning_notify(param1Context); mRuntime.setAlarmType(Runtime.AlarmType.ALARM_LOWBATTERY); @@ -109,7 +109,7 @@ public class BatteryUtil { if (Config.LOG_TOFILE) ICLogger.logToFile("Battery","BatteryLow less than 5% !"); //没有充电,上次电池level > 15% , 上次电池并且不是 电池低电状态,则报警 - if (mRuntime.isPowerConnected()==false && mRuntime.getBatterylevel()>5 ) { + if (mRuntime.isPowerConnected()==false && mRuntime.getBatterylevel()< 5 ) { send_batterylow_event_broadcast(param1Context, 1); play_waning_notify(param1Context); @@ -161,11 +161,15 @@ public class BatteryUtil { AudioService.getInstance().play(context.getAssets(), "warning.mp3"); } private void send_batterylow_event_broadcast(Context context,int batlow){ - - Intent intent=new Intent(); - intent.setAction(ACTION_BATTERYLOW); - intent.putExtra(KEY_BATTERY_EVENT,batlow); - context.sendBroadcast(intent); + mHandler.post(new Runnable() { + @Override + public void run() { + Intent intent=new Intent(); + intent.setAction(ACTION_BATTERYLOW); + intent.putExtra(KEY_BATTERY_EVENT,batlow); + context.sendBroadcast(intent); + } + }); } private StringBuffer mBuffer; diff --git a/app/version_code.properties b/app/version_code.properties index a140a23d..bdc78628 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Sun Sep 27 20:08:39 CST 2020 -VERSION_CODE=637 +#Mon Sep 28 10:42:38 CST 2020 +VERSION_CODE=638