diff options
author | Marco Nelissen <marcone@google.com> | 2011-09-28 09:21:11 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2011-09-28 09:21:11 -0700 |
commit | 8dc208476f1fbbf6cd0b8cc3d48487a62cb72883 (patch) | |
tree | bab0c935df6afc8a87a851162529f4a4d0681a67 /media/jni/android_media_MediaPlayer.cpp | |
parent | 8013290dd0e9d3eabc3611d7eca47aa50bdceed0 (diff) | |
download | frameworks_base-8dc208476f1fbbf6cd0b8cc3d48487a62cb72883.zip frameworks_base-8dc208476f1fbbf6cd0b8cc3d48487a62cb72883.tar.gz frameworks_base-8dc208476f1fbbf6cd0b8cc3d48487a62cb72883.tar.bz2 |
Log a warning when a MediaPlayer is finalized without having being released.
b/5382634
Change-Id: I756d09d16a92ab8ce736c16a24e319a87be6c8de
Diffstat (limited to 'media/jni/android_media_MediaPlayer.cpp')
-rw-r--r-- | media/jni/android_media_MediaPlayer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp index c270f21..f3174fe 100644 --- a/media/jni/android_media_MediaPlayer.cpp +++ b/media/jni/android_media_MediaPlayer.cpp @@ -651,6 +651,10 @@ static void android_media_MediaPlayer_native_finalize(JNIEnv *env, jobject thiz) { LOGV("native_finalize"); + sp<MediaPlayer> mp = getMediaPlayer(env, thiz); + if (mp != NULL) { + LOGW("MediaPlayer finalized without being released"); + } android_media_MediaPlayer_release(env, thiz); } |