summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2014-10-27 23:39:04 +0000
committerandroid-build-merger <android-build-merger@google.com>2014-10-27 23:39:04 +0000
commitff412661240d6ad34800512cb60841f8b0700107 (patch)
tree3cbf80d5599885efcc103c129c799349bb70790d /include
parent4a9e7a0e92f0d1cda5873fc47e93ee91cc043c4c (diff)
parentdf2592beab557663a471da2ac33ca463f7eee722 (diff)
downloadframeworks_av-ff412661240d6ad34800512cb60841f8b0700107.zip
frameworks_av-ff412661240d6ad34800512cb60841f8b0700107.tar.gz
frameworks_av-ff412661240d6ad34800512cb60841f8b0700107.tar.bz2
do not hold mNotifyLock when calling MediaPlayer::notify
automerge: df2592b * commit 'df2592beab557663a471da2ac33ca463f7eee722': 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 {