Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 780caff3 authored by Danny Baumann's avatar Danny Baumann
Browse files

Fix occasionally flickering music control widget.

The problem was seemingly related to the player abandoning audio focus
while the playback state was still set to 'playing'. In that case, the
transport control was removed from the keyguard host because it had no
listener anymore, but later was re-added due to isMusicPlaying() still
returning true. Re-adding it lead to it re-registering with audio
service, which cleared the display due to nothing being connected, which
lead to the detachment listener being called again, which in turned
closed the loop.

While this may be a sign of a buggy player app (it should stop its
playback prior to abandoning audio focus), this situation still should
be handled gracefully. Fix the problem by simply reporting no music
being played while no remote control client is connected.

Change-Id: Id6834d38bc6faa3b6455ac66b413443f85606785
parent e5fd7135
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment