diff options
author | Chong Zhang <chz@google.com> | 2014-10-28 07:14:02 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-28 07:14:02 +0000 |
commit | 121ee5cf0c51008172658fe3d728613cf942c5af (patch) | |
tree | d819ca70b2c9b7f6e0339e067754079629ec6c48 /include | |
parent | f3f3fe6db6dc99c13dc6b7fd0fc93ba77b7031b4 (diff) | |
parent | eb9ee3c08f3e397a726395f8658a087fb659e780 (diff) | |
download | frameworks_av-121ee5cf0c51008172658fe3d728613cf942c5af.zip frameworks_av-121ee5cf0c51008172658fe3d728613cf942c5af.tar.gz frameworks_av-121ee5cf0c51008172658fe3d728613cf942c5af.tar.bz2 |
am eb9ee3c0: do not hold mNotifyLock when calling MediaPlayer::notify automerge: df2592b automerge: ff41266
* commit 'eb9ee3c08f3e397a726395f8658a087fb659e780':
do not hold mNotifyLock when calling MediaPlayer::notify
Diffstat (limited to 'include')
-rw-r--r-- | include/media/MediaPlayerInterface.h | 11 |
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 { |