notification release

This commit is contained in:
Page Asgardius 2022-10-10 15:56:29 -07:00
parent fbd70ca875
commit 392d04c865

View file

@ -146,7 +146,6 @@ public class VideoPlayer extends AppCompatActivity {
// Start the playback. // Start the playback.
player.play(); player.play();
player.addListener(new Player.Listener() { player.addListener(new Player.Listener() {
@Override @Override
@ -278,6 +277,7 @@ public class VideoPlayer extends AppCompatActivity {
public void onDestroy() { public void onDestroy() {
mediaSessionConnector.setPlayer(null); mediaSessionConnector.setPlayer(null);
mediaSession.setActive(false); mediaSession.setActive(false);
playerNotificationManager.setPlayer(null);
player.release(); player.release();
playerView.setPlayer(null); playerView.setPlayer(null);
simpleCache.release(); simpleCache.release();
@ -296,6 +296,7 @@ public class VideoPlayer extends AppCompatActivity {
== AppOpsManager.MODE_ALLOWED) { == AppOpsManager.MODE_ALLOWED) {
mediaSessionConnector.setPlayer(null); mediaSessionConnector.setPlayer(null);
mediaSession.setActive(false); mediaSession.setActive(false);
playerNotificationManager.setPlayer(null);
player.release(); player.release();
playerView.setPlayer(null); playerView.setPlayer(null);
simpleCache.release(); simpleCache.release();