Skip to content

Use a partial wake lock on TV devices so the screensaver can start - #93

Open
jagjordi wants to merge 1 commit into
snapcast:developfrom
jagjordi:fix/tv-partial-wakelock
Open

jagjordi wants to merge 1 commit into
snapcast:developfrom
jagjordi:fix/tv-partial-wakelock

Conversation

@jagjordi

Copy link
Copy Markdown

On Android TV the service acquires a FULL_WAKE_LOCK while playing, which keeps the display on and prevents the system screensaver from ever starting. Audio playback only needs the CPU awake, so this switches to a PARTIAL_WAKE_LOCK on all devices and drops the UI mode check. FULL_WAKE_LOCK has been deprecated since API 17.

Verified on two Android TV devices via dumpsys power: with the client running, the only lock held by the app is the partial one, and the screensaver starts after the normal idle timeout.

🤖 Generated with Claude Code

https://claude.ai/code/session_012S1nDQFpbj3TBa5HzaCwAL

On Android TV the service acquired a FULL_WAKE_LOCK while playing, which
forces the display to stay on and prevents the system screensaver from
ever starting. Audio playback only needs the CPU awake, so use a
PARTIAL_WAKE_LOCK on all devices and drop the UI mode check.

Verified on two Android TV devices: with the client running the only
lock held by the app is the partial one, and the screensaver starts
after the normal idle timeout.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_012S1nDQFpbj3TBa5HzaCwAL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant