OSDN Git Service

android-x86/system-bt.git
3 years agoMerge "metrics: don't crash if `address` is NULL" am: 8d9c4170bd
Treehugger Robot [Wed, 24 Mar 2021 18:59:23 +0000 (18:59 +0000)]
Merge "metrics: don't crash if `address` is NULL" am: 8d9c4170bd

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1649529

Change-Id: Ie4871353997995f48dde9ff97fe2348e2a7566b2

3 years agoMerge "btaa: Add the method of onActivityLogsReady into btif interface" am: 28669d1376
Mingguang Xu [Wed, 24 Mar 2021 18:57:35 +0000 (18:57 +0000)]
Merge "btaa: Add the method of onActivityLogsReady into btif interface" am: 28669d1376

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1646068

Change-Id: I1bf7612dfa0ce4e1783e7f23c48a821ed7a176d3

3 years agoMerge "metrics: don't crash if `address` is NULL"
Treehugger Robot [Wed, 24 Mar 2021 18:30:30 +0000 (18:30 +0000)]
Merge "metrics: don't crash if `address` is NULL"

3 years agoMerge "btaa: Add the method of onActivityLogsReady into btif interface"
Mingguang Xu [Wed, 24 Mar 2021 17:53:36 +0000 (17:53 +0000)]
Merge "btaa: Add the method of onActivityLogsReady into btif interface"

3 years agoRe-log btm_sec_check_upgrade am: f6cc9dc3f2
Chris Manton [Wed, 24 Mar 2021 07:22:38 +0000 (07:22 +0000)]
Re-log btm_sec_check_upgrade am: f6cc9dc3f2

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1646050

Change-Id: I1fbb3a843fd3198ca93fd09b3ca0994f91ca3351

3 years agoRemove dependency of the hci hal on activity attribution if the flag am: 57f5c8efda
Rahul Sabnis [Wed, 24 Mar 2021 05:02:09 +0000 (05:02 +0000)]
Remove dependency of the hci hal on activity attribution if the flag am: 57f5c8efda

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1650824

Change-Id: Ie84fccc97cca81d810b2934aa188f1c854349bcb

3 years agoRe-log btm_sec_check_upgrade
Chris Manton [Thu, 18 Mar 2021 21:16:37 +0000 (14:16 -0700)]
Re-log btm_sec_check_upgrade

Toward loggable code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Ib26183b2b63fcd9f877d876bb1d5d6954d82768c

3 years agoRemove dependency of the hci hal on activity attribution if the flag
Rahul Sabnis [Wed, 24 Mar 2021 00:30:38 +0000 (17:30 -0700)]
Remove dependency of the hci hal on activity attribution if the flag
value indicates it is not enabled. Adds activity attribution to gd
dumpsys.

Tag: #feature
Bug: 182283555
Test: Manual
Change-Id: I4c01dcda9d5a9b6e1273285fa32c95386329cf80

3 years agobtaa: Add the method of onActivityLogsReady into btif interface
Mingguang Xu [Fri, 19 Mar 2021 18:43:14 +0000 (11:43 -0700)]
btaa: Add the method of onActivityLogsReady into btif interface

The method of onActivityLogsReady will be used to pass BT activity logs
to BTAA core module to JNI.

Tag: #feature

Bug: 183215497
Bug: 170315554

Test: m

Signed-off-by: Mingguang Xu <mingguangxu@google.com>
Change-Id: I4dfeece15cb04a1b01fd5ad59da3bbceccecbf91

3 years agoMerge "Keystore 2.0: Remove references to Keystore 1" am: c66d329202
Treehugger Robot [Tue, 23 Mar 2021 22:59:00 +0000 (22:59 +0000)]
Merge "Keystore 2.0: Remove references to Keystore 1" am: c66d329202

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1650821

Change-Id: I103252d62202759b97769b41ce903ae44103e2e0

3 years agoRemove unnecessary transport param am: ea48c4a982
Chris Manton [Tue, 23 Mar 2021 22:53:40 +0000 (22:53 +0000)]
Remove unnecessary transport param am: ea48c4a982

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629066

Change-Id: Ia3064244b4454249e0ffc12835b9a2a3ff830770

3 years agoAdd API stacl/acl/acl to set default packet type bitmask am: 64c37aeab6
Chris Manton [Tue, 23 Mar 2021 22:53:28 +0000 (22:53 +0000)]
Add API stacl/acl/acl to set default packet type bitmask am: 64c37aeab6

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629065

Change-Id: Ied3416cdedde63d19c855d59a58aaa9650014e61

3 years agoMerge "Keystore 2.0: Remove references to Keystore 1"
Treehugger Robot [Tue, 23 Mar 2021 22:30:39 +0000 (22:30 +0000)]
Merge "Keystore 2.0: Remove references to Keystore 1"

3 years agoKeystore 2.0: Remove references to Keystore 1
Janis Danisevskis [Tue, 23 Mar 2021 20:30:32 +0000 (13:30 -0700)]
Keystore 2.0: Remove references to Keystore 1

Test: N/A
Bug: 171305684
Change-Id: I4a09c24e18bef4361dc4b75e6df665a9d38689f9

3 years agoRemove unnecessary transport param
Chris Manton [Thu, 11 Mar 2021 21:52:23 +0000 (13:52 -0800)]
Remove unnecessary transport param

Can only set packets on classic/BR_EDR

Bug: 163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: Icf38654478a36671775d34c716bb86f6636bbffe

3 years agoAdd API stacl/acl/acl to set default packet type bitmask
Chris Manton [Thu, 11 Mar 2021 21:42:51 +0000 (13:42 -0800)]
Add API stacl/acl/acl to set default packet type bitmask

Bug: 182370398
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Idc91e1dba6784d4989adcf10c4f94b468bd535c6

3 years agoHandle dual mode device with same address in bta_dm_remove_device am: e25f9378b9
Chienyuan [Tue, 23 Mar 2021 19:29:43 +0000 (19:29 +0000)]
Handle dual mode device with same address in bta_dm_remove_device am: e25f9378b9

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1650170

Change-Id: Ia2ce0da1020fc005eb170ff9d4343b184a8ca4b2

3 years agoHandle dual mode device with same address in bta_dm_remove_device
Chienyuan [Tue, 23 Mar 2021 15:09:16 +0000 (23:09 +0800)]
Handle dual mode device with same address in bta_dm_remove_device

Tag: #refactor
Bug: 183065766
Test: manual
Change-Id: Iff1b1c640b96606fa2dcdf49d30d2fa9a50ff891

3 years agoMerge "[LSC] Add LOCAL_LICENSE_KINDS to system/bt" am: 34e931422b
Treehugger Robot [Tue, 23 Mar 2021 13:49:36 +0000 (13:49 +0000)]
Merge "[LSC] Add LOCAL_LICENSE_KINDS to system/bt" am: 34e931422b

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1649539

Change-Id: I890c698dcb192b878274e064432f8305774971e6

3 years agoMerge "[LSC] Add LOCAL_LICENSE_KINDS to system/bt"
Treehugger Robot [Tue, 23 Mar 2021 13:23:49 +0000 (13:23 +0000)]
Merge "[LSC] Add LOCAL_LICENSE_KINDS to system/bt"

3 years agoInclude new hci_role file am: c4e9d02ab1
Chris Manton [Tue, 23 Mar 2021 07:59:31 +0000 (07:59 +0000)]
Include new hci_role file am: c4e9d02ab1

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629206

Change-Id: If887fe7dc784a1e3ae3801da07e54930692fe2e6

3 years agoInclude new hci_role file
Chris Manton [Wed, 10 Mar 2021 16:01:37 +0000 (08:01 -0800)]
Include new hci_role file

Bug: 179120287
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I22043f815a33ee0459a4a609080651ede5a60bbe

3 years agogd: Add Unregister::acl_manager classic/le am: eef2dfe4a5
Chris Manton [Tue, 23 Mar 2021 04:09:38 +0000 (04:09 +0000)]
gd: Add Unregister::acl_manager classic/le am: eef2dfe4a5

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1648789

Change-Id: I693dd7918ab50b3c8e3c4c7cc1cedcd418d520b1

3 years ago[LSC] Add LOCAL_LICENSE_KINDS to system/bt
Bob Badour [Tue, 23 Mar 2021 02:02:24 +0000 (19:02 -0700)]
[LSC] Add LOCAL_LICENSE_KINDS to system/bt

Added SPDX-license-identifier-Apache-2.0 to:
  vendor_libs/test_vendor_lib/data/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I71d5736f416cfcc807029047f6358a6558c81ad3

3 years agogd: Add Unregister::acl_manager classic/le
Chris Manton [Thu, 11 Mar 2021 00:30:47 +0000 (16:30 -0800)]
gd: Add Unregister::acl_manager classic/le

Synchronize stack shutdown

Bug: 176960731
Test: bluetooth_test_gd --gtest_filter=AclManagerLifeCycleTest.*
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Iad2b6ce5f93f3aa3c9676179d9353cfa9f679fcd

3 years agoBTMLogHistory: Add HID device open/close am: 4d4697462b
Chris Manton [Mon, 22 Mar 2021 23:16:11 +0000 (23:16 +0000)]
BTMLogHistory: Add HID device open/close am: 4d4697462b

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1642952

Change-Id: I3f13463bead186fdad45cc18e7592c97ae2431f7

3 years agometrics: don't crash if `address` is NULL
George Burgess IV [Mon, 22 Mar 2021 22:13:18 +0000 (15:13 -0700)]
metrics: don't crash if `address` is NULL

We check earlier if `address != nullptr` in this function; it stands to
reason that we should have the same check here, as well.

Potential use of null was caught by the static analyzer:
> system/bt/gd/common/metrics.cc:74:9: warning: Called C++ object
pointer is null [clang-analyzer-core.CallAndMessage]

Tag: #security
Bug: 181819141
Test: TreeHugger
Change-Id: I4baf5fe648c8fd841875515b024e1658b7ea20cd

3 years agoBTMLogHistory: Add HID device open/close
Chris Manton [Wed, 17 Mar 2021 16:46:55 +0000 (09:46 -0700)]
BTMLogHistory: Add HID device open/close

Toward loggable code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I2201febbce720a2534800e7e9c69d31b0f8b0ced

3 years agoMerge "GD metrics: Add shim layers for metrics in GD 1) Add shim layer for MetricIdMa...
Treehugger Robot [Mon, 22 Mar 2021 20:33:38 +0000 (20:33 +0000)]
Merge "GD metrics: Add shim layers for metrics in GD 1) Add shim layer for MetricIdManager 2) Add shim layer for metric logging functions who take metric id 3) reference the 2 shim layers at btif/, main/shim and stack/" am: ed1b5fd0d7

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1627280

Change-Id: I960b2403ed0f73e6852c3720d3e163dc36cb9912

3 years agoRevert "gd: Add Unregister::acl_manager classic/le" am: bcece23223
Chris Manton [Mon, 22 Mar 2021 20:32:42 +0000 (20:32 +0000)]
Revert "gd: Add Unregister::acl_manager classic/le" am: bcece23223

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1648788

Change-Id: I73c5cbdc2b27e3b3f4733cd4758eb30615c807ae

3 years agoMerge "rusty-gd: Add controller facade service." am: 9d623f3d2f
Qasim Javed [Mon, 22 Mar 2021 20:30:53 +0000 (20:30 +0000)]
Merge "rusty-gd: Add controller facade service." am: 9d623f3d2f

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1647427

Change-Id: Ifec14b8b163cf310e6b45daff8e08d4b7807416f

3 years agoMerge "GD metrics: Add shim layers for metrics in GD 1) Add shim layer for MetricIdMa...
Treehugger Robot [Mon, 22 Mar 2021 20:25:21 +0000 (20:25 +0000)]
Merge "GD metrics: Add shim layers for metrics in GD 1) Add shim layer for MetricIdManager 2) Add shim layer for metric logging functions who take metric id 3) reference the 2 shim layers at btif/, main/shim and stack/"

3 years agoRevert "gd: Add Unregister::acl_manager classic/le"
Chris Manton [Mon, 22 Mar 2021 18:12:27 +0000 (18:12 +0000)]
Revert "gd: Add Unregister::acl_manager classic/le"

This reverts commit f0436493c05fe8d70375f461bc7e158b94f74e9b.
Bug:183349791
Tag: #refactor
Test: Builds
Reason for revert: broke

Change-Id: Idb2a6845b9740a6112eabf0e40985d0a972c2ea3

3 years agoMerge "rusty-gd: Add controller facade service."
Qasim Javed [Mon, 22 Mar 2021 19:49:25 +0000 (19:49 +0000)]
Merge "rusty-gd: Add controller facade service."

3 years agoMerge "Make controller prop and default commands configurable in rootcanal" am: 5f74f...
Treehugger Robot [Mon, 22 Mar 2021 18:55:58 +0000 (18:55 +0000)]
Merge "Make controller prop and default commands configurable in rootcanal" am: 5f74f42d4a

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629269

Change-Id: I35d19d73b3fbca4874c540d0ee64727ebdd62980

3 years agoMerge "Make controller prop and default commands configurable in rootcanal"
Treehugger Robot [Mon, 22 Mar 2021 17:59:19 +0000 (17:59 +0000)]
Merge "Make controller prop and default commands configurable in rootcanal"

3 years agogd: Add Unregister::acl_manager classic/le am: f0436493c0
Chris Manton [Sun, 21 Mar 2021 00:58:52 +0000 (00:58 +0000)]
gd: Add Unregister::acl_manager classic/le am: f0436493c0

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1646056

Change-Id: Ica879daee72ad6756249a52190dd183df3fa71df

3 years agoSpecial case -INT_MAX for hex conversion am: f0ba72bb42
Chris Manton [Sat, 20 Mar 2021 06:12:29 +0000 (06:12 +0000)]
Special case -INT_MAX for hex conversion am: f0ba72bb42

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1646055

Change-Id: I3e784fed297f129f62498f49cb7013b768331801

3 years agogd: Add Unregister::acl_manager classic/le
Chris Manton [Thu, 11 Mar 2021 00:30:47 +0000 (16:30 -0800)]
gd: Add Unregister::acl_manager classic/le

Synchronize stack shutdown

Bug: 176960731
Test: bluetooth_test_gd --gtest_filter=AclManagerLifeCycleTest.*
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Ic7a41bbcb01dd61c5db7f4326daa8dd6585cbe86

3 years agoSpecial case -INT_MAX for hex conversion
Chris Manton [Fri, 19 Mar 2021 06:20:21 +0000 (23:20 -0700)]
Special case -INT_MAX for hex conversion

Bug: 183171310
Test: bluetooth_test_gd --gtest_filter=StringsTest*
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I4150f4f6dc3445e4853bea51c68eee26e891e45a

3 years agoMerge changes Ic1f5b589,I34e05959 am: 3ea5a36745
Treehugger Robot [Sat, 20 Mar 2021 02:27:34 +0000 (02:27 +0000)]
Merge changes Ic1f5b589,I34e05959 am: 3ea5a36745

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1646072

Change-Id: I32dedbc0b37ce6bfa06eacfd6f742b109511bf37

3 years agoMerge changes Ic1f5b589,I34e05959
Treehugger Robot [Sat, 20 Mar 2021 01:56:00 +0000 (01:56 +0000)]
Merge changes Ic1f5b589,I34e05959

* changes:
  PDL: Add more tests for C++
  GD: Include init_flags where used

3 years agoCert: OOB Test, verify different data. am: d06d953590
Martin Brabham [Sat, 20 Mar 2021 00:47:42 +0000 (00:47 +0000)]
Cert: OOB Test, verify different data. am: d06d953590

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1604953

Change-Id: I802f11f085ac3f04e867cae7c2767e0f87f4b3a3

3 years agoCert: OOB Test, verify different data.
Martin Brabham [Wed, 24 Feb 2021 01:48:32 +0000 (17:48 -0800)]
Cert: OOB Test, verify different data.

This test ensures that the data fetched is always different.

Bug: 178007935
Test: cert/run SecurityTest:test_make_sure_oob_data_different
Tag: #gd-refactor
Change-Id: I1847eebdcead9e13cb4bc2d8eb86cdb63bcaf978

3 years agorusty-gd: Add controller facade service.
Qasim Javed [Tue, 16 Mar 2021 19:55:53 +0000 (12:55 -0700)]
rusty-gd: Add controller facade service.

The ControllerTest pass with this change.

ControllerExports is currently not being updated as a result of
set_local_name. That will be handled as a follow up.

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost ControllerTest

Change-Id: I1ceca00bac74451e915518288108ba149750dc6f

3 years agoMerge "IBluetoothManager: Update createBondOutOfBand interface" am: bf1156d1c1
Treehugger Robot [Fri, 19 Mar 2021 21:37:27 +0000 (21:37 +0000)]
Merge "IBluetoothManager: Update createBondOutOfBand interface" am: bf1156d1c1

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1559439

Change-Id: I74b3a1e3e8208933e1e920b40091bf3b38e9e519

3 years agoPDL: Add more tests for C++
Myles Watson [Fri, 19 Mar 2021 20:50:53 +0000 (13:50 -0700)]
PDL: Add more tests for C++

Bug: 182216573
Test: atest bluetooth_test_gd
Tag: #gd-refactor
Change-Id: Ic1f5b5897451fcf31eb5b1b0b64426eb5ad2b1f7

3 years agoMerge "IBluetoothManager: Update createBondOutOfBand interface"
Treehugger Robot [Fri, 19 Mar 2021 21:13:17 +0000 (21:13 +0000)]
Merge "IBluetoothManager: Update createBondOutOfBand interface"

3 years agoGD: Include init_flags where used
Myles Watson [Fri, 12 Mar 2021 17:13:09 +0000 (09:13 -0800)]
GD: Include init_flags where used

Bug: 182586624
Tag: #gd-refactor
Test: cert/run
Change-Id: I34e05959b0167740f4e6c426c5f36c54d8d65c6e

3 years agoGD metrics: Add shim layers for metrics in GD
Chen Chen [Wed, 10 Mar 2021 23:41:42 +0000 (15:41 -0800)]
GD metrics: Add shim layers for metrics in GD
1) Add shim layer for MetricIdManager
2) Add shim layer for metric logging functions who take metric id
3) reference the 2 shim layers at btif/, main/shim and stack/

Bug: 181819141
Test: atest bluetooth_test_gd
Manual test by printing log at legacy stack and gd stack to make sure
function calls, parameters and callbacks are fowarded correctly

Change-Id: Ic5ee1ef95a7e4d7683de328ac78894986ba5011e

3 years agoMerge "Marking bluetooth_test_gd as not unit tests" am: 4ac7b735a2
Julien Desprez [Fri, 19 Mar 2021 17:02:41 +0000 (17:02 +0000)]
Merge "Marking bluetooth_test_gd as not unit tests" am: 4ac7b735a2

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1624644

Change-Id: Iad8d903eb99963297e19982b5d0ee7ace31f78c3

3 years agoMerge "Marking bluetooth_test_gd as not unit tests"
Julien Desprez [Fri, 19 Mar 2021 16:20:13 +0000 (16:20 +0000)]
Merge "Marking bluetooth_test_gd as not unit tests"

3 years agoGD metrics: add logging definitions to GD am: 4676225d0f
Chen Chen [Wed, 17 Mar 2021 19:45:33 +0000 (19:45 +0000)]
GD metrics: add logging definitions to GD am: 4676225d0f

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1638300

Change-Id: If17e107875050ae1274ca840543569dd1b01eeb0

3 years agoGD metrics: add logging definitions to GD
Chen Chen [Tue, 9 Mar 2021 21:20:13 +0000 (13:20 -0800)]
GD metrics: add logging definitions to GD

Test: atest bluetooth_test_gd
Bug: 181819141

Change-Id: I1a49859c6ca93e196e95f6e230c15af094fae57b

3 years agoUse proper types tHCI_ROLE am: 5b1000785f
Chris Manton [Tue, 16 Mar 2021 19:17:52 +0000 (19:17 +0000)]
Use proper types tHCI_ROLE am: 5b1000785f

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629205

Change-Id: Iaa91062b8de2873ff48e26aab4e90aa24ee48865

3 years agoBreak out tHCI_ROLE type into separate file am: 1c1ddde827
Chris Manton [Tue, 16 Mar 2021 19:17:12 +0000 (19:17 +0000)]
Break out tHCI_ROLE type into separate file am: 1c1ddde827

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629204

Change-Id: Ib79ff239fda650189859183d6a4722fe7f446c99

3 years agoIBluetoothManager: Update createBondOutOfBand interface
Martin Brabham [Thu, 21 Jan 2021 18:37:43 +0000 (10:37 -0800)]
IBluetoothManager: Update createBondOutOfBand interface

Add plumbing for both p192 and p256 data types.

Ignore-AOSP-First: Conflicts with CL previously merged internal
Bug: 178007935
Test: atest net_test_btif
Tag: #refactor
Change-Id: I6b1424c22495821bfbbf56830f3848e6c03b74d4
Merged-In: I6b1424c22495821bfbbf56830f3848e6c03b74d4

3 years agogd_acl: No need to read remote version twice am: 505a752435
Chris Manton [Mon, 15 Mar 2021 18:45:45 +0000 (18:45 +0000)]
gd_acl: No need to read remote version twice am: 505a752435

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1632994

Change-Id: Ib7ad3976f63abaa8a522c48d927ed79d5bf2a2bb

3 years agogd_acl: On classic connect issue read supported features am: 0fb0d8c33f
Chris Manton [Mon, 15 Mar 2021 18:45:40 +0000 (18:45 +0000)]
gd_acl: On classic connect issue read supported features am: 0fb0d8c33f

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1632993

Change-Id: Id6a93b24b69c725ddcf631f77ddf46eb0c599070

3 years agoConvert bluetooth::shim::BtmStatus from 16 to 8 bits am: 9d9c9e1599
Chris Manton [Mon, 15 Mar 2021 18:45:37 +0000 (18:45 +0000)]
Convert bluetooth::shim::BtmStatus from 16 to 8 bits am: 9d9c9e1599

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629203

Change-Id: Ib082a5c1260492ffad0963d94f08a6779e0131cc

3 years agoProperly log btm_read_failed_contact_counter_complete am: 4169b42315
Chris Manton [Mon, 15 Mar 2021 18:45:35 +0000 (18:45 +0000)]
Properly log btm_read_failed_contact_counter_complete am: 4169b42315

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629202

Change-Id: Id6161fc000314372dffe6c111615ca921eb890f2

3 years agoProperly declare tACL_CONN::tPolicy::Role() am: c7b63f3984
Chris Manton [Mon, 15 Mar 2021 18:45:32 +0000 (18:45 +0000)]
Properly declare tACL_CONN::tPolicy::Role() am: c7b63f3984

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629201

Change-Id: Ic3789f24220ac5a5cde71dfcb2a072a67d238c18

3 years agoAdd stack/include/hcidefs::hci_role helpers and aliases am: 462f3c181c
Chris Manton [Mon, 15 Mar 2021 18:45:30 +0000 (18:45 +0000)]
Add stack/include/hcidefs::hci_role helpers and aliases am: 462f3c181c

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629200

Change-Id: Ib88b74aed5af735f70034589c307513c22d73a87

3 years agoConst-ify stack/acl/btm_acl::packet types defs am: 9e550caf1d
Chris Manton [Mon, 15 Mar 2021 18:45:27 +0000 (18:45 +0000)]
Const-ify stack/acl/btm_acl::packet types defs am: 9e550caf1d

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629199

Change-Id: I415f7f6d1d181d8bb49f2c9e38923df3b9705b53

3 years agotBTM_AUTH_COMPLETE_CALLBACK Specialize result to HCI_STATUS am: 4600433399
Chris Manton [Mon, 15 Mar 2021 18:45:24 +0000 (18:45 +0000)]
tBTM_AUTH_COMPLETE_CALLBACK Specialize result to HCI_STATUS am: 4600433399

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1628904

Change-Id: Ie70644611bdca8d7ca935332685e05bdbfdf6b65

3 years agoMove callback definitions to stack/include/security_client_callbacks am: a10232648d
Chris Manton [Mon, 15 Mar 2021 18:45:22 +0000 (18:45 +0000)]
Move callback definitions to stack/include/security_client_callbacks am: a10232648d

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1628903

Change-Id: Ifff75fbcc6bd0e9a906ea8b054897a38d57ad334

3 years agoProperly type tBTA_AV_STATUS am: 403162ff12
Chris Manton [Mon, 15 Mar 2021 18:45:18 +0000 (18:45 +0000)]
Properly type tBTA_AV_STATUS am: 403162ff12

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629519

Change-Id: I9eab9118d91cf3348e8f6d05d9c8a0262a9c85a4

3 years agoRemove useless bta_dm_authentication_complete_cback return value am: 45dd8c98b3
Chris Manton [Mon, 15 Mar 2021 18:44:35 +0000 (18:44 +0000)]
Remove useless bta_dm_authentication_complete_cback return value am: 45dd8c98b3

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1628902

Change-Id: I2bb2485bdcb4492191e688abba0e5a5572dc7ee3

3 years agoUse proper types tHCI_ROLE
Chris Manton [Wed, 10 Mar 2021 03:12:57 +0000 (19:12 -0800)]
Use proper types tHCI_ROLE

Bug: 179120287
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I6fd932fa39b4d7ea8b88db0877806a636a90deed

3 years agoBreak out tHCI_ROLE type into separate file
Chris Manton [Wed, 10 Mar 2021 02:48:38 +0000 (18:48 -0800)]
Break out tHCI_ROLE type into separate file

Used throughout stack

Bug: 179120287
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I6a4cb56561d8afbb6715e7598903b0fc6428a950

3 years agogd_acl: No need to read remote version twice
Chris Manton [Fri, 12 Mar 2021 06:30:22 +0000 (22:30 -0800)]
gd_acl: No need to read remote version twice

Bug: 166280067
Test: Manual verification via wireshark
Tag: #refactor

Change-Id: I2296b99a2bbcfb3adb9585e6541fc21d726fd9eb

3 years agogd_acl: On classic connect issue read supported features
Chris Manton [Fri, 12 Mar 2021 16:46:05 +0000 (08:46 -0800)]
gd_acl: On classic connect issue read supported features

Bug: 182568571
Test: Verified on 2.0 device
Tag: #refactor
Change-Id: Ib4d443d9cd0febfa7f82d84313eed280652fd0e9

3 years agoConvert bluetooth::shim::BtmStatus from 16 to 8 bits
Chris Manton [Tue, 9 Mar 2021 21:07:17 +0000 (13:07 -0800)]
Convert bluetooth::shim::BtmStatus from 16 to 8 bits

Align with rest of stack.

Bug: 166280067
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I151c0551e7ebc8e0ecd57695373247ad0bb83a73

3 years agoProperly log btm_read_failed_contact_counter_complete
Chris Manton [Wed, 10 Mar 2021 03:45:40 +0000 (19:45 -0800)]
Properly log btm_read_failed_contact_counter_complete

Bug: 179120287
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I6501d6cfc3193d2e6ae9196b89321f0c857946f9

3 years agoProperly declare tACL_CONN::tPolicy::Role()
Chris Manton [Wed, 10 Mar 2021 03:08:36 +0000 (19:08 -0800)]
Properly declare tACL_CONN::tPolicy::Role()

Bug: 179120287
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I6cf33ae3c9a28024c54b7d448c13426e9effe808

3 years agoAdd stack/include/hcidefs::hci_role helpers and aliases
Chris Manton [Wed, 10 Mar 2021 17:22:58 +0000 (09:22 -0800)]
Add stack/include/hcidefs::hci_role helpers and aliases

Bug: 179120287
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I37ec49c8aaac76d49a0f96387129652975a6fa50

3 years agoConst-ify stack/acl/btm_acl::packet types defs
Chris Manton [Tue, 9 Mar 2021 23:29:58 +0000 (15:29 -0800)]
Const-ify stack/acl/btm_acl::packet types defs

Bug: 182370398
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I84063d5c4ada9156f5c9d200b2c0a534cb403eb9

3 years agotBTM_AUTH_COMPLETE_CALLBACK Specialize result to HCI_STATUS
Chris Manton [Thu, 11 Mar 2021 18:28:17 +0000 (10:28 -0800)]
tBTM_AUTH_COMPLETE_CALLBACK Specialize result to HCI_STATUS

Toward proper typechecked code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor

Change-Id: Ia79398d099f9987b52ecd86decc66c810205bab2

3 years agoMove callback definitions to stack/include/security_client_callbacks
Chris Manton [Thu, 11 Mar 2021 18:26:44 +0000 (10:26 -0800)]
Move callback definitions to stack/include/security_client_callbacks

Toward readable code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor

Change-Id: Ia1f70c108d89132a1d993d4add703828c088f60c

3 years agoProperly type tBTA_AV_STATUS
Chris Manton [Wed, 3 Mar 2021 01:56:01 +0000 (17:56 -0800)]
Properly type tBTA_AV_STATUS

Toward readable code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor

Change-Id: I28786af205d5a3bd9595b33e00aed2b953f4dee2

3 years agoRemove useless bta_dm_authentication_complete_cback return value
Chris Manton [Thu, 11 Mar 2021 18:09:09 +0000 (10:09 -0800)]
Remove useless bta_dm_authentication_complete_cback return value

Toward meaningful code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor

Change-Id: I55fea00a20a23ed917c00255cd992a0ad3eab86f

3 years agoMerge changes Ia06fbdda,I08306608,I8e43aee4 am: d78d569d2f
Treehugger Robot [Sat, 13 Mar 2021 04:45:39 +0000 (04:45 +0000)]
Merge changes Ia06fbdda,I08306608,I8e43aee4 am: d78d569d2f

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1633701

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4b6164c985ec0cb9ec23202e02de1a1b4f6ee72e

3 years agoMerge changes Ia06fbdda,I08306608,I8e43aee4
Treehugger Robot [Sat, 13 Mar 2021 04:21:44 +0000 (04:21 +0000)]
Merge changes Ia06fbdda,I08306608,I8e43aee4

* changes:
  HCI: Use 0x0123 for hex
  HCI: Add more PDL tests
  Only pad the previous field

3 years agoLog command status error conditions am: c41c785dcd
Chris Manton [Sat, 13 Mar 2021 00:25:54 +0000 (00:25 +0000)]
Log command status error conditions am: c41c785dcd

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1632938

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iabd70080fdf948897896f9ac882afe5be7175722

3 years agoLog command status error conditions
Chris Manton [Fri, 12 Mar 2021 03:01:53 +0000 (19:01 -0800)]
Log command status error conditions

Bug: 182524282
Test: Manual verification on failing scenario
Tag: #refactor
Change-Id: Ia76e97648c8091e2bde5a26b307d2779c21e6640

3 years agoHCI: Use 0x0123 for hex
Myles Watson [Fri, 12 Mar 2021 05:44:08 +0000 (21:44 -0800)]
HCI: Use 0x0123 for hex

Bug: 182216573
Test: atest bluetooth_test_gd
      libbt_packets_test
Tag: #gd-refactor
Change-Id: Ia06fbdda9101b77204c6ee3ba1c8c1edc81aa3bf

3 years agoHCI: Add more PDL tests
Myles Watson [Thu, 11 Mar 2021 21:10:23 +0000 (13:10 -0800)]
HCI: Add more PDL tests

Bug: 182216573
Test: atest bluetooth_test_gd
      libbt_packets_test
Tag: #gd-refactor
Change-Id: I083066083a519c19a8d5c3a4928b306e2495c512

3 years agoOnly pad the previous field
Myles Watson [Thu, 11 Mar 2021 18:05:47 +0000 (10:05 -0800)]
Only pad the previous field

Bug: 182216573
Test: atest bluetooth_test_gd
      libbt_packets_test
      bluetooth_packet_parser_test
Tag: #gd-refactor
Change-Id: I8e43aee420be58af81cd9f47fcf53a566af1b3fa

3 years agoMerge changes I389b26d7,I0a668115,I75ef0b5c am: 76b4ccafa4
Myles Watson [Fri, 12 Mar 2021 17:33:15 +0000 (17:33 +0000)]
Merge changes I389b26d7,I0a668115,I75ef0b5c am: 76b4ccafa4

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629663

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib629a94db4a8747a111dac22042ed4f059d067f3

3 years agoMerge changes I389b26d7,I0a668115,I75ef0b5c
Myles Watson [Fri, 12 Mar 2021 17:12:01 +0000 (17:12 +0000)]
Merge changes I389b26d7,I0a668115,I75ef0b5c

* changes:
  Alias iterator in packet-gen
  Use generic type for JsonParser
  Change dynamic_cast to static_cast

3 years agoAlias iterator in packet-gen
Erwin Jansen [Thu, 11 Mar 2021 22:53:15 +0000 (14:53 -0800)]
Alias iterator in packet-gen

The msvc compiler is unable to translate some of the generated code:

error: no viable conversion from 'std::array<uint8_t, 248>::iterator'
(aka '_Array_iterator<unsigned char, 248ULL>') to 'uint8_t *' (aka
'unsigned char *')

Instead of assigning the value to a ptr, we alias the iterator instead.

Test: atest bluetooth_test_gd
Tag: #gd-refactor
Bug: 182505215
Change-Id: I389b26d71ef5bd8f96ae819d34ce11590f14a5e6

3 years agoMake controller prop and default commands configurable in rootcanal
Jeongik Cha [Fri, 12 Mar 2021 08:02:13 +0000 (17:02 +0900)]
Make controller prop and default commands configurable in rootcanal

Test: set up default commands and then atest
  android.bluetooth.cts.BluetoothLeScanTest
Bug: 182508776
Bug: 182230648
Change-Id: I4958fee40b32f646fd162e495aac31eeab29a470

3 years agoMerge "PDL: For the Rust test, clone structs" am: 0ff14b0f8e
Treehugger Robot [Fri, 12 Mar 2021 03:11:15 +0000 (03:11 +0000)]
Merge "PDL: For the Rust test, clone structs" am: 0ff14b0f8e

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629062

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie97cca5d430ff3aa57d7e72f7ad7345547f55e22

3 years agoMerge "PDL: For the Rust test, clone structs"
Treehugger Robot [Fri, 12 Mar 2021 02:51:43 +0000 (02:51 +0000)]
Merge "PDL: For the Rust test, clone structs"

3 years agoMerge changes I86da8ca8,Ibb58fae9,I9c6a9fa3,I4d1ab599,I818c0f4a, ... am: f0b7aa6473
Treehugger Robot [Fri, 12 Mar 2021 02:47:56 +0000 (02:47 +0000)]
Merge changes I86da8ca8,Ibb58fae9,I9c6a9fa3,I4d1ab599,I818c0f4a, ... am: f0b7aa6473

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1613068

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0c39fc9d204633b8d7a5437953e7e28b4f6d6739

3 years agoMerge changes I86da8ca8,Ibb58fae9,I9c6a9fa3,I4d1ab599,I818c0f4a, ...
Treehugger Robot [Fri, 12 Mar 2021 02:19:33 +0000 (02:19 +0000)]
Merge changes I86da8ca8,Ibb58fae9,I9c6a9fa3,I4d1ab599,I818c0f4a, ...

* changes:
  Change libbt-platform-protos dependency
  Update the readme to use build.py and explain Rust
  Add build.py to simplify building locally
  Build support for Rust via Cargo
  Add option to build libbluetooth as staticlib
  Prevent building some codecs when not supported
  Build support and abstractions for Linux build
  Add source_root parameter to bluetooth_packetgen
  Fix bison 3.7 incompatability
  Host tools support

3 years agoMerge "HCI PDL: Fix formatting with spaces" am: bbcee0582f
Treehugger Robot [Thu, 11 Mar 2021 23:14:19 +0000 (23:14 +0000)]
Merge "HCI PDL: Fix formatting with spaces" am: bbcee0582f

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1629061

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I88b78ae4bc92386dd028677f1d9b414d52df21d0

3 years agoMerge "HCI PDL: Fix formatting with spaces"
Treehugger Robot [Thu, 11 Mar 2021 22:53:00 +0000 (22:53 +0000)]
Merge "HCI PDL: Fix formatting with spaces"

3 years agoMerge "Unbind cert_self_test from ACTS" am: b98ae0fcc1
Jizheng Chu [Thu, 11 Mar 2021 22:23:14 +0000 (22:23 +0000)]
Merge "Unbind cert_self_test from ACTS" am: b98ae0fcc1

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1614099

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id7b4be44a167319cfa2c9deb6f4e3fe81194fb67

3 years agoShim Scanning: Update address type and device type to storage am: 2d7a4e404b
Chienyuan [Thu, 11 Mar 2021 22:21:55 +0000 (22:21 +0000)]
Shim Scanning: Update address type and device type to storage am: 2d7a4e404b

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1626299

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4c81a579e9c72e5315bbbf249bd0ebec2ecef87b