OSDN Git Service
Jack He [Wed, 10 May 2017 02:41:47 +0000 (02:41 +0000)]
Fix broken linux build am:
2b59c4a084
am:
50a0237992
Change-Id: I9d11fce707c63a0afedab4a28099e16201824728
Jack He [Wed, 10 May 2017 02:37:03 +0000 (02:37 +0000)]
Fix broken linux build
am:
2b59c4a084
Change-Id: I2acaae3044cba1e50647e21c1104218211294b79
Jack He [Thu, 4 May 2017 20:27:25 +0000 (13:27 -0700)]
Fix broken linux build
* Generic linux does not have property_get_int32. Instead,
osi_property_get_int32() is created to handle OS_GENERIC cases
* Some linux header have sigevent.sigev_notify_attributes typed as
(pthread_attr_t *) whereas others typed it as (void *), as any pointer
can be implicitly casted to (void *), the current casting to (void *)
is unncessary and will break build on systems using (pthread_attr_t *)
Test: make, unit test, no user visible effect
Change-Id: I24b33da453dc9d40656168a3bcd900d9c99219ce
Ajay Panicker [Mon, 8 May 2017 19:37:57 +0000 (19:37 +0000)]
Merge "Swap BTA and HCI queues with message loops" am:
f5db809606
am:
9d2452d7c1
Change-Id: I9bd040e18682cd3b10e88e90e4ecd4c74fb3a5b7
Ajay Panicker [Mon, 8 May 2017 19:34:28 +0000 (19:34 +0000)]
Merge "Swap BTA and HCI queues with message loops"
am:
f5db809606
Change-Id: I499fd6260777c054fa1763d1febf9be01234f1bc
Treehugger Robot [Mon, 8 May 2017 19:27:33 +0000 (19:27 +0000)]
Merge "Swap BTA and HCI queues with message loops"
Andre Eisenbach [Mon, 8 May 2017 19:22:57 +0000 (19:22 +0000)]
Merge "Reject LE COC if cid is duplicated" am:
95e3c5ac39
am:
890b25c8b1
Change-Id: I2eaa7c7f7f2ae36251635c3c72016e495c28441c
Andre Eisenbach [Mon, 8 May 2017 19:19:57 +0000 (19:19 +0000)]
Merge "Reject LE COC if cid is duplicated"
am:
95e3c5ac39
Change-Id: I16e1c8bc032df0215f72187639fe9e8a31444192
Andre Eisenbach [Mon, 8 May 2017 19:13:56 +0000 (19:13 +0000)]
Merge "Reject LE COC if cid is duplicated"
ravishankar srivatsa [Mon, 8 May 2017 18:04:50 +0000 (18:04 +0000)]
Add additional failure modes for SMP PTS test cases am:
fd102ca161
am:
cd6b7988d6
Change-Id: Iecaf5f6655631388c10930b93a5b9a2825bc8744
ravishankar srivatsa [Mon, 8 May 2017 18:01:51 +0000 (18:01 +0000)]
Add additional failure modes for SMP PTS test cases
am:
fd102ca161
Change-Id: Ie808ef38dcd0367b54eee0f66362e4c2dac04407
Ajay Panicker [Wed, 1 Mar 2017 18:00:30 +0000 (10:00 -0800)]
Swap BTA and HCI queues with message loops
Swapping out the queues with base::MessageLoop allows for an easier refactor
of alarms as we can just replace them with an instance of base::Timer. Also
refactored out the data_dispatcher as most of the code wasn't being used.
Bug:
37245162
Test: Bluetooth sanity test and listening to music
added net_test_btu_message_loop
Change-Id: I73c359f07a225733dc89f51422a6a24ce807c593
Jaganath Kanakkassery [Tue, 2 May 2017 10:54:16 +0000 (16:24 +0530)]
Reject LE COC if cid is duplicated
This is for PTS test TP/LE/CFC/BV-20-C.
The scenario is there is already one COC between DUT and PTS.
Then PTS tries to establish one more COC with same cid which
should be rejected.
Change-Id: I094a4058ac0e7bb9d7344e66d9feafee17bc3d53
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
ravishankar srivatsa [Thu, 4 May 2017 04:43:58 +0000 (10:13 +0530)]
Add additional failure modes for SMP PTS test cases
SM/MAS/SCJW/BI-01-C [Just Works, IUT Initiator, Secure Connections -Pairing Failed
For Lower tester to handle step 15.
Lower Tester responds with a Pairing Failed command in phase 2 with reason code
0x0C (Numeric Comparison Failed).
Bug:
37707831
Change-Id: Ia7103330d1d1ecb06e39502c2a0976585b203ba5
Signed-off-by: Ravishankar Srivatsa <Ravishankar.Srivatsa@intel.com>
Test: manual
Martin Brabham [Sat, 6 May 2017 03:02:35 +0000 (03:02 +0000)]
bta_dm: Stop copying garbage am:
36d19de1aa
am:
da798e5e85
Change-Id: I1ca5479b2a8355091a8fbf9771ac9133ab1f53ba
Martin Brabham [Sat, 6 May 2017 03:00:31 +0000 (03:00 +0000)]
bta_dm: Stop copying garbage
am:
36d19de1aa
Change-Id: Ie723a15c8f9f9280dd93beaccbada8a1458b8717
Martin Brabham [Mon, 1 May 2017 23:30:40 +0000 (16:30 -0700)]
bta_dm: Stop copying garbage
After we reach 7 ACL connections we have 7 peer device records.
Once we reach this then we lose a connection and shrink the list we
copy garbage into the last peer device record. This can cause the flag
remove_dev_pending to be set to something > 0 thus true which causes the
stack to remove the device and its bonding information on the next
acl change event.
ACL Connections can happen from any connection (pairing, SDP, etc...)
Bug:
36598959
Test: Manual
Change-Id: Ifbaa4098edba442274ffde183960ef53169988e7
Ajay Panicker [Sat, 6 May 2017 00:36:50 +0000 (00:36 +0000)]
Move hci_thread to a message loop and prevent thread from spinning am:
48294531bf
am:
97b987c390
Change-Id: I9d671f7ad9b426959aeffa924b2a8daa854dc4d1
Ajay Panicker [Sat, 6 May 2017 00:27:09 +0000 (00:27 +0000)]
Move hci_thread to a message loop and prevent thread from spinning
am:
48294531bf
Change-Id: I4b1e3da909a4cd6125c17f4dc56a0d73aad31f70
Ajay Panicker [Fri, 28 Apr 2017 22:26:38 +0000 (15:26 -0700)]
Move hci_thread to a message loop and prevent thread from spinning
Before this patch, if there was a message on the command queue and
there were no command credits, the thread reactor would spin trying
to process the message on the command queue and would continue until
a credit was received. This led to a bug where upon switching users,
hci_thread would spin and try to use 100% of the CPU. This is fixed
by moving over to a message loop and queue system. The message loop
processes all the messages. If there aren't enough command credits,
command messages are deferred to the command queue and popped off
whenever more credits are aquired. The deferred queue has priority
to credits over recently posted messages.
Bug:
37733903
Test: Swap users with the real time scheduling patch applied, and
general Bluetooth usage.
TestTracker: 86249
Change-Id: Ib775e47f6d4810d3d7d8af5b3ba84adc4ada3da5
(cherry picked from commit
ffee0ee8a102101ded1d3fa398f20c4215e0c441)
Jakub Pawlowski [Fri, 5 May 2017 22:09:41 +0000 (22:09 +0000)]
LE advertise data parsing refactor am:
103b2c44d3
am:
17899fab2f
Change-Id: I959de2110f7cb3778185445bce2ec1e4541046c0
Jakub Pawlowski [Fri, 5 May 2017 22:05:19 +0000 (22:05 +0000)]
LE advertise data parsing refactor
am:
103b2c44d3
Change-Id: I467cf2628393c11d316ad12664aa04f19106f036
Jakub Pawlowski [Fri, 28 Apr 2017 21:59:46 +0000 (14:59 -0700)]
LE advertise data parsing refactor
* merge BTM_CheckAdvData and BTM_CheckEirData into GetFieldByType
* check wether AD data is properly formatted when the packet is
received. Some controllers were returning malformed data that
resulted in stack crashes for BT5 packets.
* add tests to verify the helpers work as expected
Test: added net_test_stack_ad_parser
Bug:
37671082
Change-Id: I49e43d7cf7d0a8ace1ee45d9b14b2b8440096b05
Jakub Pawlowski [Fri, 5 May 2017 08:59:52 +0000 (08:59 +0000)]
Check device name length am:
3a4e7622ff
am:
082497f5f7
Change-Id: Ia320219295ff6c239e7a5e7d7d5a88cc809828ef
Jakub Pawlowski [Fri, 5 May 2017 08:51:50 +0000 (08:51 +0000)]
Check device name length
am:
3a4e7622ff
Change-Id: Ie5935fa0bb9b15c2a3caae3db43fdaebf4a83002
Jakub Pawlowski [Fri, 28 Apr 2017 12:15:16 +0000 (05:15 -0700)]
Check device name length
BT spec limits the length of device name to 248 bytes. With the new
LE advertising packets, that can go up to 1650 bytes long, we must check
the length of device name received.
Bug:
37671082
Test: manual
Change-Id: Iad309d638003c2391014c9764605d84ed5717cb1
Sridhar Vashist [Fri, 5 May 2017 01:21:51 +0000 (01:21 +0000)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links. am:
7d3de37da0 -s ours
am:
6c0de854a3 -s ours
Change-Id: Iaba991df9e9a60f45ef12b4b03a0b6e555b40a33
Sridhar Vashist [Fri, 5 May 2017 01:17:20 +0000 (01:17 +0000)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links.
am:
7d3de37da0 -s ours
Change-Id: I90f535c99d45ebf0def0b2b08031a21f998c1c2e
Sridhar Vashist [Fri, 28 Oct 2016 18:37:49 +0000 (13:37 -0500)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links.
3DH packets have a lower tolerance to background noise. A2DP requiring higher
bandwidth & realtime playback is especially suscepitble in this scenario.
Bug:
37515006
Test: oem manual
Change-Id: Id4d7452a86fe864eceb88a9fb16a40dc921a1e13
Pavlin Radoslavov [Thu, 4 May 2017 18:32:54 +0000 (18:32 +0000)]
Merge "Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability" am:
d861719531
am:
d4ff605732
Change-Id: Iac92fa917a98cdf8e3c358d7386b4b27a688f98b
Pavlin Radoslavov [Thu, 4 May 2017 18:27:24 +0000 (18:27 +0000)]
Merge "Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability"
am:
d861719531
Change-Id: Iee78e052c01a772f30c6dcf19a9bf97036751f5c
Treehugger Robot [Thu, 4 May 2017 18:23:50 +0000 (18:23 +0000)]
Merge "Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability"
Jakub Pawlowski [Thu, 4 May 2017 16:52:44 +0000 (16:52 +0000)]
Add supervision timeout workaround for Nexus Remote am:
9e6747537a
am:
ce0e5306db
Change-Id: Ia97abb523bd9e4b60a844440f75770f55f555517
Jakub Pawlowski [Thu, 4 May 2017 16:49:44 +0000 (16:49 +0000)]
Add supervision timeout workaround for Nexus Remote
am:
9e6747537a
Change-Id: I89970cc9eaf72cbbbae294dc1a6816b612ed7579
Jakub Pawlowski [Tue, 28 Mar 2017 19:58:34 +0000 (12:58 -0700)]
Add supervision timeout workaround for Nexus Remote
The Nexus Remote would report 100ms supervision timeout in its preferred
connection parameters. In some noisy environments, this might cause
connection to be dropped. As a workaround, set the timeout to 3s for the
remote.
Test: manual
Bug:
36645397
Bug:
37717216
Change-Id: I665a854e9d55067ec1aca273c31d06c6114c48be
Pavlin Radoslavov [Thu, 4 May 2017 05:48:28 +0000 (22:48 -0700)]
Remove 96.0 and 88.2 kHz sample rate from A2DP AAC capability
The A2DP AAC Source capabilty should not include 96.0 and 88.2 kHz
sample rate - those were included unintentionally without being tested.
Bug:
37968743
Test: A2DP AAC streaming
Change-Id: Ia3228d4d14d3288acfda42fbaf8ab248ae530b48
Andy Hung [Wed, 3 May 2017 01:47:10 +0000 (01:47 +0000)]
audio_a2dp_hw: fix fd leak on open am:
2ae1ddbb73
am:
f77c756a93
Change-Id: I34e607c7c9a161c470992f281d4106f6c1eee0e8
Andy Hung [Wed, 3 May 2017 01:44:11 +0000 (01:44 +0000)]
audio_a2dp_hw: fix fd leak on open
am:
2ae1ddbb73
Change-Id: Ieed84c659c4b10d126ab31cf0d2fe1ad15083e27
Andy Hung [Mon, 1 May 2017 22:04:57 +0000 (15:04 -0700)]
audio_a2dp_hw: fix fd leak on open
Open hal fds can be checked by
adb shell lsof | grep audio@2. | grep socket | wc
Test: connect and disconnect BT, check open fd.
Bug:
37726871
Change-Id: Id446c43515eceb0828cfb33807a4c0b4c6145a6d
(cherry picked from commit
cef156574c9928164b7a5e263a5494cf61ca39d8)
Jacky Cheung [Sat, 29 Apr 2017 03:54:59 +0000 (03:54 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev am:
b055f8b68a -s ours
am:
f67b6bfa1b -s ours
Change-Id: I292355f59b73a0c7d4347f69fa5f8911a6a98d6c
Jacky Cheung [Sat, 29 Apr 2017 03:52:59 +0000 (03:52 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev
am:
b055f8b68a -s ours
Change-Id: I7b31a9bb0a09d3e7bbb2b666331f4ac47a93efff
Jacky Cheung [Sat, 29 Apr 2017 03:48:18 +0000 (03:48 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing" into cw-f-dev
Jakub Pawlowski [Thu, 27 Apr 2017 11:52:34 +0000 (04:52 -0700)]
DO NOT MERGE ANYWHERE Fix LE disconnecting right after pairing
When a device connect to android over LE, the default policy is to keep
this connection. If any app "claims" this connnection, and then stop
using it, we'll disconnect from the device after a short timeout.
If pairing is triggered to such device, that is connected but not used
by any app, it will cause disconnect after the pairing is finished. This
is because using SMP over fixed LE L2CAP channel is conseidered as
connecting, using, and disconnecting a channel by the stack. This is
obvious logic error - using fixed channels should not require
"connecting" to them.
As a temporary workaround, do not trigger a timeout when a fixed SMP
channel is closed over LE.
For LE only devices, this means they will stay connected after the
pairing until some app starts using them or they disconnect. For dual
mode devices, Classic connection will be established and SDP will be
performed. The classic connection will be disconnected if no app will
use it, and the LE connection to the device will stay up.
Bug:
37352720
Test: manual
Change-Id: Ic9d688aacf84e0267277b12b28dfa7cc57fdcea6
(cherry picked from commit
7c8bab231328956d3b7569280cb162be4e345422)
Ajay Panicker [Fri, 28 Apr 2017 00:23:09 +0000 (00:23 +0000)]
Prevent buffer overflow caused by decrementing past zero am:
882db61b73
am:
6f883c5320
Change-Id: Ic006fece7c772d161da349904a299f9d53e06e95
Ajay Panicker [Fri, 28 Apr 2017 00:20:40 +0000 (00:20 +0000)]
Prevent buffer overflow caused by decrementing past zero
am:
882db61b73
Change-Id: I1de124b2baf7dd3c691df95680c20600680841c0
Ajay Panicker [Tue, 13 Dec 2016 18:51:12 +0000 (10:51 -0800)]
Prevent buffer overflow caused by decrementing past zero
Bug:
33555809
Test: Sanity test with Bluetooth
Change-Id: I4c82d3c162ffdc9436f9cd8985061655a055774b
Jakub Pawlowski [Thu, 27 Apr 2017 19:35:57 +0000 (19:35 +0000)]
Fix LE disconnecting right after pairing am:
7c8bab2313
am:
30c04f0ed5
Change-Id: Ic0990a742fd44c84d181ff31d4f85b2b5cf52ec9
Jakub Pawlowski [Thu, 27 Apr 2017 19:30:24 +0000 (19:30 +0000)]
Fix LE disconnecting right after pairing
am:
7c8bab2313
Change-Id: I22b794624d6f3b51d1e0089802cbf53c64305b51
Jakub Pawlowski [Thu, 27 Apr 2017 11:52:34 +0000 (04:52 -0700)]
Fix LE disconnecting right after pairing
When a device connect to android over LE, the default policy is to keep
this connection. If any app "claims" this connnection, and then stop
using it, we'll disconnect from the device after a short timeout.
If pairing is triggered to such device, that is connected but not used
by any app, it will cause disconnect after the pairing is finished. This
is because using SMP over fixed LE L2CAP channel is conseidered as
connecting, using, and disconnecting a channel by the stack. This is
obvious logic error - using fixed channels should not require
"connecting" to them.
As a temporary workaround, do not trigger a timeout when a fixed SMP
channel is closed over LE.
For LE only devices, this means they will stay connected after the
pairing until some app starts using them or they disconnect. For dual
mode devices, Classic connection will be established and SDP will be
performed. The classic connection will be disconnected if no app will
use it, and the LE connection to the device will stay up.
Bug:
37352720
Test: manual
Change-Id: Ic9d688aacf84e0267277b12b28dfa7cc57fdcea6
Ajay Panicker [Thu, 27 Apr 2017 17:49:49 +0000 (17:49 +0000)]
Limit btsnoop file size (5/8) am:
99c3422442
am:
7f51bd9833
Change-Id: I44d59395bd33f9a7ac54cf228c2c0b2a5a7f5f73
Ajay Panicker [Thu, 27 Apr 2017 17:39:55 +0000 (17:39 +0000)]
Limit btsnoop file size (5/8)
am:
99c3422442
Change-Id: I015663966b19215d7ea4c3add0ed93948430df64
Ajay Panicker [Tue, 18 Apr 2017 03:53:24 +0000 (20:53 -0700)]
Limit btsnoop file size (5/8)
Limit btsnoop file size by rotating between snoop files. The rotation occurrs
when a fixed number of packets have been logged and will start overwriting
the older file.
Bug:
35998031
Test: Enable snoop logs from developer options and let logs get large
Merged-In: Ia8741223cb31b2c20d9ef5607e9204cc3946b165
Change-Id: Ia8741223cb31b2c20d9ef5607e9204cc3946b165
Jacky Cheung [Wed, 26 Apr 2017 22:31:58 +0000 (22:31 +0000)]
Fix issue with BLE advertising not started when local privacy is not enabled am:
afdd081b4b
am:
4545519e16
Change-Id: I879c74e752290665526af3b7933e4ddedabe2552
Jacky Cheung [Wed, 26 Apr 2017 22:27:57 +0000 (22:27 +0000)]
Fix issue with BLE advertising not started when local privacy is not enabled
am:
afdd081b4b
Change-Id: I22817c79ffc0d7749261b18bcbd608fad70c20d3
Jacky Cheung [Wed, 26 Apr 2017 17:27:41 +0000 (10:27 -0700)]
Fix issue with BLE advertising not started when local privacy is not enabled
Bug:
37282500
Test: manual
Change-Id: I44657d0b3315bc241373c8cbaf6a2b6a6e49f31d
Philip Cuadra [Wed, 26 Apr 2017 17:06:09 +0000 (17:06 +0000)]
Make Bluetooth audio threads use RT scheduling am:
96c42e70f5
am:
dc45bd8315
Change-Id: Ib0475baf75c0a963c074e0f9bbb2d9da3e09e86b
Philip Cuadra [Wed, 26 Apr 2017 17:02:11 +0000 (17:02 +0000)]
Make Bluetooth audio threads use RT scheduling
am:
96c42e70f5
Change-Id: Idcea625a9ca29fe5f5b4c0cc81e74e28d3670b04
Philip Cuadra [Thu, 23 Mar 2017 17:10:34 +0000 (10:10 -0700)]
Make Bluetooth audio threads use RT scheduling
Bluetooth threads that are used in audio have deadline
requirements for glitchless playback. Those threads need to be
scheduled as RT tasks to ensure that they can meet the deadline even if
there is high system load.
Bug
37518404
Test: play Bluetooth audio, check for RT with systrace
Change-Id: I4505fbce55e5a4fe18d00dbda23646a60e482efd
Jakub Pawlowski [Tue, 25 Apr 2017 10:42:59 +0000 (10:42 +0000)]
Merge "Handle remote not supporting LL_SLAVE_FEATURE_REQ" am:
e3caefe394
am:
e8eb07a442
Change-Id: Icd7c41ef5e8e4992973ad1d211d9c9d27e449e35
Jakub Pawlowski [Tue, 25 Apr 2017 10:40:29 +0000 (10:40 +0000)]
Merge "Handle remote not supporting LL_SLAVE_FEATURE_REQ"
am:
e3caefe394
Change-Id: I15ab18d2f7aec748287c0420f143c4a57e8a0e4f
Treehugger Robot [Tue, 25 Apr 2017 10:35:03 +0000 (10:35 +0000)]
Merge "Handle remote not supporting LL_SLAVE_FEATURE_REQ"
Pavlin Radoslavov [Tue, 25 Apr 2017 05:08:37 +0000 (05:08 +0000)]
Add missing library dependency when compiling the unit tests am:
044921b223
am:
464a06af0b
Change-Id: Ib2486084fb69d73c897635cfbe7c3c0252a2a419
Pavlin Radoslavov [Tue, 25 Apr 2017 05:06:37 +0000 (05:06 +0000)]
Add missing library dependency when compiling the unit tests
am:
044921b223
Change-Id: I491edb09f445b5aca0948c134cb78a0334804043
Pavlin Radoslavov [Tue, 25 Apr 2017 00:37:20 +0000 (17:37 -0700)]
Add missing library dependency when compiling the unit tests
This fixes a compilation issue when compiling with ASAN enabled.
Bug:
37624756
Test: make -j 40 SANITIZE_TARGET='address coverage' tests
Change-Id: I9caa3d404e60ee105435539744ed2b8ccf353700
Hemant Gupta [Tue, 25 Apr 2017 00:10:46 +0000 (00:10 +0000)]
AVRCP 1.6: Limit GetFolderItemResponse am:
a7c7437bbf
am:
0940c18aef
Change-Id: Ib239a2d16b5f89998cd92b0891217eda88b1ce3b
Hemant Gupta [Tue, 25 Apr 2017 00:08:46 +0000 (00:08 +0000)]
AVRCP 1.6: Limit GetFolderItemResponse
am:
a7c7437bbf
Change-Id: I6e0eedf6a7486aadcb6fabf214f1bafa2efd2233
Jakub Pawlowski [Mon, 24 Apr 2017 13:34:11 +0000 (06:34 -0700)]
Handle remote not supporting LL_SLAVE_FEATURE_REQ
Test: for PTS
Change-Id: I3030a068c1c4980fa7cbb23b478afbe441584869
Zach Johnson [Fri, 21 Apr 2017 21:07:04 +0000 (21:07 +0000)]
Merge "DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy" into cw-f-dev am:
b53535d61b -s ours
am:
1238329f28 -s ours
Change-Id: Iac0e37a325ecfda313ed0f333873b33b80713f0a
Zach Johnson [Fri, 21 Apr 2017 21:06:23 +0000 (21:06 +0000)]
DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy am:
c61ef79a79 -s ours
am:
31dfa53ba0 -s ours
Change-Id: Ie93beab51ec5e03d58c3df28c9d117450e8a8a5f
Zach Johnson [Fri, 21 Apr 2017 21:04:06 +0000 (21:04 +0000)]
Merge "DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy" into cw-f-dev
am:
b53535d61b -s ours
Change-Id: I2399d1832fe643ef0057c2c4d0b0fa4bf860e760
Zach Johnson [Fri, 21 Apr 2017 21:03:23 +0000 (21:03 +0000)]
DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy
am:
c61ef79a79 -s ours
Change-Id: I9704dd064ab5f37ca0ecb310be1cf73826737665
Zach Johnson [Fri, 21 Apr 2017 20:58:11 +0000 (20:58 +0000)]
Merge "DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy" into cw-f-dev
Zach Johnson [Wed, 19 Apr 2017 04:03:07 +0000 (21:03 -0700)]
DO NOT MERGE ANYWHERE Allow blocking AG SCO connects by policy
Needed for devices that support both HFP AG and HFP HF.
btsnoop logs show the sequence of events leading to failure:
(corroborated by bt logcat)
1. ACL connection with remote phone established on handle 0x01
2. ACL connection with remote headset established on handle 0x02
3. Incoming call in HF role from phone
4. Phone call locally published to telecom
5. Answer incoming call
6. SCO connection established with phone in HF role
7. AG role with headset picks up on call state change to answered
via BTA_AG_IN_CALL_CONN_RES
8. Inside handler for BTA_AG_IN_CALL_CONN_RES, bta_ag_sco_open called
to establish the SCO connection in the AG role with the headset,
stomping on the previous (wanted) SCO connection with the phone.
Fix is to publish the SCO audio route policy to fluoride, so we can
stop 8 from happening.
Bug:
32958838
Test: manual:
received incoming call in HF role, audio worked both ways;
recieved incoming MT call, headset audio in AG role worked both ways
Change-Id: I12961598e8200bd1d5adb46ee8ec3a802114b80a
Hemant Gupta [Wed, 12 Apr 2017 18:26:15 +0000 (23:56 +0530)]
AVRCP 1.6: Limit GetFolderItemResponse
Usecase:
1) Connect from AVRCP Controller supporting browsing
having low L2CAP MTU eg 672.
2) Request for get folder items with large request items,
response for which will exceed MTU size.
Expected Result:
As per AVRCP 1.6 Spec, section 29.20 pg 178, response should be
limited to number of completed get folder items that can fit in
single AVCTP Browsing channel MTU even if the completed items
are less than actually requested by AVRCP Controller.
Observation:
DUT responding with Internal Error.
Root Cause:
When there is no space to fill complete Get Folder Item response
within MTU size, DUT was returning error.
Fix:
Send max completed items which can fit in single MTU packet.
Test: Checked if the remote device can receive the truncated
response and get folder items succeeds when remote device
reissues get folder item request with updated start list count.
Frequency: 5/5
Bug:
37304477
Change-Id: I1963f97075382fc8333038e3efffaf61a9d84a28
Stanley Tng [Fri, 21 Apr 2017 01:30:27 +0000 (01:30 +0000)]
Allow the Bluetooth MAC address to be updated asynchronously (3/3) am:
7dc0525365
am:
196ffbec29
Change-Id: I1261534f65412e45b33242f35608f7852daa4cbb
Stanley Tng [Fri, 21 Apr 2017 01:25:06 +0000 (01:25 +0000)]
Allow the Bluetooth MAC address to be updated asynchronously (3/3)
am:
7dc0525365
Change-Id: Ia26ccf1307446e2ea3dc9cbe3d90fc07fa7b168c
Stanley Tng [Tue, 18 Apr 2017 05:38:38 +0000 (22:38 -0700)]
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
Change-Id: I7b1c526ee227897c003ac921078f317f96b92604
Jakub Pawlowski [Wed, 19 Apr 2017 21:45:03 +0000 (21:45 +0000)]
Expose LE advertiser address for easier PTS tests (4/6) am:
779b4fd786
am:
e4bb6e8f83
Change-Id: I5d254f14d669ba474b0a613ff5d2076199c4bbf6
Jacky Cheung [Wed, 19 Apr 2017 21:40:33 +0000 (21:40 +0000)]
Do not GATT_ERROR on MTU change am:
a365626943
am:
f21c3dede7 -s ours
Change-Id: Ib5a4fa265f4a3b8d5556fe11fcfceaa76e3198e5
Jakub Pawlowski [Wed, 19 Apr 2017 21:38:22 +0000 (21:38 +0000)]
Expose LE advertiser address for easier PTS tests (4/6)
am:
779b4fd786
Change-Id: Ic8fc5e79e6f74aaf778b0c5e39e2308dceb583be
Pavlin Radoslavov [Wed, 19 Apr 2017 21:37:03 +0000 (21:37 +0000)]
Merge changes from topics 'bt-a2dp-ldac-abr-adjustments', 'bt-a2dp-ldac-dropped-count' am:
71cb1b834e
am:
0fcf12030e
Change-Id: I827aa5b6a26e5ea73fe743964c1d93e273502677
Pavlin Radoslavov [Wed, 19 Apr 2017 21:35:10 +0000 (21:35 +0000)]
Merge changes from topics 'bt-a2dp-ldac-abr-adjustments', 'bt-a2dp-ldac-dropped-count'
am:
71cb1b834e
Change-Id: If9fd4741055889e2c81720cdceb65889570a66c3
Jacky Cheung [Wed, 19 Apr 2017 21:35:03 +0000 (21:35 +0000)]
Do not GATT_ERROR on MTU change
am:
a365626943
Change-Id: I956c4ca2e31d5c98e986738be0890c17e21b1186
Jakub Pawlowski [Wed, 19 Apr 2017 14:05:00 +0000 (07:05 -0700)]
Expose LE advertiser address for easier PTS tests (4/6)
This patchset adds a hidden method getOwnAddress, that lets app with
BLUETOOTH_PRIVILEGED permission to lear their own addreess. This is done
exclusively for PTS tests.
Bug:
35147497
Test: manual
Change-Id: I5ad554d872f2b772f2bf91642a9648c4018d935c
Pavlin Radoslavov [Wed, 19 Apr 2017 21:27:56 +0000 (21:27 +0000)]
Merge changes from topics 'bt-a2dp-ldac-abr-adjustments', 'bt-a2dp-ldac-dropped-count'
* changes:
Print the LDAC adaptive bit rate adjustments
Fix/update the computation of the total dropped packets for LDAC and AAC
Myles Watson [Wed, 19 Apr 2017 20:40:55 +0000 (20:40 +0000)]
Merge "Remove libbt-vendor from system/bt/main/Android.bp" am:
285b7035f5
am:
aa097ccd58
Change-Id: I8ae80018fa7a9ad2d8c2032c76a8dcf7f70ef265
Myles Watson [Wed, 19 Apr 2017 20:40:44 +0000 (20:40 +0000)]
test_vendor: Remove unused libbt-vendor files am:
10b43d2fa0
am:
da84611a5d
Change-Id: Ibdb7960040974c7830da81cec3f3809d138878e8
Myles Watson [Wed, 19 Apr 2017 20:36:37 +0000 (20:36 +0000)]
Merge "Remove libbt-vendor from system/bt/main/Android.bp"
am:
285b7035f5
Change-Id: I5dc76c1ca7c6fa7a5124707242aa80d9b8394fe4
Myles Watson [Wed, 19 Apr 2017 20:36:24 +0000 (20:36 +0000)]
test_vendor: Remove unused libbt-vendor files
am:
10b43d2fa0
Change-Id: I657ea0ebe5ed278c543d6bad6fa924332df32092
Treehugger Robot [Wed, 19 Apr 2017 20:31:45 +0000 (20:31 +0000)]
Merge "Remove libbt-vendor from system/bt/main/Android.bp"
Myles Watson [Mon, 17 Apr 2017 20:43:05 +0000 (13:43 -0700)]
test_vendor: Remove unused libbt-vendor files
Bug:
36810308
Test: builds
Change-Id: I50b4a3efaac622959dbf25c0f854d455057e6f3e
Myles Watson [Tue, 7 Mar 2017 12:57:03 +0000 (04:57 -0800)]
Remove libbt-vendor from system/bt/main/Android.bp
Platforms that need libbt-vendor, which is deprecated, should include the
build dependency in device.mk.
Bug:
36810308
Test: Angler Bluetooth starts/stops
Change-Id: I0e37bf48536ca134493aaa3a496bafb3b80cd882
Bailey Forrest [Wed, 19 Apr 2017 20:13:29 +0000 (20:13 +0000)]
Merge "bta_gattc_cache: Initialize gatt_db_elemement_t permissions to 0" am:
27a9864f9f
am:
150583af9a
Change-Id: I02ce7bac14342ca017f85cc2a043887b883779eb
Bailey Forrest [Wed, 19 Apr 2017 20:11:28 +0000 (20:11 +0000)]
Merge "bta_gattc_cache: Initialize gatt_db_elemement_t permissions to 0"
am:
27a9864f9f
Change-Id: I57a83cb501da230abaabacb35c3c6562f6c3a1f3
Treehugger Robot [Wed, 19 Apr 2017 20:07:46 +0000 (20:07 +0000)]
Merge "bta_gattc_cache: Initialize gatt_db_elemement_t permissions to 0"
Pavlin Radoslavov [Wed, 19 Apr 2017 19:22:55 +0000 (19:22 +0000)]
Fix line formatting per clang-format am:
ce48fc7525
am:
35d372cf0d
Change-Id: I92512f68b228c4a8346212d56ca3a991ca2c439a
Pavlin Radoslavov [Wed, 19 Apr 2017 19:20:23 +0000 (19:20 +0000)]
Fix line formatting per clang-format
am:
ce48fc7525
Change-Id: I4a8916a40ca92b6baaee1199f7d568fb597d6783
Pavlin Radoslavov [Wed, 19 Apr 2017 18:44:19 +0000 (11:44 -0700)]
Fix line formatting per clang-format
The fix is needed to resolve a merge conflict.
Test: Code compilation
Change-Id: I41cd79db1750b526fafa33e097c56a7cb46ba6af
Pavlin Radoslavov [Wed, 19 Apr 2017 17:50:16 +0000 (10:50 -0700)]
Print the LDAC adaptive bit rate adjustments
A2DP LDAC State:
...
LDAC quality mode : ABR
LDAC transmission bitrate (Kbps) : 990
LDAC saved transmit queue length : 0
LDAC adaptive bit rate encode quality mode index : 0
LDAC adaptive bit rate adjustments : 4
Test: A2DP streaming to headsets that support LDAC
Bug:
37287785
Change-Id: Ife8017ca129fa9b06ea85f6029c553a52a306cc2
Pavlin Radoslavov [Wed, 19 Apr 2017 03:05:39 +0000 (20:05 -0700)]
Fix/update the computation of the total dropped packets for LDAC and AAC
Also:
* Print the "LDAC transmission bitrate (Kbps)"
* Print the "LDAC adaptive bit rate encode quality mode index"
when the LDAC quality mode is ABR
A2DP LDAC State:
...
LDAC quality mode : ABR
LDAC transmission bitrate (Kbps) : 990
LDAC saved transmit queue length : 0
LDAC adaptive bit rate encode quality mode index : 0
Test: A2DP streaming to headsets that support LDAC
Bug:
37287785
Change-Id: I83b22090b087eb8a1e49d1853468b7dbbf9d9ad3