summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2014-11-19 02:27:05 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-19 02:27:05 +0000
commitdae9df0a67acae245a81a8a1404b14044eb5f5b4 (patch)
tree8186625ae391caba4e8961aebf7176171cb8b3ee /media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
parentfab5ad9331de20b82b02aac4bc73cccf7054fd38 (diff)
parentdb95b7dbba21fc0b1112f9c362d4d942dddefba0 (diff)
downloadframeworks_av-dae9df0a67acae245a81a8a1404b14044eb5f5b4.zip
frameworks_av-dae9df0a67acae245a81a8a1404b14044eb5f5b4.tar.gz
frameworks_av-dae9df0a67acae245a81a8a1404b14044eb5f5b4.tar.bz2
am db95b7db: am ba0790bf: Merge "Don\'t autoloop notifications" into lmp-mr1-dev
* commit 'db95b7dbba21fc0b1112f9c362d4d942dddefba0': Don't autoloop notifications
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
index 5ceddc7..e09567a 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
@@ -628,6 +628,16 @@ void NuPlayerDriver::notifyListener_l(
case MEDIA_PLAYBACK_COMPLETE:
{
if (mState != STATE_RESET_IN_PROGRESS) {
+ if (mAutoLoop) {
+ audio_stream_type_t streamType = AUDIO_STREAM_MUSIC;
+ if (mAudioSink != NULL) {
+ streamType = mAudioSink->getAudioStreamType();
+ }
+ if (streamType == AUDIO_STREAM_NOTIFICATION) {
+ ALOGW("disabling auto-loop for notification");
+ mAutoLoop = false;
+ }
+ }
if (mLooping || (mAutoLoop
&& (mAudioSink == NULL || mAudioSink->realtime()))) {
mPlayer->seekToAsync(0);