mirror of
https://github.com/screentinker/screentinker.git
synced 2026-06-20 05:02:54 -06:00
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:
parent
911cd07951
commit
c7bbc4f815
|
|
@ -235,7 +235,11 @@ class ZoneManager(
|
||||||
|
|
||||||
fun cleanup() {
|
fun cleanup() {
|
||||||
releaseExoPlayers()
|
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()
|
zoneViews.clear()
|
||||||
zones = listOf()
|
zones = listOf()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue