NotificationPlayer: fix error listener, sync in playback thread

The error and completion listeners should be set before
  MediaPlayer.prepare() is called, in case of an error
  during prepare.
Move the sleep to synchronize the playback of the notification
  and the ducking from the MediaPlayer to the playback thread.

Test: play a notification during media playback
Bug: 35855841
Change-Id: I42f01f485f533c1cc84b9d927f0dc594cdb7ec8f
1 file changed