Fixing unregister error for noisy audio

This commit is contained in:
dhk2 2020-07-03 20:35:53 -07:00
parent a99e9978de
commit 39c38ca0fa

View File

@ -132,10 +132,10 @@ public class VideoPlayerService extends Service {
playerNotificationManager.setPlayer(null);
}
//Was seeing an error when exiting the program about about not unregistering the receiver.
if (null!=myNoisyAudioStreamReceiver) {
this.unregisterReceiver(myNoisyAudioStreamReceiver);
myNoisyAudioStreamReceiver=null;
}
if (null!=myNoisyAudioStreamReceiver) {
this.unregisterReceiver(myNoisyAudioStreamReceiver);
myNoisyAudioStreamReceiver=null;
}
if (player != null) {
player.release();
player = null;