From 42ce468b31b1711c65d88afdeacbf1fa637a3f9a Mon Sep 17 00:00:00 2001 From: dhk2 Date: Fri, 3 Jul 2020 16:06:14 -0700 Subject: [PATCH] Trying to assuage gits conflict adverse attitude --- .../peertube/service/VideoPlayerService.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 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 fbfc033..cc7823c 100644 --- a/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java +++ b/app/src/main/java/net/schueller/peertube/service/VideoPlayerService.java @@ -131,13 +131,11 @@ public class VideoPlayerService extends Service { playerNotificationManager.setPlayer(null); } //Was seeing an error when exiting the program about about not unregistering the receiver. - //Null check is insufficient to determine if it's been registered - try { - if (null!=myNoisyAudioStreamReceiver) { - this.unregisterReceiver(myNoisyAudioStreamReceiver); - } - } catch (Exception e) { - Log.e(TAG,"attempted to unregister a nonregistered noisy audio service"); + //TODO figure out how to stop this from crashing sometimes when the non null service is still not registered + // try catch fixes it but GIT considers that an unacceptable change to the code + + if (null!=myNoisyAudioStreamReceiver) { + this.unregisterReceiver(myNoisyAudioStreamReceiver); } if (player != null) { player.release();