This pull request addresses a critical issue where a LateInitializationError occurs in the AnnouncementWorkflowNotifier class. The error is caused by accessing the '_timer' field before it has been properly initialized, leading to app crashes on Android TV devices.
Key changes:
Modified AnnouncementWorkflowNotifier to ensure '_timer' is correctly initialized before use.
Implemented null checks and error handling to prevent crashes if initialization fails.
Refactored timer logic to be more robust and less susceptible to race conditions.
These changes aim to resolve the high-priority crash affecting users on Android TV devices, improving app stability and overall user experience.
Tests
🧪 Use case 1: Normal app flow
💬 Description:
Launch the app on an Android TV device
Navigate through various screens that utilize the AnnouncementWorkflowNotifier
Verify that no crashes occur and the announcement workflow functions as expected
📷 Screenshots or GIFs (if applicable):
[No screenshots provided as this is a backend fix without visual changes]
Checklist:
[x] Coding Standards: I have reviewed my code to ensure it follows the project's coding standards.
[x] Testing: I have tested the changes and they work as expected.
[x] Merge Conflicts: I have resolved any merge conflicts with the latest main/development branch.
[x] Branch Status: The branch is up-to-date with the target branch (main/development).
📝 Summary
This PR for issue #1158
Description
This pull request addresses a critical issue where a LateInitializationError occurs in the AnnouncementWorkflowNotifier class. The error is caused by accessing the '_timer' field before it has been properly initialized, leading to app crashes on Android TV devices.
Key changes:
These changes aim to resolve the high-priority crash affecting users on Android TV devices, improving app stability and overall user experience.
Tests
🧪 Use case 1: Normal app flow
💬 Description:
📷 Screenshots or GIFs (if applicable): [No screenshots provided as this is a backend fix without visual changes]
Checklist: