Merge "Log a warning when a MediaPlayer is finalized without having being released. b/5382634"
This commit is contained in:
committed by
Android (Google) Code Review
commit
8df38890d4
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user