OSDN Git Service

Continue merge: Fix Spurious Hearing Aid Start and Stop Cmds
authorStanley Tng <stng@google.com>
Sun, 14 Oct 2018 04:17:00 +0000 (21:17 -0700)
committerStanley Tng <stng@google.com>
Thu, 15 Nov 2018 00:42:57 +0000 (16:42 -0800)
commit6d740054bd696869fbe9a5ef1550127e660a740f
tree90d5d311ea02d2fb101471592e7a80c3f5b3caeb
parent5731af6890e510664f175c498d763be6f6c93774
Continue merge: Fix Spurious Hearing Aid Start and Stop Cmds

The original CL from AOSP
(chg-id:I33a175947b0118f0234ec6338c20ac6e7963a598) is not merged into
pi-dev-plus-asop due to some wrong Merged-In and Change-Id tags errors.
This CL is to continue the merge starting at pi-dev-plus-asop.

Prevent the spurious Start and Stop Commands that are send to the
Hearing Aids when there is audio suspend and resume, and also connection
and disconnections.
Also, make sure that the callback for the Audio Suspend and Resume are
done in the main thread; previously, it was running in the wrong socket
thread.
Lastly, make sure that the Connection Update callback are processed
correctly; previously, we are not checking that the right connection
interval are set and taking the callbacks done by service discovery.

Test: Manual testing with Hearing Aids
Bug: 117619792
(cherry picked from commit ff3ed00c79d145e5fa30fcacbfc92c570f1da01d)

Change-Id: Ia95baae132e41690944adf852834ba407bf740a2
bta/hearing_aid/hearing_aid.cc
bta/hearing_aid/hearing_aid_audio_source.cc
bta/include/bta_hearing_aid_api.h