Commit b6a4c13b authored by Thomas Guillem's avatar Thomas Guillem

PlaybackService: remove duplicate code from onDestroy()

The Wakelock and the MediaPlayer views are already released from stop() called
from onDestroy() too.

No need to release the MediaPlayer from background since it's not started at
this point.
parent 0bae1653
......@@ -362,21 +362,13 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
if (!AndroidDevices.hasTsp && !AndroidDevices.hasPlayServices)
AndroidDevices.setRemoteControlReceiverEnabled(false);
if (mWakeLock.isHeld())
mWakeLock.release();
unregisterReceiver(mReceiver);
if (mRemoteControlClientReceiver != null) {
unregisterReceiver(mRemoteControlClientReceiver);
mRemoteControlClientReceiver = null;
}
if (isVideoPlaying())
mMediaPlayer.getVLCVout().detachViews();
VLCApplication.runBackground(new Runnable() {
@Override
public void run() {
mMediaPlayer.release();
}
});
mMediaPlayer.release();
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment