fix(android): remove duplicate scheduleId locals in DailyNotificationWorker

handleDisplayNotification already reads schedule_id after getInputData().
Inner branches redeclared String scheduleId, which javac rejects in the
same method scope. Drop the redundant lines; behavior unchanged.
This commit is contained in:
Jose Olarte III
2026-03-20 16:45:39 +08:00
parent 539b011fa8
commit 757263c073

View File

@@ -159,7 +159,6 @@ public class DailyNotificationWorker extends Worker {
priority = "normal";
}
// Post-reboot/rollover: Intent may lack title/body; resolve from DB by canonical schedule_id
String scheduleId = inputData.getString("schedule_id");
if ((title == null || title.isEmpty() || body == null || body.isEmpty()) && scheduleId != null) {
NotificationContent canonical = getContentByScheduleId(scheduleId);
if (canonical != null && canonical.getTitle() != null && canonical.getBody() != null) {
@@ -190,7 +189,6 @@ public class DailyNotificationWorker extends Worker {
// Regular notification: load from storage (by notification_id, then by schedule_id for rollover/user content)
content = getContentFromRoomOrLegacy(notificationId);
// Rollover/notify_* runs: prefer canonical reminder content by schedule_id so user text is shown
String scheduleId = inputData.getString("schedule_id");
if (scheduleId != null && (content == null || content.getTitle() == null || content.getTitle().isEmpty()
|| content.getBody() == null || content.getBody().isEmpty())) {
NotificationContent canonical = getContentByScheduleId(scheduleId);