adding controls to exit pip or switch to background audio
This commit is contained in:
parent
c05c67e7f8
commit
fabb8a6d79
@ -131,8 +131,13 @@ 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);
|
||||
//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");
|
||||
}
|
||||
if (player != null) {
|
||||
player.release();
|
||||
|
Loading…
Reference in New Issue
Block a user