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

Skip to content
Commit 8be88d11 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi
Browse files

MediaFocusControl: priority to playing players for media button

When registering a media button event receiver (through
 AudioManager.registerMediaButtonEventReceiver()), do not
 always push the receiver to the top of the stack of event
 receivers:
 - only push to the top if the associated RemoteControlClient
   is in a playing state
 - otherwise push it below the entries at the top of the stack
   that are in a playing state
When changing the playstate of a RemoteControlClient:
 - push to the top of the stack the corresponding PlayerRecord
   is the state is a playing state
 - otherwise push it below the entries at the top of the stack
   that are in a playing state

When AudioService starts (e.g. after boot) and the last media
 button receiver is restored, it goes in the stack.
After this CL, this entry is not "orphaned" anymore after the
 same application registers itself to receive media buttons:
 the entry from the restoration is now properly associated with
 the registration from the application.

Bug 10749554

Change-Id: I985f9cc17b64a60ed4f2f2f6d03e117fb4e27570
parent 7085d138
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment