Skip to content

[Bug] Video freezes after switching from heavy media apps (YouTube) on Pixel 10 Pro Fold #20

@maocide

Description

@maocide

Describe the bug

On high-end devices (confirmed on Pixel 10 Pro Fold), switching back to the wallpaper after using a heavy media application (YouTube) causes the video to freeze on a single frame.

Symptoms:

  • The wallpaper is visible but static (frozen).
  • Crucially: Locking and unlocking the screen (which destroys and recreates the surface) does not resolve the freeze.
  • Requires a full re-application of the wallpaper to fix.

Analysis

This appears to be a "Decoder Stall" or "Silent Freeze."

  1. YouTube claims the hardware video decoder.
  2. Upon returning to the home screen, the Wallpaper Engine attempts to resume.
  3. Due to resource contention or a race condition in the onVisibilityChanged logic, the ExoPlayer instance enters a state where isPlaying == true but the underlying decoder is not producing frames.
  4. Since no exception is thrown (onPlayerError is not triggered), the current auto-recovery logic does not kick in.

Proposed Fix (v1.1.3)

Implement a Stall Watchdog:

  • A background handler that checks the currentPosition of the player every 2 seconds while visible.
  • If isPlaying is true but currentPosition has not changed for 4 seconds, the watchdog will force a hard release() and initializePlayer() to reset the decoder connection.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions