Android: implement headphone detection thus enabling pause on unplug (FS#12097).
commit28a83278c8ad2b4a72c9de782deac268a23023e9
authorbluebrother <bluebrother@a1c6a512-1295-4272-9138-f99709370657>
Sat, 4 Jun 2011 19:17:47 +0000 (4 19:17 +0000)
committerbluebrother <bluebrother@a1c6a512-1295-4272-9138-f99709370657>
Sat, 4 Jun 2011 19:17:47 +0000 (4 19:17 +0000)
tree110956169d637cdda501a2dfb3f9097d89d09ad8
parent2fef93be54fab60915e97ae48bc45c5572ddd05a
Android: implement headphone detection thus enabling pause on unplug (FS#12097).

Listen to headphone plug events. There are currently two glitches with this:
- Android takes a while until it reports the unplug event, so there will be
  some delay until playback gets paused. This is an Android limitation.
- Rockbox debounces headphone state changes for one second. Therefore playback
  will shortly be routed to the speaker on unplug until Rockbox does the actual
  pause.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29956 a1c6a512-1295-4272-9138-f99709370657
android/src/org/rockbox/RockboxService.java
firmware/export/config/android.h
firmware/target/hosted/android/button-android.c