diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2014-04-10 15:00:35 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2014-04-22 09:46:59 -0700 |
commit | 8be88d114432c102264c0a73536efc537c6770ac (patch) | |
tree | 6a062c60a695321606cf9a26ea57d3dddcf189bf /policy/src/com/android | |
parent | 7085d138b21bbce7c9c989c719b35769267b422e (diff) | |
download | frameworks_base-8be88d114432c102264c0a73536efc537c6770ac.zip frameworks_base-8be88d114432c102264c0a73536efc537c6770ac.tar.gz frameworks_base-8be88d114432c102264c0a73536efc537c6770ac.tar.bz2 |
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
Diffstat (limited to 'policy/src/com/android')
0 files changed, 0 insertions, 0 deletions