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.
|
||||
player.play();
|
||||
|
||||
|
||||
player.addListener(new Player.Listener() {
|
||||
@Override
|
||||
|
||||
|
@ -278,6 +277,7 @@ public class VideoPlayer extends AppCompatActivity {
|
|||
public void onDestroy() {
|
||||
mediaSessionConnector.setPlayer(null);
|
||||
mediaSession.setActive(false);
|
||||
playerNotificationManager.setPlayer(null);
|
||||
player.release();
|
||||
playerView.setPlayer(null);
|
||||
simpleCache.release();
|
||||
|
@ -296,6 +296,7 @@ public class VideoPlayer extends AppCompatActivity {
|
|||
== AppOpsManager.MODE_ALLOWED) {
|
||||
mediaSessionConnector.setPlayer(null);
|
||||
mediaSession.setActive(false);
|
||||
playerNotificationManager.setPlayer(null);
|
||||
player.release();
|
||||
playerView.setPlayer(null);
|
||||
simpleCache.release();
|
||||
|
|
Loading…
Reference in a new issue