From: snickersun Date: Thu, 3 Sep 2020 13:37:49 +0000 (+0800) Subject: release V515 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=d98007fab36d6d478ac6be7872fa3c6743ccfde9;p=protocol_srv.git release V515 修改 coreService A9 5分钟提醒一次不弹窗,改为Toast。 修改 亮屏wakelock,改为handler执行,尝试减少time reset造成的 屏幕不灭。 --- diff --git a/app/release/ICSer_V511_2009021843_release.apk b/app/release/ICSer_V515_2009032133_release.apk similarity index 78% rename from app/release/ICSer_V511_2009021843_release.apk rename to app/release/ICSer_V515_2009032133_release.apk index 51b01b0d..3785f127 100644 Binary files a/app/release/ICSer_V511_2009021843_release.apk and b/app/release/ICSer_V515_2009032133_release.apk differ diff --git a/app/release/output.json b/app/release/output.json index e3c247f4..3c65cac0 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":513,"versionName":"2009022303","enabled":true,"outputFile":"ICSer_V513_2009022303_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V513_2009022303_release.apk","properties":{}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":515,"versionName":"2009032133","enabled":true,"outputFile":"ICSer_V515_2009032133_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V515_2009032133_release.apk","properties":{}}] \ No newline at end of file diff --git a/app/src/main/java/com/enqualcomm/support/CoreService.java b/app/src/main/java/com/enqualcomm/support/CoreService.java index 2ec23c90..94e91140 100644 --- a/app/src/main/java/com/enqualcomm/support/CoreService.java +++ b/app/src/main/java/com/enqualcomm/support/CoreService.java @@ -738,11 +738,8 @@ public class CoreService extends Service { if(runtime.Anti_off_flag>0 && Config.needAllwaysAlarmAntiOff){ runtime.Anti_off_flag++; WakeLockUtil.ScreenOnWakeLockTemperary(runtime.getContextProxy().context); - if (runtime.getAntioffStatus()) { - runtime.getContextProxy().sendMsgBroadcast(runtime.getContextProxy().context.getResources().getString(R.string.alarm_Illegal_unlock), 2); - }else{ - runtime.getContextProxy().sendMsgBroadcast(runtime.getContextProxy().context.getResources().getString(R.string.alarm_wristband_off), 2); - } + antiservice.send_anti_event_broadcast(1); + } } diff --git a/app/src/main/java/com/enqualcomm/support/service/AntiMonitorService.java b/app/src/main/java/com/enqualcomm/support/service/AntiMonitorService.java index 1c74bbbf..0cfb43a3 100644 --- a/app/src/main/java/com/enqualcomm/support/service/AntiMonitorService.java +++ b/app/src/main/java/com/enqualcomm/support/service/AntiMonitorService.java @@ -178,7 +178,7 @@ public class AntiMonitorService extends AbstractInvokeHandlerService { } - private void send_anti_event_broadcast(int antioff){ + public void send_anti_event_broadcast(int antioff){ Intent intent=new Intent(); intent.setAction(ACTION_ANTI_OFF); @@ -200,7 +200,12 @@ public class AntiMonitorService extends AbstractInvokeHandlerService { }else{ if (Config.A9_noBroadCastActionStrip) { - Util.ShowToast(mRuntime, mContext.getResources().getString(R.string.alarm_Illegal_unlock)); + + if (mRuntime.getAntioffStatus() == true) { + Util.ShowToast(mRuntime, mContext.getResources().getString(R.string.alarm_Illegal_unlock)); + } else { + Util.ShowToast(mRuntime, mContext.getResources().getString(R.string.alarm_wristband_off)); + } }else { if (mRuntime.getAntioffStatus() == true) { intent.putExtra(KEY_ANTI_TXT, mContext.getResources().getString(R.string.alarm_Illegal_unlock)); diff --git a/app/src/main/java/com/enqualcomm/support/utils/WakeLockUtil.java b/app/src/main/java/com/enqualcomm/support/utils/WakeLockUtil.java index 2095c3de..3f3bc56a 100644 --- a/app/src/main/java/com/enqualcomm/support/utils/WakeLockUtil.java +++ b/app/src/main/java/com/enqualcomm/support/utils/WakeLockUtil.java @@ -28,9 +28,13 @@ public class WakeLockUtil { public static void ScreenOnWakeLockTemperary(Context context) { final PowerManager.WakeLock wakelock = ((PowerManager)context.getSystemService(Context.POWER_SERVICE)).newWakeLock(ACQUIRE_CAUSES_WAKEUP| SCREEN_DIM_WAKE_LOCK, WakeLockUtil.class.getSimpleName()); wakelock.acquire(); - Observable.timer(5000L, TimeUnit.MILLISECONDS).subscribe(new Action1() { - public void call(Long param1Long) { wakelock.release(); } - }); + new Handler().postDelayed(new Runnable() { + @Override + public void run() { + wakelock.release(); + } + },5000L); + } } diff --git a/app/version_code.properties b/app/version_code.properties index e9993ff9..30519d79 100644 --- a/app/version_code.properties +++ b/app/version_code.properties @@ -1,2 +1,2 @@ -#Wed Sep 02 23:03:26 CST 2020 -VERSION_CODE=513 +#Thu Sep 03 21:33:40 CST 2020 +VERSION_CODE=515