From 20f93c20bf5423eab517c25ea3a6cde3683fe26e Mon Sep 17 00:00:00 2001 From: "XI.CHEN" <2311041011@qq.com> Date: Wed, 18 Dec 2024 16:21:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=87=87=E6=A0=B7=E5=91=A8?= =?UTF-8?q?=E6=9C=9F=E8=AE=BE=E7=BD=AE=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/xypower/mpapp/MicroPhotoService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/xypower/mpapp/MicroPhotoService.java b/app/src/main/java/com/xypower/mpapp/MicroPhotoService.java index 3a3ae1a4..773674fd 100644 --- a/app/src/main/java/com/xypower/mpapp/MicroPhotoService.java +++ b/app/src/main/java/com/xypower/mpapp/MicroPhotoService.java @@ -449,7 +449,7 @@ public class MicroPhotoService extends Service { for (int idx = 0; idx < cnt; idx++) { long val = intent.getLongExtra(EXTRA_PARAM_SCHEDULE + idx, 0); - int channel = (int) ((val & 0xFF000L) >> 12); + int channel = (int) ((val & 0xFFFF000L) >> 12); int preset = (int) ((val & 0xFF0L) >> 4); boolean photoOrVideo = ((val & 0xFL) == 0); @@ -664,7 +664,7 @@ public class MicroPhotoService extends Service { for (int idx = 0; idx < cnt; idx++) { val = schedules.get(idx).longValue(); intent.putExtra(EXTRA_PARAM_SCHEDULE + idx, schedules.get(idx).longValue()); - channelStr.append("(" + ((val & 0XFF000) >> 12) + "-" + Long.toString (((val & 0XFF0) >> 4), 16).toUpperCase() + ") "); + channelStr.append("(" + ((val & 0XFFFF000) >> 12) + "-" + Long.toString (((val & 0XFF0) >> 4), 16).toUpperCase() + ") "); } intent.putExtra(EXTRA_PARAM_TIME, scheduleTime); @@ -687,7 +687,7 @@ public class MicroPhotoService extends Service { long currentTimeMillis = System.currentTimeMillis(); Date date = new Date(currentTimeMillis + timeout); String dateStr = (String) DateFormat.format("MM-dd kk:mm:ss", date); - Log.d(TAG, "PhotoTimer Reg: " + dateStr + " currentTimeMillis=" + currentTimeMillis + " timeout=" + timeout + " CH-PR=" + channelStr.toString()); + infoLog( "Timer Reg: " + dateStr + " currentTimeMillis=" + currentTimeMillis + " timeout=" + timeout + " CH-PR=" + channelStr.toString()); alarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + timeout, pendingIntent); }