Last active
September 8, 2017 23:04
-
-
Save isaidamier/48d605a18dfeb2610be47307cd261a62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onPause() { | |
super.onPause(); | |
if (Util.SDK_INT <= 23) { | |
releasePlayer(); | |
} | |
} | |
@Override | |
public void onStop() { | |
super.onStop(); | |
releasePlayer(); | |
} | |
private void releasePlayer() { | |
if (null != player) { | |
player.release(); | |
player = null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment