Rework MediaButtonReceiver a bit:
commitca89e6b2cf366d173adedac6503f21906368564e
authorkugel <kugel@a1c6a512-1295-4272-9138-f99709370657>
Fri, 13 May 2011 11:26:18 +0000 (13 11:26 +0000)
committerkugel <kugel@a1c6a512-1295-4272-9138-f99709370657>
Fri, 13 May 2011 11:26:18 +0000 (13 11:26 +0000)
treec4244435d2d16e1001d5f3a0e0dcc360493161fa
parent5d74a45e9aef6f5e0e1668d721d9d14c59177ac6
Rework MediaButtonReceiver a bit:
 * Get rid of reflection since the lack of methods can be detected via exceptions
 * Use requestAudioFocus/abandonAudioFocus APIs on 2.2+ to play nice with other music apps.
 * Don't unregister the receiver on exit so we can receive media button presses (and startup the service) after idle poweroff (hopefully it's ok if mMediaButtonReceiver is garbage collected)

This should fix that Android calls the standard music app sometimes when those buttons are pressed.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29865 a1c6a512-1295-4272-9138-f99709370657
android/src/org/rockbox/Helper/MediaButtonReceiver.java
android/src/org/rockbox/RockboxService.java