优化代码

main
Matthew 4 days ago
parent 8acd884797
commit 9ea9043a0e

@ -479,7 +479,7 @@ public class MicroPhotoService extends Service {
}
private boolean isMpMasterAlive(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.buildMasterAppDir(context) + "logs/mlog.txt");
@ -595,7 +595,7 @@ public class MicroPhotoService extends Service {
try {
boolean mpmstAlive = isMpMasterAlive(context);
if (!mpmstAlive) {
if (Build.TIME >= 1744905600000L) {
if (Build.TIME >= MicroPhotoContext.BUILD_TIME_WO_SID_20250418) {
int pid = MicroPhotoContext.getProcessIdOfService(context, MicroPhotoContext.PACKAGE_NAME_MPMASTER, MicroPhotoContext.SERVICE_NAME_MPMASTER);
if (pid != 0) {
android.os.Process.killProcess(pid);

Loading…
Cancel
Save