diff options
author | Pankaj Kanwar <pkanwar@google.com> | 2015-09-25 04:40:23 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-09-25 04:40:23 +0000 |
commit | 65bfe1cac3297d3d4463db753c0397f28c872637 (patch) | |
tree | ad9a1161b3e1b5950c0189b3579f28bcd1eee254 /services | |
parent | 2f09d2a999edfba173771ab020b87eca7ec7ef26 (diff) | |
parent | 48221250ba8445b82dc9beaaf0853a37afffcdf6 (diff) | |
download | frameworks_base-65bfe1cac3297d3d4463db753c0397f28c872637.zip frameworks_base-65bfe1cac3297d3d4463db753c0397f28c872637.tar.gz frameworks_base-65bfe1cac3297d3d4463db753c0397f28c872637.tar.bz2 |
Merge "AudioService: cleanup sco audio mode upon disconnection." into mnc-dr-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/audio/AudioService.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 7565e9d..2c6bafc 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -2527,11 +2527,14 @@ public class AudioService extends IAudioService.Stub { } /** @see AudioManager#setBluetoothScoOn(boolean) */ - public void setBluetoothScoOn(boolean on){ + public void setBluetoothScoOn(boolean on) { if (!checkAudioSettingsPermission("setBluetoothScoOn()")) { return; } + setBluetoothScoOnInt(on); + } + public void setBluetoothScoOnInt(boolean on) { if (on) { mForcedUseForComm = AudioSystem.FORCE_BT_SCO; } else if (mForcedUseForComm == AudioSystem.FORCE_BT_SCO) { @@ -2892,6 +2895,8 @@ public class AudioService extends IAudioService.Stub { mScoAudioState = SCO_STATE_INACTIVE; broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED); } + AudioSystem.setParameters("A2dpSuspended=false"); + setBluetoothScoOnInt(false); } private void broadcastScoConnectionState(int state) { |