OSDN Git Service

android-x86/system-bt.git
6 years agoFix connection handle data type
Jakub Pawlowski [Fri, 18 Aug 2017 13:03:55 +0000 (13:03 +0000)]
Fix connection handle data type
am: 73af403370

Change-Id: Ic08764d124def613fcbb52fca68a487ded52390f

6 years agoFix connection handle data type
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

6 years agoCleanup RawAddress usage
Jakub Pawlowski [Thu, 17 Aug 2017 23:53:48 +0000 (23:53 +0000)]
Cleanup RawAddress usage
am: 2e05f0dd4f

Change-Id: I76258df03bef16cf4a71f3dab2412b89750e0ab7

6 years agoCleanup RawAddress usage
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

6 years agoFix misc-macro-parentheses warnings in system/bt.
Chih-Hung Hsieh [Thu, 17 Aug 2017 00:09:12 +0000 (00:09 +0000)]
Fix misc-macro-parentheses warnings in system/bt.
am: fc25b19606

Change-Id: I7ef5175514d7f1483743c20c916854f1e4cce687

6 years agoFix misc-macro-parentheses warnings in system/bt.
Chih-Hung Hsieh [Tue, 1 Aug 2017 22:04:23 +0000 (15:04 -0700)]
Fix misc-macro-parentheses warnings in system/bt.

* Use NOLINT to suppress missing parentheses warnings around bitmask.

Bug: 28705665
Test: make with WITH_TIDY=1 WITH_TIDY_CHECKS=-*,misc-macro-* \
      WITH_TIDY_FLAGS=-header-filter=system/bt/.*

Change-Id: I4f095898d49eafdea9eb72f9ffc9eac87f68a4c8

6 years agoFix errors in handling RawAddresses
Jack He [Wed, 16 Aug 2017 00:23:04 +0000 (00:23 +0000)]
Fix errors in handling RawAddresses
am: 882aec320e

Change-Id: If23c7e9bf4231ec3398d0de21c0656a240935209

6 years agoFix errors in handling RawAddresses
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

6 years agoMerge "test_vendor: Add function to extract bytes from iterators"
johnshamoon [Fri, 11 Aug 2017 05:54:20 +0000 (05:54 +0000)]
Merge "test_vendor: Add function to extract bytes from iterators"
am: 9a7f50c041

Change-Id: I588d3a7fd6dce5c2eaf1aea9944e4d45663e3dd0

6 years agoMerge "test_vendor: Add function to extract bytes from iterators"
Treehugger Robot [Fri, 11 Aug 2017 05:46:08 +0000 (05:46 +0000)]
Merge "test_vendor: Add function to extract bytes from iterators"

6 years agotest_vendor: Add function to extract bytes from iterators
johnshamoon [Wed, 9 Aug 2017 03:38:28 +0000 (20:38 -0700)]
test_vendor: Add function to extract bytes from iterators

The extract function extracts a number of bytes from the type that the
iterator is pointing to. The iterator will be incremented to the value
after the last byte after extract is called.

Fixed the bounds of the for loop in the preIncrementTest so that it
does not try to dereference the sentinel after the last value.

Test: Passes unit tests in test/iterator_test.cc
Change-Id: I07944641b829c820bbe40d612d7f065e514516b3

6 years agoosi: Suppress length warning in config parsing
Ting-Yuan Huang [Thu, 10 Aug 2017 18:13:18 +0000 (18:13 +0000)]
osi: Suppress length warning in config parsing
am: 8b7968085b

Change-Id: I338ec794dcc5db22ee4615ef139500c44eb1cf2b

6 years agoosi: Suppress length warning in config parsing
Ting-Yuan Huang [Tue, 9 May 2017 23:35:46 +0000 (16:35 -0700)]
osi: Suppress length warning in config parsing

Bug: 38178471
Test: Built without seeing the warning at the line
Change-Id: I1f8a5fc58313456921891700a3039cad1715b4d0

6 years agoresolve merge conflicts of 0a5d9ebb0b15976b47eaff77bb66a257b8b114bb to stage-aosp...
Jakub Pawlowski [Wed, 9 Aug 2017 07:44:01 +0000 (00:44 -0700)]
resolve merge conflicts of 0a5d9ebb0b15976b47eaff77bb66a257b8b114bb to stage-aosp-master

Test: this fixes merge conflict that I skipped
Change-Id: Ie829182b01d01e5ae648165f30cfad7647a97db6
Merged-In: Ie829182b01d01e5ae648165f30cfad7647a97db5

6 years agoBluetooth: move AIDL files related to Bluetooth into system/bt (2/3)
Jakub Pawlowski [Wed, 9 Aug 2017 07:13:47 +0000 (07:13 +0000)]
Bluetooth: move AIDL files related to Bluetooth into system/bt (2/3)
am: 0a5d9ebb0b

Change-Id: I6a921b05aa32dbb9bf196635c17118de5d39d2b0

6 years agoBluetooth: move AIDL files related to Bluetooth into system/bt (2/3)
Jakub Pawlowski [Tue, 8 Aug 2017 11:00:13 +0000 (04:00 -0700)]
Bluetooth: move AIDL files related to Bluetooth into system/bt (2/3)

This patch moves *.aidl files from
frameworks/base/core/java/android/bluetooth into system/bt/binder. This
is in preparation to convert the Bluetooth deamon into native
implementation piece by piece.
In order to do that, one must have C++ header files, and paths to them
with AIDL files, and */java/* folder didn't seem as proper place for
that. Additionally, keeping AIDL files out of framework/base will not
require creating dependency on this huge project, which should help
keeping the compilation fast.

Test: compilation test
Change-Id: I4c992e6ee16eea3173a49b1d37e961af3d3c9ac6
Merged-In: I4c992e6ee16eea3173a49b1d37e961af3d3c9ac6
(cherry picked from commit 8a12de49177a341a118c95435177fba4f12fe412)

6 years agoMerge "Call bta_dm_sp_cback if BTM_LOCAL_IO_CAPS == BTM_IO_CAP_NONE"
Bailey Forrest [Mon, 7 Aug 2017 22:58:14 +0000 (22:58 +0000)]
Merge "Call bta_dm_sp_cback if BTM_LOCAL_IO_CAPS == BTM_IO_CAP_NONE"
am: 9d098408ce

Change-Id: I0988507f1ed8bd3a9138ecb80171d7cfd18a4031

6 years agoMerge "Call bta_dm_sp_cback if BTM_LOCAL_IO_CAPS == BTM_IO_CAP_NONE"
Treehugger Robot [Mon, 7 Aug 2017 22:49:25 +0000 (22:49 +0000)]
Merge "Call bta_dm_sp_cback if BTM_LOCAL_IO_CAPS == BTM_IO_CAP_NONE"

6 years agoUse a mutex to protect the scheduling of tBTA_PM_TIMER
Pavlin Radoslavov [Mon, 7 Aug 2017 18:09:44 +0000 (18:09 +0000)]
Use a mutex to protect the scheduling of tBTA_PM_TIMER
am: 9e702a6aef

Change-Id: I4f41eee8b9e5dd129b3aeffb287a6e8b9c7269c4

6 years agoUse a mutex to protect the scheduling of tBTA_PM_TIMER
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

6 years agoMerge "test_vendor: Add Iterator tests"
johnshamoon [Mon, 7 Aug 2017 17:55:20 +0000 (17:55 +0000)]
Merge "test_vendor: Add Iterator tests"
am: c427c0bd30

Change-Id: I81d51453b88f707463b140861dfd0b6e0dcefb50

6 years agoMerge "test_vendor: Add Iterator tests"
Treehugger Robot [Mon, 7 Aug 2017 17:42:41 +0000 (17:42 +0000)]
Merge "test_vendor: Add Iterator tests"

6 years agotest_vendor: Use Custom Iterators in L2CAP Classes
johnshamoon [Fri, 4 Aug 2017 21:56:01 +0000 (21:56 +0000)]
test_vendor: Use Custom Iterators in L2CAP Classes
am: 6f1401153f

Change-Id: Ie5fcdbe89d35ab391fd756f675b264d1dd2233ed

6 years agotest_vendor: Use Custom Iterators in L2CAP Classes
johnshamoon [Wed, 26 Jul 2017 17:28:07 +0000 (10:28 -0700)]
test_vendor: Use Custom Iterators in L2CAP Classes

Use custom bounded iterators instead of vector iterators in L2capPacket and
L2capSdu.

Test: Passes unit tests in test/l2cap_test.cc
Change-Id: I892083ec6155b18c4b222f3c38d17d2d9fef686c

6 years agotest_vendor: Add Iterator tests
johnshamoon [Tue, 25 Jul 2017 16:50:04 +0000 (09:50 -0700)]
test_vendor: Add Iterator tests

Add Iterator tests to check that the overloaded operators and bounded iterators
are implemented correctly.

Test: Run the unit tests:
out/host/linux-x86/nativetest64/test-vendor_test_host/\
test-vendor_test_host --gtest_filter=IteratorTest.*
Change-Id: I6402cc36fe6818fa972524ac20aed526128a8553

6 years agoMerge "test_vendor: Add HciPacket and Iterator classes"
johnshamoon [Fri, 4 Aug 2017 20:14:51 +0000 (20:14 +0000)]
Merge "test_vendor: Add HciPacket and Iterator classes"
am: 3e1a3d0ddc

Change-Id: Ide1490901c49ae9e38e69ba6315c69df92c7bb27

6 years agoProtect the btif config state with a lock during cleanup
Pavlin Radoslavov [Fri, 4 Aug 2017 20:14:24 +0000 (20:14 +0000)]
Protect the btif config state with a lock during cleanup
am: a4febd6d04

Change-Id: I47a3b5efc680954afc11e58f16c440284ba016a9

6 years agoMerge "test_vendor: Add HciPacket and Iterator classes"
Treehugger Robot [Fri, 4 Aug 2017 20:13:17 +0000 (20:13 +0000)]
Merge "test_vendor: Add HciPacket and Iterator classes"

6 years agoProtect the btif config state with a lock during cleanup
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

6 years agoAdvertisement parsing fix for zero padding
Jakub Pawlowski [Fri, 4 Aug 2017 17:55:13 +0000 (17:55 +0000)]
Advertisement parsing fix for zero padding
am: 35a9ea352d

Change-Id: I59bf8524b2c95c5f8c7f4261166057078dd25b7c

6 years agoAdvertisement parsing fix for zero padding
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

6 years agoAdded another entry to the INTEROP_2MBPS_LINK_ONLY interoperability database
Pavlin Radoslavov [Fri, 4 Aug 2017 06:02:00 +0000 (06:02 +0000)]
Added another entry to the INTEROP_2MBPS_LINK_ONLY interoperability database
am: 427da91563

Change-Id: I7412713b0c0104309b8e5fcffa7df2fde1eaa7f2

6 years agoAdded another entry to the INTEROP_2MBPS_LINK_ONLY interoperability database
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
(cherry picked from commit a5f0a7717d129ca8164a0712e63f41cc4b60dd72)

6 years agotest_vendor: Add HciPacket and Iterator classes
johnshamoon [Wed, 19 Jul 2017 19:06:54 +0000 (12:06 -0700)]
test_vendor: Add HciPacket and Iterator classes

HciPacket is the abstract base class for all packet types.

Iterator is the custom iterator class that all packet types will use
to iterate through. The iterators in this class are bounded from
[start_of_packet, length_of_packet]. This prevents incrementing the iterator
passed the end sentinel.

Test: Passes all of the tests in test/iterator_test.cc
Change-Id: If9fec9ae32d9a23575ad3e9219b8249d164bc0d5

6 years agoDon't reuse AVDTP internal state for different purposes
Pavlin Radoslavov [Thu, 3 Aug 2017 10:40:13 +0000 (10:40 +0000)]
Don't reuse AVDTP internal state for different purposes
am: 8da87bea5e

Change-Id: I1b35a8e6ba0f3d109731a1128c4ccb6363a9404c

6 years agoAdd A2DP_DumpCodecInfo() API
Pavlin Radoslavov [Thu, 3 Aug 2017 10:40:09 +0000 (10:40 +0000)]
Add A2DP_DumpCodecInfo() API
am: 219b85f136

Change-Id: I1bc85fcf214ab75e130954245d585e3015b08bec

6 years agoDon't reuse AVDTP internal state for different purposes
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
(cherry picked from commit c64dc1d28496b5e917d0f82317d40d3c60e6495d)

6 years agoAdd A2DP_DumpCodecInfo() API
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
(cherry picked from commit 81c2234305d4c84eb38f0d5a92605e3b42366f84)

6 years agoWorkaround for Traxxas
Jakub Pawlowski [Wed, 2 Aug 2017 22:02:51 +0000 (22:02 +0000)]
Workaround for Traxxas
am: 02d1ec171f

Change-Id: If547b412aabc0cf86194116c9a0641e700209336

6 years agoWorkaround for Traxxas
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

6 years agoMerge "AVRCP Controller request metadata on playback."
Joseph Pirozzo [Wed, 2 Aug 2017 19:47:11 +0000 (19:47 +0000)]
Merge "AVRCP Controller request metadata on playback."
am: 39b6c45264

Change-Id: Ia5000440315c0f8a1bc75142e4463606e9fc931c

6 years agoMerge "AVRCP Controller request metadata on playback."
Joseph Pirozzo [Wed, 2 Aug 2017 19:33:05 +0000 (19:33 +0000)]
Merge "AVRCP Controller request metadata on playback."

6 years agoMerge "AE: Set secondary adv max skip to zero"
Sunny Kapdi [Wed, 2 Aug 2017 17:13:59 +0000 (17:13 +0000)]
Merge "AE: Set secondary adv max skip to zero"
am: b92d9f3530

Change-Id: I54710829a6ba81d69bbee4571c00492d4a612e32

6 years agoMerge "AE: Set secondary adv max skip to zero"
Treehugger Robot [Wed, 2 Aug 2017 17:08:20 +0000 (17:08 +0000)]
Merge "AE: Set secondary adv max skip to zero"

6 years agoAVRCP Controller request metadata on playback.
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

6 years agotest_vendor: Rename discoverable devices.
jruthe [Wed, 2 Aug 2017 02:14:34 +0000 (02:14 +0000)]
test_vendor: Rename discoverable devices.
am: 974b1f9a91

Change-Id: I2252dd34fa376c4aa3e6da49b0f5f75f59d05837

6 years agotest_vendor: Rename discoverable devices.
jruthe [Tue, 1 Aug 2017 23:44:15 +0000 (16:44 -0700)]
test_vendor: Rename discoverable devices.

Test: compiles
Change-Id: I1fc1f6845995e9e816556679622db6f6d447b7b3

6 years agoAE: Set secondary adv max skip to zero
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

6 years agoMerge "Fix processing of Inquiry results data"
Subramanian Srinivasan [Tue, 1 Aug 2017 06:06:15 +0000 (06:06 +0000)]
Merge "Fix processing of Inquiry results data"
am: 67da9a5e19

Change-Id: If6b7523e9096c114263baf7a065f023186818c82

6 years agoMerge "Fix processing of Inquiry results data"
Treehugger Robot [Tue, 1 Aug 2017 05:59:41 +0000 (05:59 +0000)]
Merge "Fix processing of Inquiry results data"

6 years agoUse the correct AVDTP version-specific features
Satish Kodishala [Tue, 1 Aug 2017 03:25:34 +0000 (03:25 +0000)]
Use the correct AVDTP version-specific features
am: 9cd9ef4c38

Change-Id: I85e816084a49a0a3438c8cc88fe2ab0ef32097f2

6 years agoUse the correct AVDTP version-specific features
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

6 years agoFix processing of Inquiry results data
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

6 years agoFix the MAC address for INTEROP_2MBPS_LINK_ONLY entry
Pavlin Radoslavov [Mon, 31 Jul 2017 18:08:21 +0000 (18:08 +0000)]
Fix the MAC address for INTEROP_2MBPS_LINK_ONLY entry
am: b60955f9c7

Change-Id: I06a99e795b0ddfd6978fca2ccca09f20de3d299f

6 years agoFix the MAC address for INTEROP_2MBPS_LINK_ONLY entry
Pavlin Radoslavov [Mon, 31 Jul 2017 03:18:57 +0000 (20:18 -0700)]
Fix the MAC address for INTEROP_2MBPS_LINK_ONLY entry

Bug: 62394764
Test: Code compilation
Change-Id: I3e6d8bb8258d6cc56ce05d7f17dda445859f011a

6 years agoAdd interoperability mechanism to restrict the AVDTP MTU for AAC codec
Pavlin Radoslavov [Fri, 28 Jul 2017 19:29:43 +0000 (19:29 +0000)]
Add interoperability mechanism to restrict the AVDTP MTU for AAC codec
am: b866da0bc1

Change-Id: I79d73807f18ca5f21050f72b16c0e6f6f972f0fb

6 years agoAdd interoperability mechanism to restrict the AVDTP MTU for AAC codec
Pavlin Radoslavov [Fri, 28 Jul 2017 02:19:32 +0000 (19:19 -0700)]
Add interoperability mechanism to restrict the AVDTP MTU for AAC codec

Also, add an interoperability entry for devices that are known
to have AAC-related issues.

Test: A2DP streaming to Headsets
Bug: 63725151
Change-Id: Ic9b6640da44ebc28bfa63a19a87f0543d69bc576

6 years agoRetry authentication in key-missing or pairing collision use case
Matadeen Mishra [Thu, 27 Jul 2017 02:29:36 +0000 (02:29 +0000)]
Retry authentication in key-missing or pairing collision use case
am: a95a6a3608

Change-Id: Iad1f7b2b5cc32fe6bb7e7237a4652ba7b2ed4e78

6 years agoRetry authentication in key-missing or pairing collision use case
Matadeen Mishra [Fri, 17 Feb 2017 07:10:53 +0000 (12:40 +0530)]
Retry authentication in key-missing or pairing collision use case

Problem:
A2DP connection failing with connection timeout

Steps:
1. Pair and connect car kit from DUT
2. Disconnect the car kit from DUT
3  Unpair DUT from car kit menu and initiate pairing from car kit.
   Pairing and A2DP connection should be successful.

Failure:
Paring and A2DP connections fail

Root Cause:
As the stack posting authentication failure to upper layers
when SOC gives key missing error code remote removed from
DUT paired list, but same time lower layers keep retrying
for missing key and leading to connection failure.

Fix:
Don't post authentication complete to upper layers when stack
re trying for security in key missing or transaction collision cases

Test: manual
Bug: 35448920
Change-Id: I970c8679bf27801fe46f8dd757d6435ed500f77f
(cherry picked from commit 35752e32fb5d859c012f6d06f2c22fa6b1f84174)

6 years agoMerge "Revert "bt: Update libchrome APIS to r456626.""
Eric Laurent [Wed, 26 Jul 2017 20:19:29 +0000 (20:19 +0000)]
Merge "Revert "bt: Update libchrome APIS to r456626.""
am: 6241dd5522

Change-Id: I2ab440ec5601a01717428b0ad8faf135437af971

6 years agoMerge "Revert "bt: Update libchrome APIS to r456626.""
Eric Laurent [Wed, 26 Jul 2017 20:02:18 +0000 (20:02 +0000)]
Merge "Revert "bt: Update libchrome APIS to r456626.""

6 years agoMerge "Use a mutex to protect the consistency of the tBTA_PM_TIMER state"
Pavlin Radoslavov [Wed, 26 Jul 2017 19:56:48 +0000 (19:56 +0000)]
Merge "Use a mutex to protect the consistency of the tBTA_PM_TIMER state"
am: 02ce3f8f52

Change-Id: I61dbfa463046af52f30385bb2593709b0f8e7730

6 years agoMerge "Use a mutex to protect the consistency of the tBTA_PM_TIMER state"
Treehugger Robot [Wed, 26 Jul 2017 19:48:05 +0000 (19:48 +0000)]
Merge "Use a mutex to protect the consistency of the tBTA_PM_TIMER state"

6 years agoMerge "HFP Client connect Audio"
Joseph Pirozzo [Wed, 26 Jul 2017 18:35:19 +0000 (18:35 +0000)]
Merge "HFP Client connect Audio"
am: d568679105

Change-Id: Ie8b2a8b3b0d54d10fb99017d6f34649004033a5c

6 years agoMerge "HFP Client connect Audio"
Treehugger Robot [Wed, 26 Jul 2017 18:30:08 +0000 (18:30 +0000)]
Merge "HFP Client connect Audio"

6 years agoMerge "Remove unwanted space characters from dialing number"
Stanley Tng [Wed, 26 Jul 2017 18:04:58 +0000 (18:04 +0000)]
Merge "Remove unwanted space characters from dialing number"
am: ac3faef9da

Change-Id: I1209591467468e7b5b5cc77b04c759b02b3b7b67

6 years agoMerge "Remove unwanted space characters from dialing number"
Treehugger Robot [Wed, 26 Jul 2017 17:50:46 +0000 (17:50 +0000)]
Merge "Remove unwanted space characters from dialing number"

6 years agoRevert "bt: Update libchrome APIS to r456626."
Luis Hector Chavez [Wed, 26 Jul 2017 17:36:20 +0000 (17:36 +0000)]
Revert "bt: Update libchrome APIS to r456626."

This reverts commit 014890b74878022db7d23be47db179ba06e01856.

Reason for revert: Broke the mac_sdk
Exempt-From-Owner-Approval: Fixing mac_sdk

Change-Id: I11652839faf8430a7ee6ad64af0a7bd6985478e8

6 years agoUse a mutex to protect the consistency of the tBTA_PM_TIMER state
Pavlin Radoslavov [Wed, 26 Jul 2017 06:55:04 +0000 (23:55 -0700)]
Use a mutex to protect the consistency of the tBTA_PM_TIMER state

Bug: 63689331
Test: Code compilation
Change-Id: Id8ab78473e1f766d5a76b967024b7ff4af499667

6 years agoCall bta_dm_sp_cback if BTM_LOCAL_IO_CAPS == BTM_IO_CAP_NONE
Bailey Forrest [Wed, 26 Jul 2017 02:50:39 +0000 (19:50 -0700)]
Call bta_dm_sp_cback if BTM_LOCAL_IO_CAPS == BTM_IO_CAP_NONE

Without bta_dm_sp_cback, bluetooth.h platform API does not function
correctly when BTM_IO_CAP_NONE is set.
- bond_state_changed_callback is never called
- get_remote_device_properties returns nothing

This reverts eb1ad1d47b84767d9af180243cb14ac409331a0d

Bug: 63603696
Test: Test on device. bond_state_changed_callback called
Change-Id: If8d537355eb12c84ecbf5eb2d07fb27b178d9c66

6 years agobt: Update libchrome APIS to r456626.
Jay Civelli [Wed, 26 Jul 2017 01:53:56 +0000 (01:53 +0000)]
bt: Update libchrome APIS to r456626.
am: 014890b748

Change-Id: Iaba9b51fa55e72df01bcdb46c10dcf46d11a6856

6 years agoHFP Client connect Audio
Joseph Pirozzo [Thu, 29 Jun 2017 21:23:01 +0000 (14:23 -0700)]
HFP Client connect Audio

Listen for incomming SCO connections any time the Hands Free Profile is
connected to a phone.  Additionally allow eSCO connections on devices
that only support the standard SBC audio codec.

Bug: 62086689
Test: pair and connect a phone via HFP then start a phonecall and
enable and disable audio routing through BT observe that the connection
is established everytime.

Change-Id: I11319a4a85f8c9d36114a6fc09da0f0b8da16672

6 years agoRemove unwanted space characters from dialing number
Stanley Tng [Tue, 25 Jul 2017 17:07:05 +0000 (10:07 -0700)]
Remove unwanted space characters from dialing number

Certain car kits might send an AT command with space characters in
the dialing number. This commit adds a workaround to trim these unwanted
space characters.

Bug: 6340999
Test: Manual test with a car kit but purposely added numbers with spaces.
Change-Id: I9c238bc625fff8503c45cbbfaeb8bdd15b8a7d9a

6 years agobt: Update libchrome APIS to r456626.
Jay Civelli [Mon, 27 Mar 2017 16:53:18 +0000 (09:53 -0700)]
bt: Update libchrome APIS to r456626.

The new libchrome has been ported from Chromium and some APIs
have changed. Make necessary changes at call sites.

Change-Id: If5ea3659905f485fd0513c75e9d4f7c99b390c16

7 years agoMerge "test_vendor: Add base implementation"
Myles Watson [Sat, 22 Jul 2017 03:46:50 +0000 (03:46 +0000)]
Merge "test_vendor: Add base implementation"
am: f246f94a5b

Change-Id: I94550ef296e9d70739d16711c5f4601e6541df3a

7 years agoMerge "test_vendor: Add base implementation"
Treehugger Robot [Sat, 22 Jul 2017 03:42:59 +0000 (03:42 +0000)]
Merge "test_vendor: Add base implementation"

7 years agoMerge "Remove static library from required modules list"
Colin Cross [Fri, 21 Jul 2017 23:02:59 +0000 (23:02 +0000)]
Merge "Remove static library from required modules list"
am: 01e400f210

Change-Id: Idfb829105260ecefb777c0172ca8572e603a51b8

7 years agoMerge "Remove static library from required modules list"
Treehugger Robot [Fri, 21 Jul 2017 22:57:44 +0000 (22:57 +0000)]
Merge "Remove static library from required modules list"

7 years agoMerge "test_vendor: Change assemble function parameters"
jruthe [Fri, 21 Jul 2017 20:23:00 +0000 (20:23 +0000)]
Merge "test_vendor: Change assemble function parameters"
am: 2f75d93cf3

Change-Id: I8d1d6e37aba524ca32ef9662404075015e28d8ab

7 years agoFix build by adding bt_types to bluetooth.h (1/2)
johnshamoon [Fri, 21 Jul 2017 20:22:38 +0000 (20:22 +0000)]
Fix build by adding bt_types to bluetooth.h (1/2)
am: 66676ad1e6

Change-Id: I66cd02627b3920df81069e5e0b9ec102f2394257

7 years agoMerge "test_vendor: Change assemble function parameters"
Treehugger Robot [Fri, 21 Jul 2017 20:18:14 +0000 (20:18 +0000)]
Merge "test_vendor: Change assemble function parameters"

7 years agotest_vendor: Add base implementation
Myles Watson [Wed, 17 May 2017 18:39:18 +0000 (11:39 -0700)]
test_vendor: Add base implementation

test_vendor: Add Device and Beacon classes
Device contains properties to be modeled.  Beacon
is a simple class that inherits from Device.

test_vendor: Add a Device factory
The device factory calls the constructors and initializes
the devices.  The controller uses the factory to instantiate
devices.

test_vendor: Add a Keyboard class
Add a connectable LE device.

test_vendor: Add BrokenAdv device
Generate random broken advertisements.

test_vendor: Add scanning and connections
Add a connection class to handle data transfer.
Add scanning and connections in the controller.

Test: Compiles
Change-Id: Id9f64308447c9de4e83a2a4fa9f59c30bede75ab

7 years agotest_vendor: Change assemble function parameters
jruthe [Mon, 17 Jul 2017 23:09:12 +0000 (16:09 -0700)]
test_vendor: Change assemble function parameters

Update L2cap::assemble to take a vector of unique_ptrs to L2capSdus rather than
a vector of L2capSdu objects.

Test: Passes assemble tests in test/l2cap_tests.cc
Change-Id: I909ccb9fde6d36a7dbeb6c6d7c3d8751fe58d5f0

7 years agoFix build by adding bt_types to bluetooth.h (1/2)
johnshamoon [Fri, 21 Jul 2017 17:18:58 +0000 (10:18 -0700)]
Fix build by adding bt_types to bluetooth.h (1/2)

Allow bt_types to be included as a shared or static library.

Test: Compiles
Change-Id: I24bc3dafaddd83405bd0bfa37fd5df5b4238f253

7 years agoMerge "Revert "Always restrict the AVDTP MTU for SBC codec to MAX_2MBPS_AVDTP_MTU...
Pavlin Radoslavov [Fri, 21 Jul 2017 03:14:10 +0000 (03:14 +0000)]
Merge "Revert "Always restrict the AVDTP MTU for SBC codec to MAX_2MBPS_AVDTP_MTU(663)""
am: 0382042e18

Change-Id: Icead26b39ebb7d3b0dcc83f22c9406fee8c997e9

7 years agoMerge "Revert "Always restrict the AVDTP MTU for SBC codec to MAX_2MBPS_AVDTP_MTU...
Treehugger Robot [Fri, 21 Jul 2017 03:07:54 +0000 (03:07 +0000)]
Merge "Revert "Always restrict the AVDTP MTU for SBC codec to MAX_2MBPS_AVDTP_MTU(663)""

7 years agoMerge "Reduce error conditions which cause link key deletion on auth complete"
Andre Eisenbach [Fri, 21 Jul 2017 02:41:06 +0000 (02:41 +0000)]
Merge "Reduce error conditions which cause link key deletion on auth complete"
am: 7c17ea31ff

Change-Id: I9df2b69da085249f5299950bc763ff91f6e45bda

7 years agoMerge "Reduce error conditions which cause link key deletion on auth complete"
Treehugger Robot [Fri, 21 Jul 2017 02:37:11 +0000 (02:37 +0000)]
Merge "Reduce error conditions which cause link key deletion on auth complete"

7 years agoFix the interoperability mechanism for 2Mbps-only links for audio
Pavlin Radoslavov [Fri, 21 Jul 2017 02:22:36 +0000 (02:22 +0000)]
Fix the interoperability mechanism for 2Mbps-only links for audio
am: 0dec1807c6

Change-Id: I8de36170a91d4d15dbb97de4392b9943b8ec1531

7 years agoReduce error conditions which cause link key deletion on auth complete
Andre Eisenbach [Wed, 19 Jul 2017 22:33:07 +0000 (15:33 -0700)]
Reduce error conditions which cause link key deletion on auth complete

This inverts previous conditions which attempt to limit what error
conditions cause link key deletion and instead of excluding error codes
it provides a shorter list of codes which actually DO cause link key
deletion.

As a result, temporary failures caused by page timeouts, random
disconnects etc. should no longer cause link key deletion by accident.

Fixes: 63507123
Test: manual
Change-Id: I8d51403b8d233a3c335313b8f257a562c3d01109

7 years agoRevert "Always restrict the AVDTP MTU for SBC codec to MAX_2MBPS_AVDTP_MTU(663)"
Pavlin Radoslavov [Fri, 21 Jul 2017 00:51:07 +0000 (00:51 +0000)]
Revert "Always restrict the AVDTP MTU for SBC codec to MAX_2MBPS_AVDTP_MTU(663)"

This reverts commit 9eee3a772b3f23e5c33845422203f0dec07be234.

Not needed anymore - handled by the interoperability database.

Bug: 62394764
Bug: 34127145
Test: Audio streaming to headset that supports 3Mbps
Change-Id: I143c07c171e0fe9ef882c5e506545187f9e41498

7 years agoFix the interoperability mechanism for 2Mbps-only links for audio
Pavlin Radoslavov [Fri, 21 Jul 2017 00:00:36 +0000 (17:00 -0700)]
Fix the interoperability mechanism for 2Mbps-only links for audio

Also, added two new entries to the INTEROP_2MBPS_LINK_ONLY
interoperability database.

Bug: 62394764
Test: Audio streaming to headset that supports 3Mbps
Change-Id: Idaa25e18c0b017d8859aab723244fdc2613fc159

7 years agoAdd additional LE transport lookup in BTM_ReadRSSI for DUMO device
Jacky Cheung [Thu, 20 Jul 2017 16:14:24 +0000 (16:14 +0000)]
Add additional LE transport lookup in BTM_ReadRSSI for DUMO device
am: 5154ea8a5c

Change-Id: Ie678f53e4e9dd711ffe11dd9b5c251f04dd315d6

7 years agoAdd additional LE transport lookup in BTM_ReadRSSI for DUMO device
Jacky Cheung [Thu, 20 Jul 2017 00:21:13 +0000 (17:21 -0700)]
Add additional LE transport lookup in BTM_ReadRSSI for DUMO device

Bug: 63391975
Test: CTS Bluetooth LE Secure Client Test
Change-Id: Ibde19dcef9dbd4b344771835fe5521d1f83c638a

7 years agoMerge "test_vendor: Fragment tests"
jruthe [Wed, 19 Jul 2017 22:10:16 +0000 (22:10 +0000)]
Merge "test_vendor: Fragment tests"
am: 7453a5d341

Change-Id: If10528953ba17e74851d28c079e8ed321f869209

7 years agoMerge "test_vendor: Fragment tests"
Treehugger Robot [Wed, 19 Jul 2017 22:01:48 +0000 (22:01 +0000)]
Merge "test_vendor: Fragment tests"

7 years agotest_vendor: Move include to .cc file
Myles Watson [Wed, 19 Jul 2017 21:40:44 +0000 (21:40 +0000)]
test_vendor: Move include to .cc file
am: 8769e8e923

Change-Id: Iebdef1bd24f4ae9710df389fef482afd035aced7

7 years agotest_vendor: Move include to .cc file
Myles Watson [Tue, 7 Mar 2017 13:02:01 +0000 (05:02 -0800)]
test_vendor: Move include to .cc file

Test: compile
Change-Id: Ib13830f92c305bcd9d7e688d0d4dba78499b1f5b

7 years agoMerge "test_vendor: Implement L2CAP packet fragmentation"
jruthe [Wed, 19 Jul 2017 00:28:20 +0000 (00:28 +0000)]
Merge "test_vendor: Implement L2CAP packet fragmentation"
am: 3dc90dd77e

Change-Id: I99e34e131e5735a676c7e8dc1ea1d902544213d4

7 years agoMerge "test_vendor: Implement L2CAP packet fragmentation"
Treehugger Robot [Wed, 19 Jul 2017 00:19:25 +0000 (00:19 +0000)]
Merge "test_vendor: Implement L2CAP packet fragmentation"