+- Android: fix the cover never appearing on Samsung One UI (observed on Samsung Galaxy A05 / SM-A057F, Android 14). The host-window walk in `ensureCoverOnTopmost` and `addCover` excluded the cover Window's root (`coverView`, a `SurfaceView` on the SCVH path) but not the SCVH-hosted content (`coverContent`, a `FreezableFrameLayout`). On Samsung One UI's customised WindowManager the SCVH content appears in `WindowManagerGlobal.mViews` despite living inside the SCVH's own `ViewRootImpl`, so the walk identified our own content view as the topmost host, tried to attach the cover as a sub-window of itself, and `WindowManager.addView` threw `BadTokenException: Unable to add window — token … is not valid; is your activity running?`. The cover never reached the Recents thumbnail on those devices. Fix: pass `exclude2 = coverContent` to `CoverWindowAttachment.topmostHostViewFor` at all three callsites so the walk skips both views and falls back to the activity decor. `CoverWindowAttachment` already supported the parameter (the blur source picker uses it for the same reason). Verified on Samsung Galaxy A05 (Android 14, One UI) — Recents thumbnail now shows the configured `#5F8AFA` background with the splash icon, exactly the iOS App Switcher parity it was designed for.
0 commit comments