OSDN Git Service

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>
Wed, 7 Nov 2018 20:49:55 +0000 (12:49 -0800)
commitff3ed00c79d145e5fa30fcacbfc92c570f1da01d
tree46427bcad5d446742dc00b642a28579b2084ea34
parent553e88bd1fb692e98e1e254482425e053d1492e6
Fix Spurious Hearing Aid Start and Stop Cmds

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
Change-Id: I33a175947b0118f0234ec6338c20ac6e7963a598
Merged-In: I33a175947b0118f0234ec6338c20ac6e7963a598
(cherry picked from commit cac96c646fac463a9c894ad702bd4428863c9400)
bta/hearing_aid/hearing_aid.cc
bta/hearing_aid/hearing_aid_audio_source.cc
bta/include/bta_hearing_aid_api.h