From c7bbc4f8152a3400a441049de4c7dc07e59784de Mon Sep 17 00:00:00 2001 From: ScreenTinker Date: Mon, 8 Jun 2026 20:34:30 -0500 Subject: [PATCH] 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. --- .../java/com/remotedisplay/player/player/ZoneManager.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/com/remotedisplay/player/player/ZoneManager.kt b/android/app/src/main/java/com/remotedisplay/player/player/ZoneManager.kt index 0615fa0..73ddb35 100644 --- a/android/app/src/main/java/com/remotedisplay/player/player/ZoneManager.kt +++ b/android/app/src/main/java/com/remotedisplay/player/player/ZoneManager.kt @@ -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() }