feat(android): add diagnostic logging for prefetch scheduling

- Add comprehensive logging to scheduleBackgroundFetch method
  - Log scheduledTime and currentTime for comparison
  - Log calculated fetch time and delay in ms, hours, and minutes
  - Log detailed timing information for future vs past fetch times
  - Add fallback path logging for immediate fetch scenarios

- Add logging to scheduleDailyNotification callback
  - Log scheduled notification result with content details
  - Log when scheduleBackgroundFetch is called
  - Add error logging when notification scheduling fails

- Add WorkManager status logging in DailyNotificationFetcher
  - Log work ID when work is enqueued
  - Log detailed timing information (delay_ms, delay_hours)
  - Add past time detection with duration logging
  - Improve immediate fetch fallback logging

- Add prefetch scheduling trace documentation
  - Document complete code flow from notification to prefetch
  - Include debugging checklist and log search patterns
  - Add ADB commands for troubleshooting

These changes enable better debugging of prefetch scheduling issues
by providing detailed timing and execution information at every
decision point in the prefetch scheduling flow.
This commit is contained in:
Matthew Raymer
2025-10-27 12:40:04 +00:00
parent b724eb716f
commit 0e783a8a2d
4 changed files with 285 additions and 7 deletions

View File

@@ -167,7 +167,7 @@
<input type="number" id="configRetryCount" value="3" min="0" max="10">
</div>
<div class="grid">
<button class="button" onclick="configurePlugin()">Configure Plugin</button>
<button class="button" onclick="configurePlugin()">Configure Plugin</button>
<button class="button" onclick="updateSettings()">Update Settings</button>
</div>
</div>