fix(android): ZoneManager.cleanup must not remove the activity's static views

The black-screen on fullscreen widgets (and any single-zone playback after using
a multi-zone layout) was here: cleanup() called container.removeAllViews(), but
`container` is the activity root that also holds the static playerView/imageView/
youtubeWebView/statusOverlay. Removing them detached the WebView that the
fullscreen widget path reuses -> black. Remove only the zone views we added.
This commit is contained in:
ScreenTinker 2026-06-08 20:34:30 -05:00
parent 911cd07951
commit c7bbc4f815

View file

@ -235,7 +235,11 @@ class ZoneManager(
fun cleanup() {
releaseExoPlayers()
container.removeAllViews()
// Remove ONLY the views we added for zones. `container` is the activity's
// root, which also holds the static playerView/imageView/youtubeWebView/
// statusOverlay - removeAllViews() would detach those, so single-zone /
// fullscreen playback (which reuses them) rendered black after using zones.
zoneViews.values.forEach { container.removeView(it) }
zoneViews.clear()
zones = listOf()
}