You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix a bug where media resumption would break if prepare() was called in onCreate()
Media resumption code relied on the assumption that if no media
controller sends any commands, the player will stay in STATE_IDLE.
This optimization however breaks if a developer calls prepare()
in or shortly after (in my case, which caused this to be a race)
onCreate(). Instead, use playWhenReady to determine whether we need
to do a query with effort, because playWhenReady really shouldn't
be set to true on device bootup. :)
SystemUI asks for resumption support while a session is active and just
started playing (playWhenReady=true), hence the optimization is still valid.
0 commit comments