Loading media/java/android/media/AudioService.java +11 −2 Original line number Diff line number Diff line Loading @@ -1982,10 +1982,19 @@ public class AudioService extends IAudioService.Stub { /** @see AudioManager#setBluetoothA2dpOn(boolean) */ public void setBluetoothA2dpOn(boolean on) { synchronized (mBluetoothA2dpEnabledLock) { int config = AudioSystem.FORCE_NONE; mBluetoothA2dpEnabled = on; config = AudioSystem.getForceUse(AudioSystem.FOR_MEDIA); if((config == AudioSystem.FORCE_BT_A2DP) && (!mBluetoothA2dpEnabled)) { config = AudioSystem.FORCE_NO_BT_A2DP; } else if(mBluetoothA2dpEnabled) { config = AudioSystem.FORCE_NONE; } Log.d(TAG, "BTEnabled "+mBluetoothA2dpEnabled+" config "+config); sendMsg(mAudioHandler, MSG_SET_FORCE_BT_A2DP_USE, SENDMSG_QUEUE, AudioSystem.FOR_MEDIA, mBluetoothA2dpEnabled ? AudioSystem.FORCE_NONE : AudioSystem.FORCE_NO_BT_A2DP, config, null, 0); } } Loading Loading
media/java/android/media/AudioService.java +11 −2 Original line number Diff line number Diff line Loading @@ -1982,10 +1982,19 @@ public class AudioService extends IAudioService.Stub { /** @see AudioManager#setBluetoothA2dpOn(boolean) */ public void setBluetoothA2dpOn(boolean on) { synchronized (mBluetoothA2dpEnabledLock) { int config = AudioSystem.FORCE_NONE; mBluetoothA2dpEnabled = on; config = AudioSystem.getForceUse(AudioSystem.FOR_MEDIA); if((config == AudioSystem.FORCE_BT_A2DP) && (!mBluetoothA2dpEnabled)) { config = AudioSystem.FORCE_NO_BT_A2DP; } else if(mBluetoothA2dpEnabled) { config = AudioSystem.FORCE_NONE; } Log.d(TAG, "BTEnabled "+mBluetoothA2dpEnabled+" config "+config); sendMsg(mAudioHandler, MSG_SET_FORCE_BT_A2DP_USE, SENDMSG_QUEUE, AudioSystem.FOR_MEDIA, mBluetoothA2dpEnabled ? AudioSystem.FORCE_NONE : AudioSystem.FORCE_NO_BT_A2DP, config, null, 0); } } Loading