release V638
authorsnickersun <scy@incartech.cn>
Mon, 28 Sep 2020 02:49:13 +0000 (10:49 +0800)
committersnickersun <scy@incartech.cn>
Mon, 28 Sep 2020 02:49:13 +0000 (10:49 +0800)
解决低电报警未报出的问题。

app/release/ICSer_V638_2009281042_release.apk [moved from app/release/ICSer_V637_2009272008_release.apk with 78% similarity]
app/release/output.json
app/src/main/java/com/enqualcomm/support/utils/BatteryUtil.java
app/version_code.properties

similarity index 78%
rename from app/release/ICSer_V637_2009272008_release.apk
rename to app/release/ICSer_V638_2009281042_release.apk
index 8ca1b0b..216e34b 100644 (file)
Binary files a/app/release/ICSer_V637_2009272008_release.apk and b/app/release/ICSer_V638_2009281042_release.apk differ
index e939c12..20e02ad 100644 (file)
@@ -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
index 6541033..c49776e 100644 (file)
@@ -94,7 +94,7 @@ public class BatteryUtil {
 \r
             if (Config.LOG_TOFILE) ICLogger.logToFile("Battery","BatteryLow  less than 15%!");\r
             //没有充电,上次电池level > 15% , 上次电池并且不是 低电状态,则报警\r
-            if (mRuntime.isPowerConnected()==false  && mRuntime.getBatterylevel()>15 && mRuntime.getBatteryLow()==false) {\r
+            if (mRuntime.isPowerConnected()==false  && mRuntime.getBatterylevel()<15 && mRuntime.getBatteryLow()==false) {\r
               send_batterylow_event_broadcast(param1Context, 1);\r
               play_waning_notify(param1Context);\r
               mRuntime.setAlarmType(Runtime.AlarmType.ALARM_LOWBATTERY);\r
@@ -109,7 +109,7 @@ public class BatteryUtil {
 \r
             if (Config.LOG_TOFILE) ICLogger.logToFile("Battery","BatteryLow less than 5% !");\r
             //没有充电,上次电池level > 15% , 上次电池并且不是 电池低电状态,则报警\r
-            if (mRuntime.isPowerConnected()==false && mRuntime.getBatterylevel()>5 ) {\r
+            if (mRuntime.isPowerConnected()==false && mRuntime.getBatterylevel()< 5 ) {\r
               send_batterylow_event_broadcast(param1Context, 1);\r
 \r
               play_waning_notify(param1Context);\r
@@ -161,11 +161,15 @@ public class BatteryUtil {
     AudioService.getInstance().play(context.getAssets(), "warning.mp3");\r
   }\r
   private void send_batterylow_event_broadcast(Context context,int batlow){\r
-\r
-    Intent intent=new Intent();\r
-    intent.setAction(ACTION_BATTERYLOW);\r
-    intent.putExtra(KEY_BATTERY_EVENT,batlow);\r
-    context.sendBroadcast(intent);\r
+    mHandler.post(new Runnable() {\r
+      @Override\r
+      public void run() {\r
+        Intent intent=new Intent();\r
+        intent.setAction(ACTION_BATTERYLOW);\r
+        intent.putExtra(KEY_BATTERY_EVENT,batlow);\r
+        context.sendBroadcast(intent);\r
+      }\r
+    });\r
   }\r
   private StringBuffer mBuffer;\r
 \r
index a140a23..bdc7862 100644 (file)
@@ -1,2 +1,2 @@
-#Sun Sep 27 20:08:39 CST 2020\r
-VERSION_CODE=637\r
+#Mon Sep 28 10:42:38 CST 2020\r
+VERSION_CODE=638\r