diff options
author | Zheng Zhang <zhzh@google.com> | 2017-01-03 10:20:57 -0800 |
---|---|---|
committer | Zheng Zhang <zhzh@google.com> | 2017-01-03 10:20:57 -0800 |
commit | 9de0d816297362fd6977919f5bcaf3c3a5196fa0 (patch) | |
tree | 6c9fe039b063011ed0e0e52404617e003d7d3932 | |
parent | 190f774cb9b672dd5fc85fa06731f40fb329f563 (diff) | |
download | android_packages_apps_Bluetooth-9de0d816297362fd6977919f5bcaf3c3a5196fa0.tar.gz android_packages_apps_Bluetooth-9de0d816297362fd6977919f5bcaf3c3a5196fa0.tar.bz2 android_packages_apps_Bluetooth-9de0d816297362fd6977919f5bcaf3c3a5196fa0.zip |
DO NOT MERGE ANYWHERE: Let audio HAL know when BT is turned off
Audio HAL needs setParams("hfp_enable=false") when BT is turned off
since if it does not, then
the next enable setParams("hfp_enable=true") does not succeed due to
audio HAL being in a weird stage.
Bug: 29937812
Bug: 33893861
(cherry picked from commit I111e38cbe578fe3eca66b07da8ad9204d064a02c)
Change-Id: Ic47348ee1347f68dde23c830ceed8bcdcba4dce7
-rwxr-xr-x | src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java b/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java index 05f3cae19..367b5dd5b 100755 --- a/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java +++ b/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java @@ -1284,6 +1284,9 @@ final class HeadsetClientStateMachine extends StateMachine { } public void doQuit() { + if (mAudioManager != null) { + mAudioManager.setParameters("hfp_enable=false"); + } quitNow(); } |