Commit 49174a6f authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Fix potential crash on AudioFocus loss

parent 56cde161
......@@ -810,9 +810,13 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
mAudioManager.setParameters("bgm_state=true");
}
else {
if (mAudioManager != null) {
result = mAudioManager.abandonAudioFocus(mAudioFocusListener);
mAudioManager.setParameters("bgm_state=false");
}
else
result = AudioManager.AUDIOFOCUS_REQUEST_FAILED;
}
return result;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment