am 6aa2acca: am 04152f98: Merge "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 w

Merge commit '6aa2accae3f58e4139f890f51c699901ee3abb88' into kraken

* commit '6aa2accae3f58e4139f890f51c699901ee3abb88':
  Fix bug 2599698 Music paused by itself
This commit is contained in:
Jean-Michel Trivi
2010-04-19 09:48:18 -07:00
committed by Android Git Automerger

View File

@ -95,6 +95,7 @@ public class NotificationPlayer implements OnCompletionListener {
audioManager.requestAudioFocus(null, mCmd.stream,
AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK);
}
player.setOnCompletionListener(NotificationPlayer.this);
player.start();
if (mPlayer != null) {
mPlayer.release();
@ -125,7 +126,6 @@ public class NotificationPlayer implements OnCompletionListener {
t.start();
t.wait();
}
mPlayer.setOnCompletionListener(this);
//-----------------------------------
long delay = SystemClock.uptimeMillis() - cmd.requestTime;