notification release
This commit is contained in:
parent
fbd70ca875
commit
392d04c865
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue