OSDN Git Service

android-x86/system-bt.git
4 years agoMerge "[system][bt][gd] fix -Wreorder-init-list"
Nick Desaulniers [Wed, 9 Oct 2019 21:45:09 +0000 (14:45 -0700)]
Merge "[system][bt][gd] fix -Wreorder-init-list"
am: 2ca931932d

Change-Id: I17ddc5f1784349514d5ead16321cbb18758be2ca

4 years agoMerge "[system][bt][gd] fix -Wreorder-init-list"
Treehugger Robot [Wed, 9 Oct 2019 21:18:10 +0000 (21:18 +0000)]
Merge "[system][bt][gd] fix -Wreorder-init-list"

4 years ago[system][bt][gd] fix -Wreorder-init-list
Nick Desaulniers [Wed, 9 Oct 2019 18:06:55 +0000 (11:06 -0700)]
[system][bt][gd] fix -Wreorder-init-list

C++20 will require members in a designated initializer to be in order
unlike C99.

Bug: 139945549
Test: mm
Change-Id: I4ed1a2c2865cfa26b45db970202340ae582ba78d
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
4 years agohci_pdl: Inquiry commands
Chris Manton [Wed, 9 Oct 2019 01:04:06 +0000 (18:04 -0700)]
hci_pdl: Inquiry commands
am: b365084762

Change-Id: I8b72a30d27c03b64b8aab001d62d5b7e3fe29897

4 years agohci_pdl: Inquiry commands
Chris Manton [Fri, 4 Oct 2019 00:31:12 +0000 (17:31 -0700)]
hci_pdl: Inquiry commands

Test: Run and verify on actual device
Bug: 142061208

Change-Id: I7d99aec75691528da75a563943d0db01cb2e3920

4 years agoHCI: Add GAP data to advertising packets
Myles Watson [Mon, 7 Oct 2019 22:44:16 +0000 (15:44 -0700)]
HCI: Add GAP data to advertising packets
am: 7a0dc393cd

Change-Id: I0164505fdf195038616ee002202bb1ed07629351

4 years agoPDL: Add padding fields
Myles Watson [Mon, 7 Oct 2019 22:43:18 +0000 (15:43 -0700)]
PDL: Add padding fields
am: 42071b5955

Change-Id: I4998a7e1eca2cc62f33298b8260e513e5ccbebdc

4 years agoHCI: Add GAP data to advertising packets
Myles Watson [Tue, 9 Jul 2019 22:24:54 +0000 (15:24 -0700)]
HCI: Add GAP data to advertising packets

Test: Build
Change-Id: I7ebc7d190c4bfc5ae0635bdfbd35b7e8a147ba96

4 years agoPDL: Add padding fields
Myles Watson [Fri, 4 Oct 2019 22:59:41 +0000 (15:59 -0700)]
PDL: Add padding fields

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I6b020b2d47565e8e724e8114a2031be71e8a22ec

4 years agoPDL: Support Type Length Value in Structs
Myles Watson [Mon, 7 Oct 2019 17:09:50 +0000 (10:09 -0700)]
PDL: Support Type Length Value in Structs
am: f714e2cc41

Change-Id: I8ee5fe33ac03145e6c6b682d6f505ae5d765a32d

4 years agoPDL: Allow parent packets with no parameters
Myles Watson [Mon, 7 Oct 2019 17:09:47 +0000 (10:09 -0700)]
PDL: Allow parent packets with no parameters
am: d60944273c

Change-Id: Ie311ae4cca2be75042b425b14aa1fb95a15adc7a

4 years agoPDL: Add an error for redefinition
Myles Watson [Mon, 7 Oct 2019 17:09:43 +0000 (10:09 -0700)]
PDL: Add an error for redefinition
am: bc445170db

Change-Id: I3831c486d760b304458d801008363f2be35f07df

4 years agoPDL: Use fixed portion of dynamic sizes for arrays
Myles Watson [Mon, 7 Oct 2019 17:09:39 +0000 (10:09 -0700)]
PDL: Use fixed portion of dynamic sizes for arrays
am: d66ec50f50

Change-Id: I6680ca17ee532327f57b1d210d750a2b2c5760c1

4 years agoPDL: Support Type Length Value in Structs
Myles Watson [Thu, 3 Oct 2019 22:48:29 +0000 (15:48 -0700)]
PDL: Support Type Length Value in Structs

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: If2a83908c507f37915e9a8520a1797cf5fc704a5

4 years agoPDL: Allow parent packets with no parameters
Myles Watson [Fri, 4 Oct 2019 23:01:07 +0000 (16:01 -0700)]
PDL: Allow parent packets with no parameters

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I75e7c3a5d5bc653cc5df29ec406238cf9adf8cfc

4 years agoPDL: Add an error for redefinition
Myles Watson [Fri, 4 Oct 2019 00:22:39 +0000 (17:22 -0700)]
PDL: Add an error for redefinition

Bug: 138260498
Test: define a duplicate type and compile
Change-Id: I54c4016d6eabf1b969b12616d4b88e3f2b593c9e

4 years agoPDL: Use fixed portion of dynamic sizes for arrays
Myles Watson [Fri, 4 Oct 2019 23:02:38 +0000 (16:02 -0700)]
PDL: Use fixed portion of dynamic sizes for arrays

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I271f3bd2c7eef13379fe3e0c059d82e2d1ddd37a

4 years agoMerge "GD HCI: add unittest for LeConnectionCallbacks"
Chienyuan [Fri, 4 Oct 2019 13:44:42 +0000 (06:44 -0700)]
Merge "GD HCI: add unittest for LeConnectionCallbacks"
am: 2194200af7

Change-Id: I79f151dc5ebd0b47d440ebf7614a3c63f8409aee

4 years agoMerge "GD HCI: add unittest for LeConnectionCallbacks"
Treehugger Robot [Fri, 4 Oct 2019 13:16:01 +0000 (13:16 +0000)]
Merge "GD HCI: add unittest for LeConnectionCallbacks"

4 years agoSplit L2CAP Classic and LE stacks into separate modules
Jack He [Fri, 4 Oct 2019 09:30:52 +0000 (02:30 -0700)]
Split L2CAP Classic and LE stacks into separate modules
am: ff38d89193

Change-Id: Ib7466a729ec21961904e9c97fb6ca444aafb7119

4 years agoGD HCI: add unittest for LeConnectionCallbacks
Chienyuan [Thu, 3 Oct 2019 08:39:02 +0000 (16:39 +0800)]
GD HCI: add unittest for LeConnectionCallbacks

Test: run bluetooth_test_gd
Change-Id: Ibb1255a7f3736ade798825751c6063d5ed2f0455

4 years agoSplit L2CAP Classic and LE stacks into separate modules
Jack He [Fri, 4 Oct 2019 00:11:07 +0000 (17:11 -0700)]
Split L2CAP Classic and LE stacks into separate modules

* Although L2CAP LE and Classic stacks look similar, they are actually very different when diving into details
* Splitting them into two separate modules will benefit in the following ways:
 * One can start a LE only stack
 * One can turn off Classic stack entirely when not needed
 * Dependencies are more obvious, e.g. LE-CoC only depends on LE L2CAP and A2DP only depends on Classic L2CAP
* Changed test names as GTEST does not allow test name collisions
* New directory structure after the change:
  - l2cap: common headers that should be exposed to public
    - internal: common internal libraries shared between LE and classic
    - classic: classic headers that should be exposed to public
      - internal: internal libraries for classic
      - cert: certification stack for classic
   - le: LE headers that should be exposed to public
      - internal: internal libraries for LE
      - cert: certification stack for LE

Using Bash
 for file in classic_*; do git mv "$file" "classic/${file/classic_/}"; done
 for file in le_*; do git mv "$file" "le/${file/le_/}"; done
 for file in internal/le_*; do git mv "$file" "le/${file/le_/}"; done
 for file in internal/classic_*; do git mv "$file" "classic/${file/classic_/}"; done
 for file in classic/*; do if [ -f "$file" ]; then sed -i -e 's/Classic//g' "$file"; fi; done
 for file in classic/internal/*; do if [ -f "$file" ]; then sed -i -e 's/Classic//g' "$file"; fi; done
 for file in le/*; do if [ -f "$file" ]; then sed -i -e 's/Le//g' "$file"; fi; done
 for file in le/internal/*; do if [ -f "$file" ]; then sed -i -e 's/Le//g' "$file"; fi; done

Using IDE:
 replace "namespace l2cap {" with "namespace l2cap { namespace classic {" in classic/
 replace "}  // namespace l2cap" with "} }" in classic/
 replace "namespace l2cap {" with "namespace l2cap { namespace le {" in le/
 replace "}  // namespace l2cap" with "} }" in le/
 replace "l2cap/classic_" with "l2cap/classic/" in classic/
 replace "l2cap/internal/classic_" with "l2cap/classic/internal/" in classic/
 replace "l2cap/le_" with "l2cap/le/" in le/
 replace "l2cap/internal/le_" with "l2cap/le/internal/" in le/

Bug: 140938432
Test: bluetooth_test_gd
Change-Id: I29eafefc5b6be4033e5db811776230d28ca312b2

4 years agoMerge "PDL: Add GetStructOffset and GetStructSize"
Myles Watson [Thu, 3 Oct 2019 21:01:48 +0000 (14:01 -0700)]
Merge "PDL: Add GetStructOffset and GetStructSize"
am: 4e4903297c

Change-Id: I6f27768307ab6f9590630f3ec1720858b6e14fa8

4 years agoMerge "PDL: Add GetStructOffset and GetStructSize"
Treehugger Robot [Thu, 3 Oct 2019 20:53:23 +0000 (20:53 +0000)]
Merge "PDL: Add GetStructOffset and GetStructSize"

4 years agoMerge "L2cap dynamic channel and service"
Hansong Zhang [Thu, 3 Oct 2019 20:46:28 +0000 (13:46 -0700)]
Merge "L2cap dynamic channel and service"
am: b6d12b55c1

Change-Id: Ib89b388b6f8ac20e708d95497299fac33fd3fd34

4 years agoMerge "L2cap dynamic channel and service"
Treehugger Robot [Thu, 3 Oct 2019 20:19:24 +0000 (20:19 +0000)]
Merge "L2cap dynamic channel and service"

4 years agoMerge changes I62125269,Icbe89252
Myles Watson [Thu, 3 Oct 2019 20:16:46 +0000 (13:16 -0700)]
Merge changes I62125269,Icbe89252
am: 8ecf1672b6

Change-Id: Id95bdc8c19a911d88139795fc74ee1028a75f3ed

4 years agoMerge "PDL: Add for_struct to GenExtractor"
Myles Watson [Thu, 3 Oct 2019 20:09:45 +0000 (13:09 -0700)]
Merge "PDL: Add for_struct to GenExtractor"
am: 705f0b9ced

Change-Id: I3493b6623de18c7836a81a4207c688ac4275223d

4 years agoMerge changes I62125269,Icbe89252
Treehugger Robot [Thu, 3 Oct 2019 19:59:53 +0000 (19:59 +0000)]
Merge changes I62125269,Icbe89252

* changes:
  PDL: Use Size for StructField sizes
  PDL: Pass the size to GenBounds

4 years agoMerge "PDL: Add for_struct to GenExtractor"
Treehugger Robot [Thu, 3 Oct 2019 19:52:22 +0000 (19:52 +0000)]
Merge "PDL: Add for_struct to GenExtractor"

4 years agoMerge "Update WriteInquiryScanActivity"
Chris Manton [Thu, 3 Oct 2019 18:39:27 +0000 (11:39 -0700)]
Merge "Update WriteInquiryScanActivity"
am: f90d0d23d4

Change-Id: Ida9b4075750ad6b2ad83f49d0d8a4e260499e1ed

4 years agoMerge "Add Read Number of Supported Iac complete"
Chris Manton [Thu, 3 Oct 2019 18:39:05 +0000 (11:39 -0700)]
Merge "Add Read Number of Supported Iac complete"
am: ace167c880

Change-Id: I614f5ebd8c8af73e342ffe465ff1d41248dc7c7b

4 years agoMerge "Add Read Page Timeout Complete View"
Chris Manton [Thu, 3 Oct 2019 18:38:36 +0000 (11:38 -0700)]
Merge "Add Read Page Timeout Complete View"
am: b65f3ab378

Change-Id: Ia858a76d40ae1ee41442cc05a286c11ba774dd0a

4 years agoMerge "Update WriteInquiryScanActivity"
Treehugger Robot [Thu, 3 Oct 2019 18:28:01 +0000 (18:28 +0000)]
Merge "Update WriteInquiryScanActivity"

4 years agoUpdate WriteInquiryScanActivity
Chris Manton [Thu, 3 Oct 2019 04:54:41 +0000 (21:54 -0700)]
Update WriteInquiryScanActivity

Test: Compiles
Bug: 142061208

Change-Id: I969e94e393812528ec4ba38a87b4055bc42c67d3

4 years agoMerge "Add Read Number of Supported Iac complete"
Treehugger Robot [Thu, 3 Oct 2019 18:25:11 +0000 (18:25 +0000)]
Merge "Add Read Number of Supported Iac complete"

4 years agoMerge "Add Read Page Timeout Complete View"
Treehugger Robot [Thu, 3 Oct 2019 18:24:23 +0000 (18:24 +0000)]
Merge "Add Read Page Timeout Complete View"

4 years agoLegacy portion of btm shim layer
Chris Manton [Thu, 3 Oct 2019 17:36:39 +0000 (10:36 -0700)]
Legacy portion of btm shim layer
am: faedfe2099

Change-Id: I1f18d5f99b246f6e6533f3e7679034f89a569860

4 years agoPDL: Add GetStructOffset and GetStructSize
Myles Watson [Thu, 3 Oct 2019 16:08:34 +0000 (09:08 -0700)]
PDL: Add GetStructOffset and GetStructSize

Structs are parsed all at once, so they don't need as much
information as packets.

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I49d433332874514d2cc1c5779865437fab5533b4

4 years agoPDL: Use Size for StructField sizes
Myles Watson [Thu, 3 Oct 2019 16:05:13 +0000 (09:05 -0700)]
PDL: Use Size for StructField sizes

Structs can have dynamic sizes, which need to be passed in.

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I621252699b597e728ff1566b95babd98cf00e8d4

4 years agoPDL: Pass the size to GenBounds
Myles Watson [Wed, 2 Oct 2019 22:07:05 +0000 (15:07 -0700)]
PDL: Pass the size to GenBounds

There are different sizes, depending on where GenBounds is called.

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: Icbe892529919fdad0f0b98a3b66a2b24cb25f910

4 years agoPDL: Add for_struct to GenExtractor
Myles Watson [Wed, 2 Oct 2019 22:01:15 +0000 (15:01 -0700)]
PDL: Add for_struct to GenExtractor

Enable field-specific size checks when parsing structs.

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I3a8d132d1277fda027d5a6df61cdfb55b5519e02

4 years agoLegacy portion of btm shim layer
Chris Manton [Tue, 1 Oct 2019 18:26:49 +0000 (11:26 -0700)]
Legacy portion of btm shim layer

bug: 141963466
Test: Boots into old stack; no crash in new stack

Change-Id: I021a7f2f446a17bc4f1c1fbbd36cf1227ca6705e

4 years agoL2cap dynamic channel and service
Hansong Zhang [Tue, 10 Sep 2019 23:12:05 +0000 (16:12 -0700)]
L2cap dynamic channel and service

Add internal implementation for ClassicDynamicChannel
Signalling packets will be handled in next commit

Test: cert/run_cert.sh and bluetooth_test_gd
Bug: 138260719
Change-Id: I3b0fee9837034988e6490372ffbfd5ece90250f7

4 years agoMerge "GD HCI: implement connection management commands of AclManager"
Myles Watson [Thu, 3 Oct 2019 13:30:25 +0000 (06:30 -0700)]
Merge "GD HCI: implement connection management commands of AclManager"
am: 5e1008b66d

Change-Id: Ic9eff5b2e97749c50db7d6f4e85edc850485d77a

4 years agoMerge "GD HCI: implement connection management commands of AclManager"
Myles Watson [Thu, 3 Oct 2019 13:12:16 +0000 (13:12 +0000)]
Merge "GD HCI: implement connection management commands of AclManager"

4 years agoGD HCI: implement connection management commands of AclManager
Chienyuan [Wed, 2 Oct 2019 07:18:55 +0000 (15:18 +0800)]
GD HCI: implement connection management commands of AclManager

Bug: 139700781
Test: run_device_cert.sh
Change-Id: Ic8d91568114419f3c7508a252887aca32cec316f

4 years agoMerge "Legacy portion of l2cap shim layer"
Chris Manton [Thu, 3 Oct 2019 04:29:42 +0000 (21:29 -0700)]
Merge "Legacy portion of l2cap shim layer"
am: 1008e12380

Change-Id: Ie53e91da17ce3d21e36f570cc4196fbdaa5747ee

4 years agoMerge "Legacy portion of l2cap shim layer"
Chris Manton [Thu, 3 Oct 2019 04:03:46 +0000 (04:03 +0000)]
Merge "Legacy portion of l2cap shim layer"

4 years agoMerge "ServiceDiscoveryProtocol DB Full"
Joseph Pirozzo [Thu, 3 Oct 2019 00:22:55 +0000 (17:22 -0700)]
Merge "ServiceDiscoveryProtocol DB Full"
am: a4908ca0aa

Change-Id: I34052088b9302b71105ec4a7f6e302422662d364

4 years agoMerge "L2CAP: Use VariableSizeStruct in config options"
Myles Watson [Thu, 3 Oct 2019 00:22:09 +0000 (17:22 -0700)]
Merge "L2CAP: Use VariableSizeStruct in config options"
am: dac0f6f204

Change-Id: I84ae64725d823f244de6f881c03423cfaedb0456

4 years agoMerge "ServiceDiscoveryProtocol DB Full"
Joseph Pirozzo [Thu, 3 Oct 2019 00:03:52 +0000 (00:03 +0000)]
Merge "ServiceDiscoveryProtocol DB Full"

4 years agoAdd Read Number of Supported Iac complete
Chris Manton [Wed, 2 Oct 2019 23:51:58 +0000 (16:51 -0700)]
Add Read Number of Supported Iac complete

Test: Compiles
Change-Id: If3944596f1196483522f0f52819d2a2ec52f2e14

4 years agoMerge "L2CAP: Use VariableSizeStruct in config options"
Myles Watson [Wed, 2 Oct 2019 23:52:16 +0000 (23:52 +0000)]
Merge "L2CAP: Use VariableSizeStruct in config options"

4 years agoAdd Read Page Timeout Complete View
Chris Manton [Wed, 2 Oct 2019 23:13:31 +0000 (16:13 -0700)]
Add Read Page Timeout Complete View

Test: Compiles
Change-Id: I63d9ac31ba47c4914498854a62939b067103bced

4 years agoLegacy portion of l2cap shim layer
Chris Manton [Mon, 30 Sep 2019 17:52:55 +0000 (10:52 -0700)]
Legacy portion of l2cap shim layer

bug: 141759087
Test: Boots into old stack; no crash in new stack
Change-Id: I0455bb67e12a9751084a6aaef61760a4ce2d77b7

4 years agoMerge "Use the same fixed channel allocator for both Classic and LE connections"
Jack He [Wed, 2 Oct 2019 21:19:33 +0000 (14:19 -0700)]
Merge "Use the same fixed channel allocator for both Classic and LE connections"
am: f7a196eb41

Change-Id: Id2de9d708b83e1ff3b36805c62adf8c350c84391

4 years agoMerge "Implement LE L2CAP Fixed Channel"
Jack He [Wed, 2 Oct 2019 21:18:15 +0000 (14:18 -0700)]
Merge "Implement LE L2CAP Fixed Channel"
am: 3d25ace3ea

Change-Id: Idc3a8a4f1b979bf3f10bacc48e02677299aae489

4 years agoPDL: Only find offsets from the beginning for structs
Myles Watson [Wed, 2 Oct 2019 21:02:51 +0000 (14:02 -0700)]
PDL: Only find offsets from the beginning for structs
am: 1163910ba4

Change-Id: I4553da364f1867b6dc0d196ae74b588f23d70c5e

4 years agoMerge "Use the same fixed channel allocator for both Classic and LE connections"
Treehugger Robot [Wed, 2 Oct 2019 20:56:32 +0000 (20:56 +0000)]
Merge "Use the same fixed channel allocator for both Classic and LE connections"

4 years agoMerge "Implement LE L2CAP Fixed Channel"
Treehugger Robot [Wed, 2 Oct 2019 20:55:24 +0000 (20:55 +0000)]
Merge "Implement LE L2CAP Fixed Channel"

4 years agoPDL: Inline ParseStruct functions
Myles Watson [Wed, 2 Oct 2019 15:15:15 +0000 (08:15 -0700)]
PDL: Inline ParseStruct functions
am: 1cc9455ff1

Change-Id: Ie78fca2eb7bf2a3d8d5fffe06f30e0a8e489d969

4 years agoL2CAP: Use VariableSizeStruct in config options
Myles Watson [Thu, 11 Jul 2019 23:17:05 +0000 (16:17 -0700)]
L2CAP: Use VariableSizeStruct in config options

Test: l2cap_packets_test
Change-Id: I8876dfe91a2bd059156131b51ba6609e112c64e8

4 years agoPDL: Only find offsets from the beginning for structs
Myles Watson [Tue, 1 Oct 2019 17:09:15 +0000 (10:09 -0700)]
PDL: Only find offsets from the beginning for structs

Test: bluetooth_packet_parser_test
Change-Id: I9c7286ad8fa04b1b9cff3062730da0a5778938bd

4 years agoPDL: Inline ParseStruct functions
Myles Watson [Wed, 2 Oct 2019 00:08:29 +0000 (17:08 -0700)]
PDL: Inline ParseStruct functions

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I9656f00bf3e1ca8a26def02df030ca1fa8f87151

4 years agoUse the same fixed channel allocator for both Classic and LE connections
Jack He [Wed, 2 Oct 2019 03:44:04 +0000 (20:44 -0700)]
Use the same fixed channel allocator for both Classic and LE connections

* Merge identical logic for fixed channel allocation among Classic and
  LE fixed channel connections
* Use Classic mocks as a place holder to write tests for
  L2capFixedChannelAllocatorTest

Test: bluetooth_test_gd
Bug: 140938432
Change-Id: Ibff6cb2c3120d967efe828e91cb8f9f2bdefc398

4 years agoImplement LE L2CAP Fixed Channel
Jack He [Fri, 27 Sep 2019 01:27:41 +0000 (18:27 -0700)]
Implement LE L2CAP Fixed Channel

* Implemented LE fixed channel implementation with reference from classic
  fixed channel implementation
* Adjusted LE specific logic in link manager and other related
  components
* Added address type across the LE fixed channel stack
* Adjusted unit test for LE fixed channel cases

Bug: 140938432
Test: bluetooth_test_gd
Change-Id: I7c5cd27e917efa1e72dce05828c26146c10797c2

4 years agoL2CAP Classic dynamic channel and allocator impl
Hansong Zhang [Wed, 2 Oct 2019 00:07:32 +0000 (17:07 -0700)]
L2CAP Classic dynamic channel and allocator impl
am: ff4f4a4560

Change-Id: I3cc94bfac35d2e817d2e64c8fc0c2f06dcff7138

4 years agoL2CAP Classic dynamic channel and allocator impl
Hansong Zhang [Tue, 1 Oct 2019 18:06:32 +0000 (11:06 -0700)]
L2CAP Classic dynamic channel and allocator impl

Reland I15f40c6b55d180003afaa14252c576b1b2a5e25e L2CAP Classic dynamic
channel and allocator impl, with the fix of NPE

Test: bluetooth_test_gd and cert/run_cert.sh
Bug: 138260719
Change-Id: I5c42dcb5871086903ac0f87441235ff75bfc8fdf

4 years agoServiceDiscoveryProtocol DB Full
Joseph Pirozzo [Tue, 1 Oct 2019 21:13:29 +0000 (14:13 -0700)]
ServiceDiscoveryProtocol DB Full

Increase the size of the local SDP DB to cope with newer phones supporting
more Bluetooth profiles.

Bug: 141889288
Test: pair Bluetooth device verify no warning "SDP - DB full add_attr"
Change-Id: I823ea6e178f098a0441efde4fb7d8e7fb68e38c0

4 years agoMerge "PDL: Enforce ENUM_STYLE"
Myles Watson [Tue, 1 Oct 2019 17:55:21 +0000 (10:55 -0700)]
Merge "PDL: Enforce ENUM_STYLE"
am: 3f6fd91360

Change-Id: Ie44a815dae8832e1ccb6a278dca04e0493701a36

4 years agoMerge "PDL: Enforce ENUM_STYLE"
Treehugger Robot [Tue, 1 Oct 2019 17:19:27 +0000 (17:19 +0000)]
Merge "PDL: Enforce ENUM_STYLE"

4 years agoMerge "PDL: Add variable-sized structs"
Myles Watson [Tue, 1 Oct 2019 08:07:02 +0000 (01:07 -0700)]
Merge "PDL: Add variable-sized structs"
am: c3e5d7d02d

Change-Id: I5091d53cd3dfe733d34f16c8f8c3c100a74d7811

4 years agoMerge "PDL: Add variable-sized structs"
Treehugger Robot [Tue, 1 Oct 2019 07:45:41 +0000 (07:45 +0000)]
Merge "PDL: Add variable-sized structs"

4 years agoMerge "Prevent bluetooth native crash during failed security authentication"
jonerlin [Tue, 1 Oct 2019 07:36:43 +0000 (00:36 -0700)]
Merge "Prevent bluetooth native crash during failed security authentication"
am: 591e541150

Change-Id: I3858edf01d828b3655617d2e24563a25b0a83c3b

4 years agoMerge "Prevent bluetooth native crash during failed security authentication"
Treehugger Robot [Tue, 1 Oct 2019 07:11:42 +0000 (07:11 +0000)]
Merge "Prevent bluetooth native crash during failed security authentication"

4 years agoPDL: Enforce ENUM_STYLE
Myles Watson [Mon, 30 Sep 2019 20:27:20 +0000 (13:27 -0700)]
PDL: Enforce ENUM_STYLE

Test: Compile a PDL file with CamelCase enum values
Change-Id: I11dbda43479550629ea539cb91941b0dabe79889

4 years agoPDL: Add variable-sized structs
Myles Watson [Wed, 25 Sep 2019 22:33:39 +0000 (15:33 -0700)]
PDL: Add variable-sized structs

Test: bluetooth_packet_parser_test
Change-Id: Ib003d3b9e125167c14c89bdca316d013dee9bd0d

4 years agoRevert "L2CAP Classic dynamic channel and allocator impl"
Hansong Zhang [Mon, 30 Sep 2019 23:13:24 +0000 (16:13 -0700)]
Revert "L2CAP Classic dynamic channel and allocator impl"
am: 64508b507e

Change-Id: Ifaa1d82a7904a2426024a0294bd1a07769dc3e0e

4 years agoRevert "L2CAP Classic dynamic channel and allocator impl"
Hansong Zhang [Mon, 30 Sep 2019 20:56:51 +0000 (20:56 +0000)]
Revert "L2CAP Classic dynamic channel and allocator impl"

This reverts commit 76559c16d6f1899495e601644363556eb587feea.

Reason for revert: Broke test!

Change-Id: If0ef8fc64ba16c7bded9d4849d5b09a4217489bf

4 years agoL2CAP Classic dynamic channel and allocator impl
Hansong Zhang [Sat, 28 Sep 2019 10:47:20 +0000 (03:47 -0700)]
L2CAP Classic dynamic channel and allocator impl
am: 76559c16d6

Change-Id: I8157a74ad9e9f3eb2b6cf996b49301c78a9900e9

4 years agoMerge "GD HCI: Add unittest for AclConnection"
Chienyuan [Fri, 27 Sep 2019 18:00:50 +0000 (11:00 -0700)]
Merge "GD HCI: Add unittest for AclConnection"
am: 4b01826fe7

Change-Id: Idf3404eceafe51dc06e41803686c2f6f9037935b

4 years agoL2CAP Classic dynamic channel and allocator impl
Hansong Zhang [Fri, 20 Sep 2019 21:25:59 +0000 (14:25 -0700)]
L2CAP Classic dynamic channel and allocator impl

Test: bluetooth_test_gd and cert/run_cert.sh
Bug: 138260719
Change-Id: I15f40c6b55d180003afaa14252c576b1b2a5e25e

4 years agoMerge "GD HCI: Add unittest for AclConnection"
Treehugger Robot [Fri, 27 Sep 2019 17:37:40 +0000 (17:37 +0000)]
Merge "GD HCI: Add unittest for AclConnection"

4 years agoPrevent bluetooth native crash during failed security authentication
jonerlin [Tue, 27 Aug 2019 17:12:41 +0000 (01:12 +0800)]
Prevent bluetooth native crash during failed security authentication

* Use-after-free issue cause Bluetooth native crash during failed security authentication
* fixes a regression caused by commit SHA 26d629c

Bug: 137828534
Test: pair with Bluetooth keyboard/carkit -> input incorrect PIN code.
Change-Id: Ia1f7dad678fc71ebf4af6b943c6a9e6102e67592

4 years agoGD HCI: Add unittest for AclConnection
Chienyuan [Fri, 27 Sep 2019 09:27:27 +0000 (17:27 +0800)]
GD HCI: Add unittest for AclConnection

Bug: 139700781
Test: run bluetooth_test_gd
Change-Id: I4bef1ad26b2cd4bc81e572b513852d94a8898899

4 years agoMerge "Change sec_state before resend pending command"
Vic Huang [Fri, 27 Sep 2019 07:19:30 +0000 (00:19 -0700)]
Merge "Change sec_state before resend pending command"
am: 248ab19ede

Change-Id: I9898d42f3353267096eaa946f71c31a423818d68

4 years agoMerge "Change sec_state before resend pending command"
Treehugger Robot [Fri, 27 Sep 2019 06:58:01 +0000 (06:58 +0000)]
Merge "Change sec_state before resend pending command"

4 years agoChange sec_state before resend pending command
Vic Huang [Sun, 15 Sep 2019 09:59:17 +0000 (17:59 +0800)]
Change sec_state before resend pending command

Description:
When phone trigger rfcomm create connection during pairing, the create
connection command will be saved to pending command array and wait for
resend.
When authentication completed, btm_sec_change_pairing_state is called to
change the pair state to idle and then resend the command in pending
command array if any. After that, stack set the sec_state to idle if
needed. (If sec_state is not idle, it means we are authenticating or
encrypting)

The issue is the resend command will not work as expected in function
btm_sec_execute_procedure because sec_state is not set to idle yet.

Solution:
Reorder the flow in btm_sec_auth_complete to make sure sec_state set to
idle if needed before invoking btm_sec_change_pairing_state(which resend
the command in the pending command array). And also set sec_flags to
BTM_SEC_AUTHENTICATED to avoid redundant authentication.

Bug: 131108715
Test: run sl4a to create rfcomm connection during pairing
(cmd)bta_bond
(cmd)rfcomm_connect <uuid>

Change-Id: I2521225610506db294d2ad8769f256705a4afaaa

4 years agoL2CAP dynamic channel API
Hansong Zhang [Fri, 27 Sep 2019 02:01:12 +0000 (19:01 -0700)]
L2CAP dynamic channel API
am: c229758ae5

Change-Id: Ic21837febbd85d1f0c90aa47621c8d21df1886e5

4 years agoL2CAP dynamic channel API
Hansong Zhang [Fri, 20 Sep 2019 21:14:01 +0000 (14:14 -0700)]
L2CAP dynamic channel API

Add API for Classic Dynamic Channel
Test: cert/run_cert.sh and bluetooth_test_gd
Bug: 138260719

Change-Id: I7afb0d7e540ae1c133c967045163e400f86e312a

4 years agoMerge "Disable leak detection locally."
Steven Moreland [Thu, 26 Sep 2019 18:55:56 +0000 (11:55 -0700)]
Merge "Disable leak detection locally."
am: 0d80b6ca6e

Change-Id: Icb84e8887e48e6c1a05a77835458b9430aa6f00e

4 years agoMerge "Disable leak detection locally."
Steven Moreland [Thu, 26 Sep 2019 18:48:54 +0000 (18:48 +0000)]
Merge "Disable leak detection locally."

4 years agoMerge changes I6266c445,I0d9e9296
Myles Watson [Thu, 26 Sep 2019 17:12:55 +0000 (10:12 -0700)]
Merge changes I6266c445,I0d9e9296
am: a30e8a0fd4

Change-Id: Iaf1fba9197bebb1420a1e63d85f5cd88a49c3b23

4 years agoMerge changes I6266c445,I0d9e9296
Myles Watson [Thu, 26 Sep 2019 17:05:05 +0000 (17:05 +0000)]
Merge changes I6266c445,I0d9e9296

* changes:
  A2DP: Don't wait for role switch when unsupported by the BT SoC
  A2DP: Don't wait for role switch on a blacklisted device

4 years agoA2DP: Don't wait for role switch when unsupported by the BT SoC
Cheney Ni [Thu, 26 Sep 2019 13:48:02 +0000 (21:48 +0800)]
A2DP: Don't wait for role switch when unsupported by the BT SoC

Bug: 141678907
Test: Do A2DP playback manually
Change-Id: I6266c44562da861cd342d040e0802cd832e4accb

4 years agoMerge "Rename to bluetooth_stack_with_facade"
Hansong Zhang [Thu, 26 Sep 2019 16:11:48 +0000 (09:11 -0700)]
Merge "Rename to bluetooth_stack_with_facade"
am: f4497d535b

Change-Id: Ide07d2f4631f747fafb5d9e47690f1105d48668c

4 years agoMerge "PDL: Use std::optional to signal Parse failure"
Myles Watson [Thu, 26 Sep 2019 16:11:09 +0000 (09:11 -0700)]
Merge "PDL: Use std::optional to signal Parse failure"
am: 1f7cb3653a

Change-Id: I965de0c9fa49153aa82d5e1cb4b0877e2b0716a8

4 years agoMerge "Rename to bluetooth_stack_with_facade"
Treehugger Robot [Thu, 26 Sep 2019 15:45:45 +0000 (15:45 +0000)]
Merge "Rename to bluetooth_stack_with_facade"

4 years agoA2DP: Don't wait for role switch on a blacklisted device
Cheney Ni [Wed, 25 Sep 2019 13:33:25 +0000 (21:33 +0800)]
A2DP: Don't wait for role switch on a blacklisted device

When there are 2 or more ACL links, we will try to be the master for
better link quality, and setup flags to wait for the following role
switch results. Because this is an asynchronous task, we would check
flags for any further actions. However, there would not be other results
for role switch IOP, and could be just ignored.

Bug: 141177108
Test: Add headset to IOP and do A2DP playback manually
Change-Id: I0d9e92968765365410909908ffcaf6dc81161ea0