Fixing unregister error for noisy audio
This commit is contained in:
parent
a99e9978de
commit
39c38ca0fa
@ -132,10 +132,10 @@ public class VideoPlayerService extends Service {
|
|||||||
playerNotificationManager.setPlayer(null);
|
playerNotificationManager.setPlayer(null);
|
||||||
}
|
}
|
||||||
//Was seeing an error when exiting the program about about not unregistering the receiver.
|
//Was seeing an error when exiting the program about about not unregistering the receiver.
|
||||||
if (null!=myNoisyAudioStreamReceiver) {
|
if (null!=myNoisyAudioStreamReceiver) {
|
||||||
this.unregisterReceiver(myNoisyAudioStreamReceiver);
|
this.unregisterReceiver(myNoisyAudioStreamReceiver);
|
||||||
myNoisyAudioStreamReceiver=null;
|
myNoisyAudioStreamReceiver=null;
|
||||||
}
|
}
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
player.release();
|
player.release();
|
||||||
player = null;
|
player = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user