add more nullchecks because of FireTV

This commit is contained in:
Felix 2017-04-04 02:07:35 +02:00
parent 82cd534be4
commit 20f7d86588

View file

@ -198,14 +198,18 @@ public class OverlayFragment extends PlaybackFragment{
@Override
public void onStop() {
super.onStop();
mSession.release();
if(mSession != null){
mSession.release();
}
abandonAudioFocus();
}
@Override
public void onDestroy() {
super.onDestroy();
mSession.release();
if(mSession != null){
mSession.release();
}
mCallback.releasePlayer();
mHelper.onStop();
}
@ -235,6 +239,7 @@ public class OverlayFragment extends PlaybackFragment{
}
}
@SuppressWarnings("WrongConstant")
private void setPlaybackState(int state){
long currentPosition = getCurrentPositionLong();
PlaybackState.Builder stateBuilder = new PlaybackState.Builder()