|
|
|
@ -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 {
|
|
|
|
|