summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2014-10-28 00:32:15 +0000
committerandroid-build-merger <android-build-merger@google.com>2014-10-28 00:32:15 +0000
commiteb9ee3c08f3e397a726395f8658a087fb659e780 (patch)
treef368deabda53de2ec8d10291766c6de84ef7aa54 /include
parent80f35a97dd633f74475cf1ec5730a3f881c06cc2 (diff)
parentff412661240d6ad34800512cb60841f8b0700107 (diff)
downloadframeworks_av-eb9ee3c08f3e397a726395f8658a087fb659e780.zip
frameworks_av-eb9ee3c08f3e397a726395f8658a087fb659e780.tar.gz
frameworks_av-eb9ee3c08f3e397a726395f8658a087fb659e780.tar.bz2
do not hold mNotifyLock when calling MediaPlayer::notify automerge: df2592b
automerge: ff41266 * commit 'ff412661240d6ad34800512cb60841f8b0700107': do not hold mNotifyLock when calling MediaPlayer::notify
Diffstat (limited to 'include')
-rw-r--r--include/media/MediaPlayerInterface.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h
index cf18a45..c412299 100644
--- a/include/media/MediaPlayerInterface.h
+++ b/include/media/MediaPlayerInterface.h
@@ -208,8 +208,15 @@ public:
void sendEvent(int msg, int ext1=0, int ext2=0,
const Parcel *obj=NULL) {
- Mutex::Autolock autoLock(mNotifyLock);
- if (mNotify) mNotify(mCookie, msg, ext1, ext2, obj);
+ notify_callback_f notifyCB;
+ void* cookie;
+ {
+ Mutex::Autolock autoLock(mNotifyLock);
+ notifyCB = mNotify;
+ cookie = mCookie;
+ }
+
+ if (notifyCB) notifyCB(cookie, msg, ext1, ext2, obj);
}
virtual status_t dump(int fd, const Vector<String16> &args) const {