Trying to assuage gits conflict adverse attitude

This commit is contained in:
dhk2 2020-07-03 16:06:14 -07:00
parent 6995d9fde6
commit 42ce468b31

View File

@ -131,14 +131,12 @@ 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.
//Null check is insufficient to determine if it's been registered //TODO figure out how to stop this from crashing sometimes when the non null service is still not registered
try { // try catch fixes it but GIT considers that an unacceptable change to the code
if (null!=myNoisyAudioStreamReceiver) { if (null!=myNoisyAudioStreamReceiver) {
this.unregisterReceiver(myNoisyAudioStreamReceiver); this.unregisterReceiver(myNoisyAudioStreamReceiver);
} }
} catch (Exception e) {
Log.e(TAG,"attempted to unregister a nonregistered noisy audio service");
}
if (player != null) { if (player != null) {
player.release(); player.release();
player = null; player = null;