Add capability-based TV input button and switching

This commit is contained in:
Elijah Kuntz 2026-10-19 11:08:40 -07:00
parent 22a2130563
commit 5f035d909a
13 changed files with 374 additions and 11 deletions

View file

@ -28,6 +28,12 @@ Projectivy's **Settings → General → Override current launcher** is switched
To return to the previous routing, turn off Luma's Home override, then open Projectivy and re-enable **Override current launcher**. No launcher needs to be disabled or uninstalled. The native chooser uses Android's [Home role API](https://developer.android.com/reference/android/app/role/RoleManager); the workaround uses the documented [AccessibilityService callbacks](https://developer.android.com/reference/android/accessibilityservice/AccessibilityService).
## TV inputs
On TVs exposing physical inputs through Android, an **input icon** appears beside Settings. Choose a port with the D-pad and press OK. Android's input names/custom labels and connection states are used; hidden inputs and duplicate CEC child entries are omitted. Devices exposing no physical inputs have no input button.
Luma opens an available standard TV channel viewer, with Android's native `TvView` as a fallback. Back from Luma's input viewer returns to Home. The viewer and audio focus are released when hidden. Input discovery runs off the UI thread; input-change callbacks are registered only while Home is foreground, with no polling, device-model checks, or new permissions.
## Appearance
**Settings → Appearance → Banner** offers: