From 39c38ca0fa274fd0d27a88a20972d69e0e1e6454 Mon Sep 17 00:00:00 2001 From: dhk2 Date: Fri, 3 Jul 2020 20:35:53 -0700 Subject: [PATCH] Fixing unregister error for noisy audio --- .../schueller/peertube/service/VideoPlayerService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java b/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java index 4b76b0d..d100402 100644 --- a/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java +++ b/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java @@ -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;