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

Skip to content
Commit a578c48e authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android (Google) Code Review
Browse files

Use playback state to update remote control stack

The remote control stack in AudioService is responsible for handling
 which application receives media button events. When an application
 "registers" its media button receiver, it gets placed at the top
 of the remote control stack. If the app also has audio focus (is
 at top of focus stack), this will also cause the information of
 the attached remote control client (RCC) to be displayed on the
 lockscreen.
If an app doesn't re-register its button receiver when it wants
 to receive the button events, it might have lost its place at the
 top of the remote control stack, and would not show up in the
 lockscreen anymore.
This change consists in using the playstate reported by the RCC
 to change the remote control stack. If an RCC reports a "playing"
 state (e.g. playing, fast forwarding), it is safe to assume the
 application is actively being used, and should be the one that
 receives the transport control buttons. This CL uses the reported
 playstate to conditionally move the corresponding stack entry
 to the top of the stack.

Bug 7311023

Change-Id: I1505f01664c16e108b22d33e3f47f0056343676e
parent 84aa61e2
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