OSDN Git Service
Ajay Panicker [Sat, 16 Sep 2017 00:14:14 +0000 (00:14 +0000)]
Merge "Don't reject notifications and wait until new addressed player is ready (2/2)" into oc-dr1-dev
am:
7fba61cf06 -s ours
Change-Id: Ibbe07200a10dcbd5a2aa189a4d1e95fab9912a3c
TreeHugger Robot [Sat, 16 Sep 2017 00:10:43 +0000 (00:10 +0000)]
Merge "Don't reject notifications and wait until new addressed player is ready (2/2)" into oc-dr1-dev
Myles Watson [Fri, 15 Sep 2017 23:37:23 +0000 (23:37 +0000)]
GAP: Set service_id before calling gap_release_ccb
am:
f606990828 -s ours
Change-Id: I5d2b91b2f343491ef4ad1654f30eab118b173a52
Myles Watson [Thu, 14 Sep 2017 21:13:44 +0000 (14:13 -0700)]
GAP: Set service_id before calling gap_release_ccb
Calling gap_release_ccb with a service_id == 0, which in turn
calls BTM_SecClrService with an ID of 0.
From the documentation for BTM_SecClrService:
Service ID - Id of the service to remove. '0' removes all
service records (except SDP).
Bug:
65695769,
65223508
Test: BLE connection and characteristic read
Change-Id: Icf309807f02e1faa273cf9bad9c09d9221a8bbfd
Merged-In: Icf309807f02e1faa273cf9bad9c09d9221a8bbfd
(cherry picked from commit
5c5c10683e2a11162838297fc8054b15837c4f32)
(cherry picked from commit
4023c6731d5e991c6202d4e499b9dd43d642fb3c)
Ajay Panicker [Wed, 30 Aug 2017 01:30:43 +0000 (18:30 -0700)]
Don't reject notifications and wait until new addressed player is ready (2/2)
There are some carkits like the ones found in the 2016 Honda CRZ and some
Audi's that do not follow the spec and do not honor reject pending notification
messages after switching players. This causes an issue whenever you switch
players, the metadata freezes due to the fact that the carkit never re-registers
for new track changed notifications. This patch removes the reject notification
and reorders the current notifications.
Bug:
64142363
Test: Test with Audi S7 and 2016 Honda CRZ and see that switching players works
TestTracker: 105391/3975
Change-Id: Iaec70863594e13217916ab740d529f526d27c2d1
Merged-In: Iaec70863594e13217916ab740d529f526d27c2d1
(cherry picked from commit
dd535e70c767fe214c1634b46618d0fb5ed4385d)
Myles Watson [Thu, 14 Sep 2017 21:13:44 +0000 (14:13 -0700)]
GAP: Set service_id before calling gap_release_ccb
Calling gap_release_ccb with a service_id == 0, which in turn
calls BTM_SecClrService with an ID of 0.
From the documentation for BTM_SecClrService:
Service ID - Id of the service to remove. '0' removes all
service records (except SDP).
Bug:
65695769,
65223508
Test: BLE connection and characteristic read
Change-Id: Icf309807f02e1faa273cf9bad9c09d9221a8bbfd
(cherry picked from commit
5c5c10683e2a11162838297fc8054b15837c4f32)
Jeremy Klein [Thu, 14 Sep 2017 23:43:55 +0000 (23:43 +0000)]
Ensure that services are cleaned from the GattServer HandleMap. am:
eb215402e3
am:
04dd67f8e2
Change-Id: I12d8826369233a50bfeca51d2ae8aa8732ab35ed
Jeremy Klein [Thu, 14 Sep 2017 23:38:53 +0000 (23:38 +0000)]
Ensure that services are cleaned from the GattServer HandleMap.
am:
eb215402e3
Change-Id: Ic509b64189fccf8c48afaf947d625a8998b389af
Jeremy Klein [Fri, 8 Sep 2017 21:04:39 +0000 (14:04 -0700)]
Ensure that services are cleaned from the GattServer HandleMap.
The incorrect service handle was being plumbed up to onServiceDeleted.
This was causing stale entries to stick around forever in the HandleMap,
which could later cause failures to find callback references in
ContextMap if the connection ID changed for a given device.
Bug:
65463237
Test: unit tests modified and run
Change-Id: I2e22858b447f4e6b5a4fbceee4c406191c84a67d
(cherry picked from commit
e631789075f5625fd79c774678f4af0bf102c7d1)
TreeHugger Robot [Wed, 13 Sep 2017 21:49:20 +0000 (21:49 +0000)]
Merge "Add Suspend/Resume for advertising" into oc-mr1-dev
TreeHugger Robot [Wed, 13 Sep 2017 19:30:30 +0000 (19:30 +0000)]
Merge changes from topics "bt-asan-tBTA_AV-copy-crash", "bt-bta-av-role-res-error" into oc-mr1-dev
* changes:
Fix ASAN crash inside btif_av_event_deep_copy()
Return the correct status when BTA_AV Open failed because of role switch
Jakub Pawlowski [Mon, 28 Aug 2017 16:56:13 +0000 (09:56 -0700)]
Add Suspend/Resume for advertising
This is needed for resolving list handling.
Bug:
64846264
Test: updated unit tests
Change-Id: I3d9c7b90d3b69d459d33c4ca7a9849ca3a7abc40
TreeHugger Robot [Wed, 13 Sep 2017 17:47:47 +0000 (17:47 +0000)]
Merge "Fix crash during derigister GATT server" into oc-mr1-dev
Chao Quan [Mon, 24 Jul 2017 11:46:53 +0000 (19:46 +0800)]
Fix crash during derigister GATT server
When deregister a gatt server, GATT_deregister
will use a loop to stop service one by one and
call std::list::erase in GATTS_StopService to
remove service info. But erase makes iterator lose
efficacy. If the iterator is operated after that,
Bluetooth will crash.
Add the iterator before erase.
Test: manual
Bug:
65632336
Change-Id: I10f9351a95ab4922553d8a77663a0212407607aa
Merged-In: I10f9351a95ab4922553d8a77663a0212407607aa
(cherry picked from commit
a5aca8f6de825252b5bb72f5d1d8ff7dd1b5247a)
Pavlin Radoslavov [Tue, 12 Sep 2017 19:08:49 +0000 (12:08 -0700)]
Fix ASAN crash inside btif_av_event_deep_copy()
Allocate sufficient data on the stack that can be safely copied inside
btif_av_event_deep_copy()
Bug:
65524264
Test: Run Bluetooth on ASAN enabled build
Change-Id: Ie6d4a28933302131c58eb4aee34161e435634377
(cherry picked from commit
6d07e45b9ad1ae32ffe70a0bcc7736719ba973e5)
Pavlin Radoslavov [Tue, 12 Sep 2017 18:51:21 +0000 (11:51 -0700)]
Return the correct status when BTA_AV Open failed because of role switch
Bug:
65588660
Test: Code compilation
Change-Id: I705ec28c76f2342e18bece193005c962b9febac8
(cherry picked from commit
54bdc23b0452c356204379a2ce30c78fbf213461)
Myles Watson [Tue, 12 Sep 2017 15:23:23 +0000 (08:23 -0700)]
btm: Clear LINK_KEY_KNOWN flag for temporary connections
Bug:
62561154
Test: Smart Setup, erase target, Smart Setup
Change-Id: Icba672a38772dc99a74f351301c81d66f37ee929
Jakub Pawlowski [Fri, 8 Sep 2017 18:26:25 +0000 (11:26 -0700)]
Fix alarms being posted on wrong thread
Alarms from btu_bta_alarm_queue and btu_generic_alarm_queue should be
processed on the main MessageLoop thread.
Replaced obsoleted alarm_set_on_queue() alarm API with the new
alarm_set_on_mloop() API
Test: manual
Bug:
65078753
Change-Id: I54b472b39b44a6c541dbdcdad7414056d0dd4163
Merged-In: I54b472b39b44a6c541dbdcdad7414056d0dd4163
(cherry picked from commit
be8bbd7a83ec8bc900fac58a03010fbcb74956c9)
Jeremy Klein [Fri, 8 Sep 2017 21:04:39 +0000 (14:04 -0700)]
Ensure that services are cleaned from the GattServer HandleMap.
The incorrect service handle was being plumbed up to onServiceDeleted.
This was causing stale entries to stick around forever in the HandleMap,
which could later cause failures to find callback references in
ContextMap if the connection ID changed for a given device.
Bug:
65463237
Test: unit tests modified and run
Change-Id: I2e22858b447f4e6b5a4fbceee4c406191c84a67d
Pavlin Radoslavov [Fri, 1 Sep 2017 23:40:59 +0000 (16:40 -0700)]
Read the Tx Power level when flushing the A2DP Tx queue
Also, minor renaming and cleanup (for consistency).
Test: Streaming A2DP headset and trigger audio stutter
Bug:
64038257
Change-Id: Id722342b596e0bf3c9c7664272b6d3e311bb82e9
(cherry picked from commit
c7bf47cefc5446e99ff12b6cae45a0984e0b9999)
Pavlin Radoslavov [Fri, 1 Sep 2017 23:09:27 +0000 (16:09 -0700)]
Implement HCI_Read_Automatic_Flush_Timeout mechanism
Also, read the Automatic Flush Timeout when flushing the A2DP Tx queue
Test: Streaming A2DP headset and trigger audio stutter
Bug:
64038257
Change-Id: Ic49b5236328ddacde1d7f2aee131e35e317a14ef
(cherry picked from commit
b8568ae0e198a84225c9fdef1e715dc4d45565c9)
Jakub Pawlowski [Wed, 6 Sep 2017 15:41:46 +0000 (08:41 -0700)]
Fix GATT log spam
Bug:
65255942
Test: manual
Change-Id: I212bc93149dc514517f409edc36f74e1c2895d96
Ajay Panicker [Wed, 6 Sep 2017 16:59:51 +0000 (09:59 -0700)]
Change our AVRCP capabilities if the remote device only supports 1.3
This prevents issues with devices that only support 1.3 but can not
handle forward compatability like some Alpine Carkits.
Bug:
37943083
Test: Connect to Alpine carkit that only supports 1.3 and see new features
are used.
Change-Id: I6d041590dc51d7e8711b17fb1cb9c880b640052a
TreeHugger Robot [Sat, 2 Sep 2017 02:46:29 +0000 (02:46 +0000)]
Merge "Implement HCI_Read_Failed_Contact_Counter mechanism" into oc-mr1-dev
TreeHugger Robot [Sat, 2 Sep 2017 00:32:33 +0000 (00:32 +0000)]
Merge "Bluetooth: Add AVRCP 1.3 as a developer option for AVRCP version (2/2)" into oc-mr1-dev
Ajay Panicker [Fri, 1 Sep 2017 19:07:42 +0000 (12:07 -0700)]
Bluetooth: Add AVRCP 1.3 as a developer option for AVRCP version (2/2)
This is requied for the 2012 Mazda 3 carkit as the carkit refuses to send
AVRCP commands other than passthrough commands when the version is anything
else. AVRCP 1.3 is compatible with most carkits on the market and can be
used to get most carkits working at the cost of losing many features.
Bug:
37943083
Test: Set AVRCP 1.3 in developer options and see that SDP and the AVRCP
capabilites have updated to reflect this.
TestTracker: 105915/3975
Change-Id: Iffc7ed1dd91eecb699153125b25451de5826f202
Pavlin Radoslavov [Fri, 1 Sep 2017 05:06:11 +0000 (22:06 -0700)]
Implement HCI_Read_Failed_Contact_Counter mechanism
Also, read the Failed Contact Counter when flushing the A2DP Tx queue
Test: Streaming A2DP headset and trigger audio stutter
Bug:
64038257
Change-Id: I8ff72560e3840c5c22cfac9613c4be670b8a4cf1
(cherry picked from commit
6ab749f3cfd9c7660bb245764fcd01dcff51dbe9)
TreeHugger Robot [Fri, 1 Sep 2017 18:13:27 +0000 (18:13 +0000)]
Merge "BTIF: Add meaningful logging to btif_profile_queue" into oc-mr1-dev
TreeHugger Robot [Fri, 1 Sep 2017 18:10:20 +0000 (18:10 +0000)]
Merge "RFCOMM: Add more logging during port close" into oc-mr1-dev
Jack He [Wed, 30 Aug 2017 18:13:08 +0000 (11:13 -0700)]
BTIF: Add meaningful logging to btif_profile_queue
* Add INFO logging to add/advance/execute functions in
btif_profile_queue
* Add ERROR logging to add failures
Bug:
65051171
Test: Try connection to multiple profiles
Change-Id: I058ad06a45eeceb4d160af472f317d08843ca6bf
(cherry picked from commit
f42cf2b48f4c73fa2e6e6511b20d98a9ab665a7e)
Ajay Panicker [Fri, 1 Sep 2017 16:15:13 +0000 (16:15 +0000)]
Merge "Don't reject notifications and wait until new addressed player is ready (2/2)" into oc-mr1-dev
Ajay Panicker [Wed, 30 Aug 2017 01:30:43 +0000 (18:30 -0700)]
Don't reject notifications and wait until new addressed player is ready (2/2)
There are some carkits like the ones found in the 2016 Honda CRZ and some
Audi's that do not follow the spec and do not honor reject pending notification
messages after switching players. This causes an issue whenever you switch
players, the metadata freezes due to the fact that the carkit never re-registers
for new track changed notifications. This patch removes the reject notification
and reorders the current notifications.
Bug:
64142363
Test: Test with Audi S7 and 2016 Honda CRZ and see that switching players works
TestTracker: 105391/3975
Change-Id: Iaec70863594e13217916ab740d529f526d27c2d1
Jack He [Wed, 30 Aug 2017 19:00:41 +0000 (12:00 -0700)]
RFCOMM: Add more logging during port close
* Log MAC address and UUIDs of closed connections
* Log reasons for RFCOMM closure when generic CLOSE is used
as reason
Bug:
65080465
Test: Use profiles that use RFCOMM
Change-Id: Iff9f7537989e51d7b98f7cf1241db3f196f501d7
(cherry picked from commit
074867d4c7c966758eddbe30294c4a9b6459c8dd)
TreeHugger Robot [Thu, 31 Aug 2017 21:16:24 +0000 (21:16 +0000)]
Merge "Limit the maximum number of entries in the remote bdaddr cache to 1024" into oc-mr1-dev
TreeHugger Robot [Thu, 31 Aug 2017 21:12:29 +0000 (21:12 +0000)]
Merge "Add / update log messages during stack startup / shutdown" into oc-mr1-dev
Pavlin Radoslavov [Tue, 29 Aug 2017 17:00:21 +0000 (10:00 -0700)]
Add / update log messages during stack startup / shutdown
Test: manual
Bug:
64975965
Change-Id: I22ae7cad3b0ef3b7eb7ea2b7b6f93449a6363070
(cherry picked from commit
303ff4cee3830fa9c1f9f8f30ca1b7a9dd95fe0d)
Pavlin Radoslavov [Tue, 29 Aug 2017 00:42:46 +0000 (17:42 -0700)]
Limit the maximum number of entries in the remote bdaddr cache to 1024
Also, renamed p_dev_cb to remote_bdaddr_cache.
Bug:
64975965
Test: BLE scanning
Change-Id: I518390c53c5ff2a24ac9f010464225d763b33228
(cherry picked from commit
a375c31ae34dd49c48f12a15d4af003a864bd979)
Pavlin Radoslavov [Wed, 30 Aug 2017 18:02:27 +0000 (11:02 -0700)]
Inline comparison operators for RawAddress
Test: Code compilation
Bug:
64975965
Change-Id: I5a7ab7e0cd270c2769a3a471a506fc78a0a94533
(cherry picked from commit
c705670fbec2d404a92261efa0234c614232ec4f)
Pavlin Radoslavov [Tue, 29 Aug 2017 22:02:44 +0000 (15:02 -0700)]
Add missing comparison operators for RawAddress
Test: Unit tests added
Bug:
64975965
Change-Id: Id27f1ef7ec99f0761d6e2fb40bf38212ab8312a1
(cherry picked from commit
b3e7d947a1add4ecbdd90ca850614641e7224075)
Jakub Pawlowski [Tue, 22 Aug 2017 10:10:46 +0000 (03:10 -0700)]
Fix crashes in btm_consolidate_dev
It is not safe to do list_next after list_remove.
Test: sl4a BleStressTest:test_le_pairing
Bug:
31442085
Change-Id: Ib4cb02154684b39ebc652d20559e1b07eee2c357
Merged-In: Ib4cb02154684b39ebc652d20559e1b07eee2c357
(cherry picked from commit
bd8ed367d3522037c0c09e425fc85baf5b66a411)
Jakub Pawlowski [Fri, 18 Aug 2017 11:14:22 +0000 (04:14 -0700)]
Fix connection handle data type
conn_handle should be uint16_t, not uint8_t.
Test: compilation test
Bug:
64232952
Change-Id: Ibce88e2cf2f74f402ea26f7471e5ac35aef6229b
Merged-In: Ibce88e2cf2f74f402ea26f7471e5ac35aef6229b
Jakub Pawlowski [Wed, 16 Aug 2017 13:41:02 +0000 (06:41 -0700)]
Cleanup RawAddress usage
Use RawAddress::kLength instead of sizeof(RawAddress). When copying
value using memcpy, use "->address" instead of direct instance address.
Bug:
64726342
Change-Id: Iac7e5674f7e32b53162ab734c2251e65e9d4554c
Merged-In: Iac7e5674f7e32b53162ab734c2251e65e9d4554c
(cherry picked from commit
2e05f0dd4f3b33a0fdeb9a1c72a53cf14851e734)
Andre Eisenbach [Thu, 17 Aug 2017 01:02:43 +0000 (01:02 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
294cc61f4f am:
5dc24c7b41 am:
8498351370 am:
615de1d1fe -s ours am:
1ee8850324 -s ours am:
27e67ba277 -s ours am:
5af8ec6e85 -s ours am:
bc2ddd916c -s ours am:
ad12cf8070 -s ours am:
eb80110ae4 -s ours
am:
672f067faf -s ours
Change-Id: I81142402eb0fa0ca40fde6b9f50e3c827dba8f2e
Andre Eisenbach [Thu, 17 Aug 2017 00:53:40 +0000 (00:53 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
294cc61f4f am:
5dc24c7b41 am:
8498351370 am:
615de1d1fe -s ours am:
1ee8850324 -s ours am:
27e67ba277 -s ours am:
5af8ec6e85 -s ours am:
bc2ddd916c -s ours am:
ad12cf8070 -s ours
am:
eb80110ae4 -s ours
Change-Id: Ie41f709b2f47fcf629022c561b3c712ae90ac572
Andre Eisenbach [Thu, 17 Aug 2017 00:51:13 +0000 (00:51 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
294cc61f4f am:
5dc24c7b41 am:
8498351370 am:
615de1d1fe -s ours am:
1ee8850324 -s ours am:
27e67ba277 -s ours am:
5af8ec6e85 -s ours am:
bc2ddd916c -s ours
am:
ad12cf8070 -s ours
Change-Id: I98a440d9bfa53e413c531b2afa510b52c02104cc
Andre Eisenbach [Thu, 17 Aug 2017 00:49:09 +0000 (00:49 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
294cc61f4f am:
5dc24c7b41 am:
8498351370 am:
615de1d1fe -s ours am:
1ee8850324 -s ours am:
27e67ba277 -s ours am:
5af8ec6e85 -s ours
am:
bc2ddd916c -s ours
Change-Id: Iad7cf407257de1788102f83e7ceafaf9167655c9
Andre Eisenbach [Thu, 17 Aug 2017 00:46:40 +0000 (00:46 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
294cc61f4f am:
5dc24c7b41 am:
8498351370 am:
615de1d1fe -s ours am:
1ee8850324 -s ours am:
27e67ba277 -s ours
am:
5af8ec6e85 -s ours
Change-Id: I8971c22e6641d46e2d1fba13fe55407e3386acb2
Andre Eisenbach [Thu, 17 Aug 2017 00:45:10 +0000 (00:45 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
294cc61f4f am:
5dc24c7b41 am:
8498351370 am:
615de1d1fe -s ours am:
1ee8850324 -s ours
am:
27e67ba277 -s ours
Change-Id: I5fb42670d4a641b39a14e538057a0193d33afb0e
Andre Eisenbach [Thu, 17 Aug 2017 00:42:45 +0000 (00:42 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
294cc61f4f am:
5dc24c7b41 am:
8498351370 am:
615de1d1fe -s ours
am:
1ee8850324 -s ours
Change-Id: I5f54fca3ea0d17cad9a5e5439265c9b40340036c
Andre Eisenbach [Thu, 17 Aug 2017 00:40:10 +0000 (00:40 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
82e4754aaa am:
3b90fd7b0c am:
33aee8d11e am:
d772aec66b am:
c8d256c052 -s ours am:
7fe92a7abf -s ours
am:
65fc86d417 -s ours
Change-Id: I9b9ce9b2e16443a9a3261a7d918ad027c9caaf02
Andre Eisenbach [Thu, 17 Aug 2017 00:39:39 +0000 (00:39 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
294cc61f4f am:
5dc24c7b41 am:
8498351370
am:
615de1d1fe -s ours
Change-Id: I2e6425620ccf65636ba0b0ba6c783c8bf8764ec0
Andre Eisenbach [Thu, 17 Aug 2017 00:37:42 +0000 (00:37 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
294cc61f4f am:
5dc24c7b41
am:
8498351370
Change-Id: I171cafa603f3bf9d6a91895aba461fa96711c18c
Andre Eisenbach [Thu, 17 Aug 2017 00:32:37 +0000 (00:32 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
294cc61f4f
am:
5dc24c7b41
Change-Id: I27dffd6583706912f79cfd730eca390e930e9294
Andre Eisenbach [Thu, 17 Aug 2017 00:30:38 +0000 (00:30 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot()
am:
294cc61f4f
Change-Id: Ief8d911221408ff79a5addc7a7d58c7ca1a38808
Andre Eisenbach [Thu, 17 Aug 2017 00:28:39 +0000 (00:28 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
82e4754aaa am:
3b90fd7b0c am:
33aee8d11e am:
d772aec66b am:
c8d256c052 -s ours
am:
7fe92a7abf -s ours
Change-Id: Ie383a65f8f6b2593f4c4bf32cea0179521e351b3
Andre Eisenbach [Thu, 17 Aug 2017 00:03:55 +0000 (00:03 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
82e4754aaa am:
3b90fd7b0c am:
33aee8d11e am:
d772aec66b
am:
c8d256c052 -s ours
Change-Id: I0c563fdf2b28e8b50abab9f6d9a1b1851a13a2ab
Andre Eisenbach [Wed, 16 Aug 2017 23:45:18 +0000 (23:45 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
82e4754aaa am:
3b90fd7b0c am:
33aee8d11e
am:
d772aec66b
Change-Id: I41ed5d1d9f8efa504941b7084aa955496dfe0ec3
Andre Eisenbach [Wed, 16 Aug 2017 23:27:46 +0000 (23:27 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
82e4754aaa am:
3b90fd7b0c
am:
33aee8d11e
Change-Id: Ie3991cdfd834d3d0ff736562af300251fd70f96c
Andre Eisenbach [Wed, 16 Aug 2017 23:07:45 +0000 (23:07 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
82e4754aaa
am:
3b90fd7b0c
Change-Id: I2e9769b83ab39cfc51320b1116959780dd5d92da
Andre Eisenbach [Wed, 16 Aug 2017 22:52:42 +0000 (22:52 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot()
am:
82e4754aaa
Change-Id: Ica0050f493b45e216daa4c31e6eea38a4921d356
Andre Eisenbach [Wed, 16 Aug 2017 17:37:42 +0000 (17:37 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot() am:
b413f1b136
am:
a708395ce2
Change-Id: I6939a5c1ad822a09177705032a7ba9ef4da3e4d0
Andre Eisenbach [Wed, 16 Aug 2017 17:25:11 +0000 (17:25 +0000)]
SDP: Bounds check 'id' parameter for free_sdp_slot()
am:
b413f1b136
Change-Id: I2a51738b15ab49d419a95a1f14abf87aa2542af1
Jack He [Tue, 15 Aug 2017 06:02:16 +0000 (23:02 -0700)]
Fix errors in handling RawAddresses
* In change I8d1bd6914aec55bb53495b1d0d5e3d37b86865e6
memcmp(a, b, LEN) != 0 should be translated to
A != B
* memcpy should not be applied to RawAddress objects.
Assignment operator should be used instead.
* memset should not be applied to RawAddress objects.
Assignment to RawAddress::kEmpty should be used.
* Fixed a crash in GATT
Bug:
64316340
Test: Unit test, pair with device and transmit
Change-Id: Iceefab821c1d45a88194d87a43a192afa5f263fd
(cherry picked from commit
882aec320e88b0860a3d53db828bb099c7ca2409)
Andre Eisenbach [Tue, 8 Aug 2017 23:51:12 +0000 (16:51 -0700)]
SDP: Bounds check 'id' parameter for free_sdp_slot()
Merged-In: I34e8296ec7ec6b4ffbe1fa0452754f2a421e6ec7
Test: manual
Fixes:
37502513
Change-Id: I34e8296ec7ec6b4ffbe1fa0452754f2a421e6ec7
(cherry picked from commit
b413f1b1365af4273647727e497848f95312d0ec)
Andre Eisenbach [Tue, 8 Aug 2017 22:41:21 +0000 (15:41 -0700)]
SDP: Bounds check 'id' parameter for free_sdp_slot()
Merged-In: I34e8296ec7ec6b4ffbe1fa0452754f2a421e6ec7
Test: manual
Fixes:
37502513
Change-Id: I34e8296ec7ec6b4ffbe1fa0452754f2a421e6ec7
(cherry picked from commit
b413f1b1365af4273647727e497848f95312d0ec)
Andre Eisenbach [Tue, 8 Aug 2017 22:41:21 +0000 (15:41 -0700)]
SDP: Bounds check 'id' parameter for free_sdp_slot()
Test: manual
Fixes:
37502513
Change-Id: I34e8296ec7ec6b4ffbe1fa0452754f2a421e6ec7
Jakub Pawlowski [Mon, 7 Aug 2017 21:33:32 +0000 (21:33 +0000)]
Advertisement parsing fix for zero padding
am:
436058ee3f
Change-Id: I4c5a04c769d3f0366fed96881edb46cc9979cd6a
Jakub Pawlowski [Fri, 4 Aug 2017 15:56:53 +0000 (08:56 -0700)]
Advertisement parsing fix for zero padding
When AD data is zero padded, and Scan Response is appended at end, data
becomes invalid. Instead, zero paddning must be removed first.
Test: AdvertiseDataParserTest.RemoveTrailingZeros
Bug:
38489707
Change-Id: I229ca3db6c92bc06bc1429e72412417010721063
Merged-In: I229ca3db6c92bc06bc1429e72412417010721063
(cherry picked from commit
35a9ea352d59e6d261eba1254814f7238e3ed022)
Pavlin Radoslavov [Mon, 7 Aug 2017 18:18:19 +0000 (18:18 +0000)]
Use a mutex to protect the scheduling of tBTA_PM_TIMER
am:
a8ba0bd7c8
Change-Id: I805c9e2156a3616e7be2bf17e34e2c353f5a0469
Pavlin Radoslavov [Sun, 6 Aug 2017 06:47:50 +0000 (23:47 -0700)]
Use a mutex to protect the scheduling of tBTA_PM_TIMER
Bug:
63689331
Test: Code compilation
Change-Id: If062f7b3e2c17cb5a1ac2c8ef0813a2fe5c5a5f5
(cherry picked from commit
a34d33ff2a3fe3562c1e003d870a0716f83568bf)
Pavlin Radoslavov [Fri, 4 Aug 2017 22:14:30 +0000 (22:14 +0000)]
Protect the btif config state with a lock during cleanup
am:
ecadb0d01d
Change-Id: I279e7a496ec3742b19073a0610953c4a68cd37d1
Pavlin Radoslavov [Fri, 4 Aug 2017 18:26:21 +0000 (11:26 -0700)]
Protect the btif config state with a lock during cleanup
Bug:
64186300
Test: Code compilation, enable/disable Bluetooth
Change-Id: Ic2397a128d59c9cc69cbd8252734b69eb7c02501
(cherry picked from commit
a4febd6d0460ee0f5834822ca406a4b8bab28cf1)
Pavlin Radoslavov [Fri, 4 Aug 2017 04:01:20 +0000 (04:01 +0000)]
Merge "Added another entry to the INTEROP_2MBPS_LINK_ONLY interoperability database" into oc-dr1-dev
am:
1dc69f4180
Change-Id: I17f6180ebfb596d74ec6c76b6ec3573c37a9ffdc
Pavlin Radoslavov [Fri, 4 Aug 2017 03:50:45 +0000 (03:50 +0000)]
Merge "Added another entry to the INTEROP_2MBPS_LINK_ONLY interoperability database" into oc-dr1-dev
Pavlin Radoslavov [Fri, 4 Aug 2017 00:34:07 +0000 (17:34 -0700)]
Added another entry to the INTEROP_2MBPS_LINK_ONLY interoperability database
Bug:
64357126
Test: Audio streaming to the affected carkit
Change-Id: I160eb3775c77fe400798f038d2aae7dd7825aacb
Pankaj Kanwar [Fri, 4 Aug 2017 00:00:43 +0000 (00:00 +0000)]
Merge "Revert "Allow collection of Bluetooth firmware dumps in bugreports (3/3)"" into oc-dr1-dev
am:
233a2b47b2
Change-Id: Iad6f3b180335b51fb24935aaa87243fc597f64ed
Pankaj Kanwar [Thu, 3 Aug 2017 23:52:09 +0000 (23:52 +0000)]
Merge "Revert "Allow collection of Bluetooth firmware dumps in bugreports (3/3)"" into oc-dr1-dev
Joseph Pirozzo [Thu, 3 Aug 2017 23:46:53 +0000 (23:46 +0000)]
Merge "AVRCP Controller request metadata on playback." into oc-mr1-dev
Pankaj Kanwar [Thu, 3 Aug 2017 20:41:44 +0000 (20:41 +0000)]
Revert "Allow collection of Bluetooth firmware dumps in bugreports (3/3)"
This reverts commit
0580dd639cb10fafb6953d8a724db030df5030db.
Change-Id: I37f9ba5a9ace655d1d12404926a158fb9a4001a7
Jakub Pawlowski [Tue, 1 Aug 2017 22:12:04 +0000 (15:12 -0700)]
Workaround for Traxxas
Bug:
64252588
Test: net_test_stack_ad_parser
Change-Id: I1471e9e5f0f36ec931f8d86c927abbc1137e2b94
Merged-In: I1471e9e5f0f36ec931f8d86c927abbc1137e2b94
Joseph Pirozzo [Tue, 1 Aug 2017 21:58:03 +0000 (14:58 -0700)]
AVRCP Controller request metadata on playback.
Track metadata is only provided when requested, and the current
implementation only requested it when there was a track change
notification. Add a request for metadata whenever there is an
update to indicate that the play status is playing.
Bug:
63998350
Test: Start playing media, make a phone call, end a phonecall observe
metadata is correct.
Change-Id: Iea5cdacfe95c1a98cdaf73836ee6359a923f481b
Merged-In: Iae6969ff230d91335b6af41955f07f1151d79de2
(cherry picked from commit
7e08d96dc3b58e4d796c901b92d35185da005548)
Pavlin Radoslavov [Thu, 3 Aug 2017 03:17:38 +0000 (03:17 +0000)]
Don't reuse AVDTP internal state for different purposes
am:
c64dc1d284
Change-Id: Ia42b343751f2fa48a0b8f601256828d3c15718b2
Pavlin Radoslavov [Thu, 3 Aug 2017 02:47:37 +0000 (02:47 +0000)]
Add A2DP_DumpCodecInfo() API
am:
81c2234305
Change-Id: I9775e3cf2ca822cb9b8386f8d4a63f65b20b5952
Pavlin Radoslavov [Wed, 2 Aug 2017 20:52:14 +0000 (13:52 -0700)]
Don't reuse AVDTP internal state for different purposes
A number of issues were exposed by carkits that proactively try
to discover the codecs supported by the Phone and explicitly select
the A2DP codec.
* Don't reuse p_scb->p_cap for storing the most recent fetched capability
and for storing the result configuration while reconfiguring the stream.
Instead, use p_scb->cfg for storing the result configuration.
* Don't try to reconfigure the audio stream before all peer's capabilities
have been retrieved.
* Don't reset p_scb->sep_info_idx after fetching all capabilities inside
bta_av_save_caps(), otherwise the stream reconfiguration logic is
confused. Apparently, p_scb->sep_info_idx is overused for both:
(a) Pointing where to store the next capability while fetching the
capabilities.
(b) Storing the selected the SEP after the codec selection is completed.
Resetting p_scb->sep_info_idx to 0 creates logical confusion when the
actual selected SEP index is 0.
* Add extra debug log messages
Test: Connecting to and streaming with various carkits
Bug:
64128712
Change-Id: I5f57e9069d5402bcbb17613470ac0d29c8e45069
Pavlin Radoslavov [Wed, 2 Aug 2017 20:43:44 +0000 (13:43 -0700)]
Add A2DP_DumpCodecInfo() API
The API can be used to display A2DP codec info when using |LOG_DEBUG|.
Test: Code compilation
Bug:
64128712
Change-Id: I04379b45f24adb7008365d38ccc8aa7f49ed4b73
Sunny Kapdi [Wed, 2 Aug 2017 19:51:38 +0000 (19:51 +0000)]
Merge "AE: Set secondary adv max skip to zero" into oc-dr1-dev
am:
427ea2398a
Change-Id: I15c91b251467c86bf804efc0b175f3a47ddbb515
TreeHugger Robot [Wed, 2 Aug 2017 19:27:48 +0000 (19:27 +0000)]
Merge "AE: Set secondary adv max skip to zero" into oc-dr1-dev
Sunny Kapdi [Tue, 13 Jun 2017 19:20:04 +0000 (12:20 -0700)]
AE: Set secondary adv max skip to zero
Setting secondary adv max skip to zero to guarantee
when the AUX Tx happens. This way the App can use the
primary advertising interval to dictate the AUX Tx
interval.
Bug:
62552121
Change-Id: Id66222e4f8a583c42acafb6532f81a817504e606
Joseph Pirozzo [Tue, 1 Aug 2017 14:36:59 +0000 (14:36 +0000)]
Merge "HFP Client connect Audio" into oc-mr1-dev
Satish Kodishala [Tue, 1 Aug 2017 08:04:51 +0000 (08:04 +0000)]
Merge "Use the correct AVDTP version-specific features" into oc-dr1-dev
am:
3568ed17b5
Change-Id: Ic3ab9e63708b984377a6d2af3e1b72303cf5de88
TreeHugger Robot [Tue, 1 Aug 2017 07:59:36 +0000 (07:59 +0000)]
Merge "Use the correct AVDTP version-specific features" into oc-dr1-dev
Subramanian Srinivasan [Tue, 1 Aug 2017 06:17:15 +0000 (06:17 +0000)]
Merge "Fix processing of Inquiry results data" into oc-dr1-dev
am:
60a5b95359
Change-Id: Ibf826cfcf8a63281fe4af999df09666f6963c09f
TreeHugger Robot [Tue, 1 Aug 2017 06:07:23 +0000 (06:07 +0000)]
Merge "Fix processing of Inquiry results data" into oc-dr1-dev
Satish Kodishala [Fri, 24 Feb 2017 09:39:01 +0000 (15:09 +0530)]
Use the correct AVDTP version-specific features
Failure:
A2DP is not reconnected after power cycling DUT BT.
Root cause:
AVDTP v1.3 feature request (AVDT_GetAllCapReq) sent by DUT
as remote supports the same, but this 1.3 feature is not
completely supported by DUT which leads to erroneous behavior.
Fix:
Use AVDT_GetAllCapReq request only when both host and remote
AVDTP version are 1.3 and above.
Test: 1.Pair to CarKit; 2.Connect to CarKit; 3.Do BT power cycle @ DUT
Bug:
35657623
Change-Id: I66c2d7d8fe8506b74282bcca93595e1cbf5c2565
(cherry picked from commit
9cd9ef4c3818d2c7949f52703b3c2ba0e0f43f2f)
Tyler Freeman [Tue, 1 Aug 2017 01:54:36 +0000 (01:54 +0000)]
DO NOT MERGE ANYWHERE Allow the Bluetooth MAC address to be updated asynchronously (3/3) am:
fead72d124 -s ours am:
672ca0faf5 -s ours am:
0e379aaef1 -s ours
am:
2008a94da6 -s ours
Change-Id: I2b87cd38e48df0f6c3e13057812f1407cfd3ce8a
Tyler Freeman [Tue, 1 Aug 2017 01:40:07 +0000 (01:40 +0000)]
DO NOT MERGE ANYWHERE Allow the Bluetooth MAC address to be updated asynchronously (3/3) am:
fead72d124 -s ours am:
672ca0faf5 -s ours
am:
0e379aaef1 -s ours
Change-Id: I7cf536bdf1ab3c56ca5e1357749ef1b939dd703a
Tyler Freeman [Tue, 1 Aug 2017 01:33:50 +0000 (01:33 +0000)]
DO NOT MERGE ANYWHERE Allow the Bluetooth MAC address to be updated asynchronously (3/3) am:
fead72d124 -s ours
am:
672ca0faf5 -s ours
Change-Id: Icf9b2a90b0adb3d9645bd6839ed9c244ba8c8c26
Tyler Freeman [Tue, 1 Aug 2017 01:24:13 +0000 (01:24 +0000)]
DO NOT MERGE ANYWHERE Allow the Bluetooth MAC address to be updated asynchronously (3/3)
am:
fead72d124 -s ours
Change-Id: I96daa5c94b8ac75e2e7faf00911274ba72dff51b
Tyler Freeman [Fri, 28 Jul 2017 01:21:18 +0000 (18:21 -0700)]
DO NOT MERGE ANYWHERE Allow the Bluetooth MAC address to be updated asynchronously (3/3)
There are intermittent issues where either the returned Bluetooth
MAC address to Java framework is uninitialized or this address update
arrives too late. This fix will do 2 things:
(1) Returns error when MAC address is unavailable in the native code.
(2) Updates the MAC address later by adding a new broadcast event.
Test: Check address for these cases: factory reset, system reboot, and
Bluetooth re-enable.
Bug:
36709382
(cherry picked from commit
7dc0525365025e17e289869288b1b7d5146306cc)
Merged-In: I7b1c526ee227897c003ac921078f317f96b92604
Change-Id: I9810484a136c69d487a4b415c9265913db6c5cce
Subramanian Srinivasan [Fri, 26 May 2017 00:05:11 +0000 (17:05 -0700)]
Fix processing of Inquiry results data
Process inquiry results data based on the data
length sent from the lower stack layers and not
by using HCI_EXT_INQ_RESPONSE_LEN.
Bug:
62589724
Change-Id: Iee4a2c8f0dfb459404b28ba21061f7ced9f8455c
(cherry picked from commit
9bd6250eba5e624c94c66f053f5603dca8e0e4f1)