OSDN Git Service

Save the AVDTP version after SDP discovery and read it on reconnect
authorPavlin Radoslavov <pavlin@google.com>
Mon, 23 Apr 2018 20:36:33 +0000 (13:36 -0700)
committerPavlin Radoslavov <pavlin@google.com>
Wed, 25 Apr 2018 22:18:59 +0000 (15:18 -0700)
commita634f4e30a28d38d5363e01a7d7b301c281f9df4
treeb57518215c5f98ccffac82cf7fe808863601ec52
parentabcc72862f6efc2efe103d3f69ca888d22f82d6f
Save the AVDTP version after SDP discovery and read it on reconnect

* Save the AVDTP version discovered by SDP to the device's local
  configuration section with key string of "AvdtpVersion"
* Refactor tBTA_AV_SCB and hide the AVDTP version and peer address
  behind get/set methods:
  AvdtpVersion() / SetAvdtpVersion() / PeerAddress().
* Added new methods tBTA_AV_SCB::OnConnected() and OnDisconnected().
  The former is used to setup some of the internal state when
  connected to a peer: the peer address and read the stored AVDTP
  version from local configuration section.
  The latter is used to reset that state when disconnected
  from that peer.
* Removed field tBTA_AV_SDP_RES.avdt_version because it is never
  set / used.
* Removed duplicate re-definition of AVDT_VERSION inside avdt_api.h

Bug: 78142165
Test: Manual: connect/reconnect with Sennheiser MOMENTUM M2 AEBT headset
Change-Id: Ib9dcd95dc9899fa81f3cd927f127e5cb0f21ef60
bta/av/bta_av_aact.cc
bta/av/bta_av_act.cc
bta/av/bta_av_int.h
bta/av/bta_av_main.cc
bta/av/bta_av_ssm.cc
stack/a2dp/a2dp_api.cc
stack/include/a2dp_api.h
stack/include/avdt_api.h