From 8f6c7881e8ea39dbf78842b34683417aa2875d23 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 17 Apr 2025 17:52:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E8=BF=90=E7=BB=B4=E7=9A=84=E4=BF=9D?= =?UTF-8?q?=E6=B4=BB=E9=99=90=E5=88=B6=E5=9C=A8=E7=89=B9=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=AE=B5=E5=86=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1:35-1:55 2:35-2:55 --- .../java/com/xypower/mpapp/MicroPhotoService.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/xypower/mpapp/MicroPhotoService.java b/app/src/main/java/com/xypower/mpapp/MicroPhotoService.java index 60f92e29..e80d1e3d 100644 --- a/app/src/main/java/com/xypower/mpapp/MicroPhotoService.java +++ b/app/src/main/java/com/xypower/mpapp/MicroPhotoService.java @@ -440,10 +440,13 @@ public class MicroPhotoService extends Service { } try { - Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage(MicroPhotoContext.PACKAGE_NAME_MPMASTER); - // launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); - if (launchIntent != null) { - context.startActivity(launchIntent); + Date dt = new Date(); + if ((dt.getHours() == 1 || dt.getHours() == 2) && dt.getMinutes() > 35 && dt.getMinutes() < 55) { + Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage(MicroPhotoContext.PACKAGE_NAME_MPMASTER); + // launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); + if (launchIntent != null) { + context.startActivity(launchIntent); + } } } catch (Exception ex) { ex.printStackTrace();