summaryrefslogtreecommitdiffstats
path: root/media/libmedia/mediaplayer.cpp
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2010-08-03 07:49:49 -0700
committerEric Laurent <elaurent@google.com>2010-08-04 05:38:56 -0700
commit3b26844e60f8487388e7e62709faf0dada86e7e1 (patch)
tree2a6ed3d8b121bfb1dd5bd443ae46e268dfbfd438 /media/libmedia/mediaplayer.cpp
parenta5740924c0a71871f2697139effd43b137750597 (diff)
downloadframeworks_av-3b26844e60f8487388e7e62709faf0dada86e7e1.zip
frameworks_av-3b26844e60f8487388e7e62709faf0dada86e7e1.tar.gz
frameworks_av-3b26844e60f8487388e7e62709faf0dada86e7e1.tar.bz2
Fix issue 2876124.
Allow calls to MediaPlayer::notify() in idle state to signal errors from JNI. Change-Id: I1515fe69766f0a926b76e15c4971317da2acd6a0
Diffstat (limited to 'media/libmedia/mediaplayer.cpp')
-rw-r--r--media/libmedia/mediaplayer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index 1c99ae5..f3229c0 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -568,7 +568,8 @@ void MediaPlayer::notify(int msg, int ext1, int ext2)
locked = true;
}
- if (mPlayer == 0) {
+ // Allows calls from JNI in idle state to notify errors
+ if (!(msg == MEDIA_ERROR && mCurrentState == MEDIA_PLAYER_IDLE) && mPlayer == 0) {
LOGV("notify(%d, %d, %d) callback on disconnected mediaplayer", msg, ext1, ext2);
if (locked) mLock.unlock(); // release the lock when done.
return;