From 476fa0ab7cb696175981674bfa42b4e899552344 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 12 Jun 2025 17:54:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/xypower/mpmaster/MpMasterService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mpmaster/src/main/java/com/xypower/mpmaster/MpMasterService.java b/mpmaster/src/main/java/com/xypower/mpmaster/MpMasterService.java index d5376172..25269c10 100644 --- a/mpmaster/src/main/java/com/xypower/mpmaster/MpMasterService.java +++ b/mpmaster/src/main/java/com/xypower/mpmaster/MpMasterService.java @@ -412,7 +412,7 @@ public class MpMasterService extends Service { } private boolean isMpAppAlive(Context context) { - if (Build.TIME < 1744905600000L) { + if (Build.TIME < MicroPhotoContext.BUILD_TIME_WO_SID_20250418) { // 2025-04-18 old firmware // Check Log file time File file = new File(MicroPhotoContext.buildMpAppDir(context) + "logs/log.txt"); @@ -874,7 +874,7 @@ public class MpMasterService extends Service { try { Intent relaunchIntent = new Intent(); - if (Build.TIME < 1744905600000L) { + if (Build.TIME < MicroPhotoContext.BUILD_TIME_WO_SID_20250418) { // Earlier than 2025-04-18 relaunchIntent.putExtra("cmd", "reboot"); } else { @@ -890,7 +890,7 @@ public class MpMasterService extends Service { PendingIntent sysKAPendingIntent = PendingIntent.getBroadcast(this, BROADCAST_REQUEST_CODE_SYS_KEEPALIVE, relaunchIntent, PendingIntent.FLAG_UPDATE_CURRENT); alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, launchTs, sysKAPendingIntent); - if (Build.TIME < 1744905600000L) { + if (Build.TIME < MicroPhotoContext.BUILD_TIME_WO_SID_20250418) { logger.info(String.format("Register KeepAlive Reboot Clock: " + format.format(new Date(launchTs)))); } else { logger.info(String.format("Register KeepAlive Launch Clock: " + format.format(new Date(launchTs)))); @@ -1292,7 +1292,7 @@ public class MpMasterService extends Service { } private static void forceStopMpApp(Context context) { - if (Build.TIME < 1744905600000L) { + if (Build.TIME < MicroPhotoContext.BUILD_TIME_WO_SID_20250418) { // 2025-04-18 SysApi.forceStopApp(context, MicroPhotoContext.PACKAGE_NAME_MPAPP); } else {