OSDN Git Service

Fix bug 2599698 Music paused by itself
authorJean-Michel Trivi <jmtrivi@google.com>
Fri, 16 Apr 2010 23:40:47 +0000 (16:40 -0700)
committerJean-Michel Trivi <jmtrivi@google.com>
Fri, 16 Apr 2010 23:40:47 +0000 (16:40 -0700)
commita99f5f43cdb24f60fd1adc3fdfcb8d6ff101a0fd
tree9a543ea04b4ad970cd305375859d1b5517d9ffc7
parente3094117a094d8ed2dbd2f4cac15e48b73ceadf4
Fix bug 2599698 Music paused by itself
The NotificationPlayer sets an OnCompletionListener on the
MediaPlayer it's using to play the notification.
NotificationPlayer relies on the completion event to abandon
audio focus.
 The player was started before the listener was set. The theory
about the bug is that the player finished playing before the listener
was called. Therefore the audio focus was never abandonned, and
the music didn't resume.

Change-Id: Ic3baf359ea24de0d832a655dc47e745b25bc3dec
services/java/com/android/server/NotificationPlayer.java