avoid strange NPE

This commit is contained in:
sonora 2016-07-20 12:29:07 +02:00
parent dfd1e15791
commit e3a431ce2e

View file

@ -279,7 +279,7 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer, Stat
if (android.os.Build.VERSION.SDK_INT >= 8) {
mAudioFocusHelper = getAudioFocus();
}
if (mAudioFocusHelper != null) {
if (mAudioFocusHelper != null && ctx != null) {
mAudioFocusHelper.requestFocus(ctx, streamType);
}
// If AudioManager.STREAM_VOICE_CALL try using BT SCO: