refactor(android): P2.1 Batch A - delegate status/permission methods to services

- Refactor checkStatus() to delegate to NotificationStatusChecker
- Refactor getNotificationStatus() to delegate to NotificationStatusChecker
- Refactor checkPermissionStatus() to delegate to PermissionManager
- Add service instance variables and initialization in load()
- Defer getExactAlarmStatus() (requires complex service initialization)

Reduces plugin class complexity by ~130 lines.
Services already exist - this is delegation, not extraction.

Refs: docs/progress/P2.1-BATCH-1.md
This commit is contained in:
Matthew Raymer
2025-12-23 10:38:39 +00:00
parent 13eafc11d1
commit 442c48c233
2 changed files with 223 additions and 1 deletions

View File

@@ -281,5 +281,30 @@ For release notes, see [CHANGELOG.md](../../CHANGELOG.md).
---
**Last Updated:** 2025-12-22
### 2025-12-23
**Changed:**
- `android/src/main/java/com/timesafari/dailynotification/DailyNotificationPlugin.kt`:
- Added service instance variables (`statusChecker`, `permissionManager`, `channelManager`)
- Updated `load()` method to initialize services with correct dependencies
- Refactored `checkStatus()` to delegate to `NotificationStatusChecker.getComprehensiveStatus()`
- Refactored `getNotificationStatus()` to delegate to `NotificationStatusChecker.getNotificationStatus()`
- Refactored `checkPermissionStatus()` to delegate to `PermissionManager.checkPermissionStatus()`
- Deferred `getExactAlarmStatus()` refactoring (requires complex service initialization)
**Added:**
- `docs/progress/P2.1-BATCH-A-STATE.md` - State directive for reconstituting work on another machine
**Notes:**
- P2.1 Batch A refactoring in progress (3 of ~10 methods completed)
- Reduced plugin class complexity by ~130 lines
- Services already exist - this is delegation, not extraction
- `getExactAlarmStatus()` deferred due to `DailyNotificationExactAlarmManager` requiring `AlarmManager` and `DailyNotificationScheduler` for initialization
**Related Commits/PRs:**
- P2.1 Batch A refactoring (in progress)
---
**Last Updated:** 2025-12-23