fix error
This commit is contained in:
parent
cac9f7e7f4
commit
0eeccf3cd5
1 changed files with 3 additions and 3 deletions
|
@ -288,7 +288,7 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer, Stat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized AudioFocusHelper getAudioFocus() {
|
private AudioFocusHelper getAudioFocus() {
|
||||||
try {
|
try {
|
||||||
return new net.osmand.plus.api.AudioFocusHelperImpl();
|
return new net.osmand.plus.api.AudioFocusHelperImpl();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -297,7 +297,7 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer, Stat
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void abandonAudioFocus() {
|
protected synchronized void abandonAudioFocus() {
|
||||||
log.debug("abandonAudioFocus");
|
log.debug("abandonAudioFocus");
|
||||||
if ((ctx.getSettings().AUDIO_STREAM_GUIDANCE.get() == 0) || (btScoStatus == true)) {
|
if ((ctx.getSettings().AUDIO_STREAM_GUIDANCE.get() == 0) || (btScoStatus == true)) {
|
||||||
toggleBtSco(false);
|
toggleBtSco(false);
|
||||||
|
@ -317,7 +317,7 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer, Stat
|
||||||
|
|
||||||
private synchronized boolean toggleBtSco(boolean on) {
|
private synchronized boolean toggleBtSco(boolean on) {
|
||||||
// Hardy, 2016-07-03: Establish a low quality BT SCO (Synchronous Connection-Oriented) link to interrupt e.g. a car stereo FM radio
|
// Hardy, 2016-07-03: Establish a low quality BT SCO (Synchronous Connection-Oriented) link to interrupt e.g. a car stereo FM radio
|
||||||
if (on=true) {
|
if (on) {
|
||||||
try {
|
try {
|
||||||
AudioManager mAudioManager = (AudioManager) ctx.getSystemService(Context.AUDIO_SERVICE);
|
AudioManager mAudioManager = (AudioManager) ctx.getSystemService(Context.AUDIO_SERVICE);
|
||||||
if (mAudioManager == null || !mAudioManager.isBluetoothScoAvailableOffCall()) {
|
if (mAudioManager == null || !mAudioManager.isBluetoothScoAvailableOffCall()) {
|
||||||
|
|
Loading…
Reference in a new issue