OSDN Git Service

android-x86/system-bt.git
3 years agoMerge changes I7cc676cb,Ib2a58823,I2795f034,I5bb782f3,I6311bd6d, ... am: 308510f19d
Treehugger Robot [Fri, 7 May 2021 01:59:00 +0000 (01:59 +0000)]
Merge changes I7cc676cb,Ib2a58823,I2795f034,I5bb782f3,I6311bd6d, ... am: 308510f19d

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

Change-Id: I613ddfda3a826a1217dab5538991b80e6ce36ffa

3 years agoMerge changes I7cc676cb,Ib2a58823,I2795f034,I5bb782f3,I6311bd6d, ...
Treehugger Robot [Fri, 7 May 2021 01:07:58 +0000 (01:07 +0000)]
Merge changes I7cc676cb,Ib2a58823,I2795f034,I5bb782f3,I6311bd6d, ...

* changes:
  Add polling thread pid to hid control block
  Streamline stack/acl/btm_acl::BTM_SetLinkSuperTout
  Canonically include crypto in stack/gatt/gatt_sr_hash
  Canonically include stack/gatt::
  Include gd/hal/hci_hal_host::<netinet/in.h>
  Remove useless #def BTM_LE_BR_KEYS_REQ_EVT

3 years agoAdd polling thread pid to hid control block
Chris Manton [Wed, 5 May 2021 21:15:12 +0000 (14:15 -0700)]
Add polling thread pid to hid control block

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

Change-Id: I7cc676cb9af62d9aac1297e44b4bc590aa3380f6

3 years agoAsyncFd: clear_ready() before drop() am: 7258dad0d6
Hansong Zhang [Thu, 6 May 2021 23:08:24 +0000 (23:08 +0000)]
AsyncFd: clear_ready() before drop() am: 7258dad0d6

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

Change-Id: I1cecacbda21bfe9640ab6b7f82b18f9378966fae

3 years agoStreamline stack/acl/btm_acl::BTM_SetLinkSuperTout
Chris Manton [Thu, 29 Apr 2021 05:23:47 +0000 (22:23 -0700)]
Streamline stack/acl/btm_acl::BTM_SetLinkSuperTout

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

Change-Id: Ib2a588236e98317ef14b619d6416379e7ff35e4c

3 years agoCanonically include crypto in stack/gatt/gatt_sr_hash
Chris Manton [Thu, 6 May 2021 19:50:49 +0000 (12:50 -0700)]
Canonically include crypto in stack/gatt/gatt_sr_hash

There are 2 cryptos in this project

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

Change-Id: I2795f034d1d06d8e65645c22aec6dcaff2f5885e

3 years agoCanonically include stack/gatt::
Chris Manton [Thu, 6 May 2021 19:10:11 +0000 (12:10 -0700)]
Canonically include stack/gatt::

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

Change-Id: I5bb782f3d019535cd53129cfe450bb233c912975

3 years agoAsyncFd: clear_ready() before drop()
Hansong Zhang [Wed, 5 May 2021 23:11:39 +0000 (23:11 +0000)]
AsyncFd: clear_ready() before drop()

Otherwise select! won't continue to work.

Also we need rt-multi-thread for tokio::runtime::Runtime::new

Test: cargo test
Change-Id: I2b7cbf8bd93622f404f10b55df443daf5c1a19f2

3 years agoMerge "gd: Handle LE advertisement tracking sub-event" am: db191f3db3
Treehugger Robot [Thu, 6 May 2021 06:36:32 +0000 (06:36 +0000)]
Merge "gd: Handle LE advertisement tracking sub-event" am: db191f3db3

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

Change-Id: I025ce7f71a2b8fa3a4a92d03a2d9a1b3bf2af9b3

3 years agoMerge "gd: Handle LE advertisement tracking sub-event"
Treehugger Robot [Thu, 6 May 2021 06:19:21 +0000 (06:19 +0000)]
Merge "gd: Handle LE advertisement tracking sub-event"

3 years agoInclude gd/hal/hci_hal_host::<netinet/in.h>
Chris Manton [Thu, 6 May 2021 00:28:17 +0000 (17:28 -0700)]
Include gd/hal/hci_hal_host::<netinet/in.h>

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

Change-Id: I6311bd6d28f8df1d8786fb35ef7ba014f5aa8e8e

3 years agoRemove useless #def BTM_LE_BR_KEYS_REQ_EVT
Chris Manton [Wed, 5 May 2021 20:08:23 +0000 (13:08 -0700)]
Remove useless #def BTM_LE_BR_KEYS_REQ_EVT

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

Change-Id: Ifff03af11a65653e739785a4432157392d01817e

3 years agogd: Check stack is running before getting storage am: fa8926ba7b
Chienyuan [Thu, 6 May 2021 03:31:06 +0000 (03:31 +0000)]
gd: Check stack is running before getting storage am: fa8926ba7b

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

Change-Id: I74ce30229decfa32272ea980039a26d5719fac00

3 years agogd: Check stack is running before getting storage
Chienyuan [Wed, 5 May 2021 07:51:49 +0000 (15:51 +0800)]
gd: Check stack is running before getting storage

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

Change-Id: I9d545f4c9cadbf981ded9ddaf5138a229cc384e3

3 years agoMerge changes Ib557fbea,I25bb743c,I99f2584c,I852e9427,Iecae9ca5 am: a69349e3ad
Chris Manton [Tue, 4 May 2021 23:59:03 +0000 (23:59 +0000)]
Merge changes Ib557fbea,I25bb743c,I99f2584c,I852e9427,Iecae9ca5 am: a69349e3ad

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

Change-Id: I002252b6ddbf8e17bdfba8133950fb20cbccd0c9

3 years agoMerge changes Ib557fbea,I25bb743c,I99f2584c,I852e9427,Iecae9ca5
Chris Manton [Tue, 4 May 2021 23:31:54 +0000 (23:31 +0000)]
Merge changes Ib557fbea,I25bb743c,I99f2584c,I852e9427,Iecae9ca5

* changes:
  Use gatt_client_event_text convention for logging
  shim: Add l2cap per-channel network transfer metrics
  shim: Add hid profile to dumpsys
  Add stack/gatt::gatt_channel_state_text
  Add stack/gatt::gatt_security_action_text

3 years agoMerge "Parse scan_data_resp of advertisement tracking event correctly" am: 08f674c623
Myles Watson [Tue, 4 May 2021 22:32:13 +0000 (22:32 +0000)]
Merge "Parse scan_data_resp of advertisement tracking event correctly" am: 08f674c623

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

Change-Id: I8f6f90b0b6d420e1fa14584f48e3579735b0817d

3 years agoMerge "Parse scan_data_resp of advertisement tracking event correctly"
Myles Watson [Tue, 4 May 2021 22:15:41 +0000 (22:15 +0000)]
Merge "Parse scan_data_resp of advertisement tracking event correctly"

3 years agoMerge changes I12391f4e,I3bdf0ea0,I10ff16d7,I58caec1f am: 0a9ce6af0e
Sonny Sasaka [Tue, 4 May 2021 21:46:03 +0000 (21:46 +0000)]
Merge changes I12391f4e,I3bdf0ea0,I10ff16d7,I58caec1f am: 0a9ce6af0e

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

Change-Id: If39b2bc754d21b1d4dc1ac258a36cb4a0c21cac8

3 years agoMerge changes I12391f4e,I3bdf0ea0,I10ff16d7,I58caec1f
Sonny Sasaka [Tue, 4 May 2021 21:22:50 +0000 (21:22 +0000)]
Merge changes I12391f4e,I3bdf0ea0,I10ff16d7,I58caec1f

* changes:
  Add D-Bus daemon binary
  Add `dbus_projection` crate
  Add the `btstack` crate
  Add topshim for bluetooth interface

3 years agoUse gatt_client_event_text convention for logging
Chris Manton [Fri, 30 Apr 2021 20:09:28 +0000 (13:09 -0700)]
Use gatt_client_event_text convention for logging

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

Change-Id: Ib557fbeaefb4231ef911cbd3aa1f4f5b33000c69

3 years agoshim: Add l2cap per-channel network transfer metrics
Chris Manton [Fri, 30 Apr 2021 17:23:27 +0000 (10:23 -0700)]
shim: Add l2cap per-channel network transfer metrics

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

Change-Id: I25bb743c6f9052b93a1bb8c663033c22e2bd16a8

3 years agoshim: Add hid profile to dumpsys
Chris Manton [Fri, 30 Apr 2021 00:27:38 +0000 (17:27 -0700)]
shim: Add hid profile to dumpsys

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

Change-Id: I99f2584c52f1718f35b7b20abf713b0dfef1bd81

3 years agoAdd stack/gatt::gatt_channel_state_text
Chris Manton [Tue, 4 May 2021 01:16:55 +0000 (18:16 -0700)]
Add stack/gatt::gatt_channel_state_text

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

Change-Id: I852e94277db93c1773b30d4ad91e1ac166270611

3 years agoAdd stack/gatt::gatt_security_action_text
Chris Manton [Mon, 3 May 2021 16:04:06 +0000 (09:04 -0700)]
Add stack/gatt::gatt_security_action_text

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

Change-Id: Iecae9ca52a8660151de1ea4c4402f75a3790f43f

3 years agoMerge "OOB: Add public address to OOB data" am: 6107593afb
Martin Brabham [Tue, 4 May 2021 20:04:06 +0000 (20:04 +0000)]
Merge "OOB: Add public address to OOB data" am: 6107593afb

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

Change-Id: Ia69a0bc0243922084841fba93b28dd1a880bdacf

3 years agoMerge "Add rust binaries to link with C++ staticlib" am: 0ccbc22083
Sonny Sasaka [Tue, 4 May 2021 20:03:59 +0000 (20:03 +0000)]
Merge "Add rust binaries to link with C++ staticlib" am: 0ccbc22083

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

Change-Id: I2cb621a688d3c1ecf8af5f6e63afcb2298ae1cb6

3 years agoMerge "Add TARGET_FLOSS define" am: 86cbc1a913
Sonny Sasaka [Tue, 4 May 2021 20:02:33 +0000 (20:02 +0000)]
Merge "Add TARGET_FLOSS define" am: 86cbc1a913

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

Change-Id: I32e4fd29375810d67c0750bb4011819807e2f478

3 years agoMerge "OOB: Add public address to OOB data"
Martin Brabham [Tue, 4 May 2021 19:52:42 +0000 (19:52 +0000)]
Merge "OOB: Add public address to OOB data"

3 years agoAdd D-Bus daemon binary
Sonny Sasaka [Tue, 27 Apr 2021 08:36:14 +0000 (01:36 -0700)]
Add D-Bus daemon binary

The D-Bus daemon connects the RPC-agnostic API implementations in
`btstack` crate with the `dbus_projection` to make a D-Bus projection of
the API implementation.

Bug: 186492781
Tag: #floss
Test: manual - Use dbus-send util
Change-Id: I12391f4e9739a5d1ed6167990fc016429e7280d4

3 years agoAdd `dbus_projection` crate
Sonny Sasaka [Tue, 27 Apr 2021 08:04:11 +0000 (01:04 -0700)]
Add `dbus_projection` crate

The crate provides tools to project Rust API to D-Bus. The API needs to
follow go/floss-api-principles.

Bug: 186492781
Tag: #floss
Test: manual - tested with D-Bus integration in the next patch
Change-Id: I3bdf0ea0b935c45b4fb727fb79d0705eaf6f7b3e

3 years agoAdd the `btstack` crate
Sonny Sasaka [Tue, 27 Apr 2021 07:31:33 +0000 (00:31 -0700)]
Add the `btstack` crate

The `btstack` crate contains the floss API implementations independent
of any RPC projection. This patch adds the basic skeleton that
implements the first simplest methods.

Bug: 186492781
Tag: #floss
Test: manual - tested with D-Bus integration in the next patch
Change-Id: I10ff16d7e6cfcb599a3b356c58d7af15bcaa61d3

3 years agoMerge "Add rust binaries to link with C++ staticlib"
Sonny Sasaka [Tue, 4 May 2021 19:09:58 +0000 (19:09 +0000)]
Merge "Add rust binaries to link with C++ staticlib"

3 years agoMerge "Add TARGET_FLOSS define"
Sonny Sasaka [Tue, 4 May 2021 19:08:59 +0000 (19:08 +0000)]
Merge "Add TARGET_FLOSS define"

3 years agoEnum-ify stack/gatt::tGATT_SEC_ACTION am: 9948dd3af7
Chris Manton [Tue, 4 May 2021 16:42:55 +0000 (16:42 +0000)]
Enum-ify stack/gatt::tGATT_SEC_ACTION am: 9948dd3af7

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

Change-Id: Iab07e00714b787eb9cdb9d80181da18416f450e2

3 years agoRemove unused field stack/avct/avct_int::ch_flags am: ca87a30723
Chris Manton [Tue, 4 May 2021 16:42:53 +0000 (16:42 +0000)]
Remove unused field stack/avct/avct_int::ch_flags am: ca87a30723

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

Change-Id: I6b7d8ee3405cd16502c0539cf221c5599fe5cbc6

3 years agoRe-log stack/include::gatt_disconnection_reason_text am: 3016a29448
Chris Manton [Tue, 4 May 2021 16:42:08 +0000 (16:42 +0000)]
Re-log stack/include::gatt_disconnection_reason_text am: 3016a29448

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

Change-Id: Ifb6c4c286b221d2f84489c83266be6e62010cc35

3 years agoMerge changes I37e29f23,I512714db,If8acc10e am: f22c4c97da
Chris Manton [Tue, 4 May 2021 14:47:44 +0000 (14:47 +0000)]
Merge changes I37e29f23,I512714db,If8acc10e am: f22c4c97da

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

Change-Id: Ie97ca6b2d76c50c03113b6f1ef9e639a4d523dc1

3 years agoEnum-ify stack/gatt::tGATT_SEC_ACTION
Chris Manton [Mon, 3 May 2021 06:13:02 +0000 (23:13 -0700)]
Enum-ify stack/gatt::tGATT_SEC_ACTION

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

Change-Id: I57eb31e9e39f073380949dc9df4510a8adb81dfb

3 years agoRemove unused field stack/avct/avct_int::ch_flags
Chris Manton [Mon, 3 May 2021 16:04:32 +0000 (09:04 -0700)]
Remove unused field stack/avct/avct_int::ch_flags

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

Change-Id: I9c969c5ce65094e6236166adcb281bc728602f79

3 years agoRe-log stack/include::gatt_disconnection_reason_text
Chris Manton [Mon, 3 May 2021 05:02:24 +0000 (22:02 -0700)]
Re-log stack/include::gatt_disconnection_reason_text

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

Change-Id: I24b67cabd41737cddc431039289def92fd1f5e80

3 years agoMerge changes I37e29f23,I512714db,If8acc10e
Chris Manton [Tue, 4 May 2021 14:27:05 +0000 (14:27 +0000)]
Merge changes I37e29f23,I512714db,If8acc10e

* changes:
  dumpsys: Clarify dumpsys acceptlist sizing
  shim: Remove le from shadow accept list after connection
  Add include/hardware::bthh_connection_state_text

3 years agogd: Handle LE advertisement tracking sub-event
Chienyuan [Mon, 3 May 2021 15:25:36 +0000 (23:25 +0800)]
gd: Handle LE advertisement tracking sub-event

* Handle LE advertisement tracking sub-event
* Handle Storage threshold sub-event

Tag: #gd-refactor
Bug: 186234480
Test: gd/cert/run
Test: bluetooth_test_gd
Test: sl4a, BleOnLostOnFoundTest
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: Idfcd8f68d2a2fa6b8633579e0c25bc3b07536f76

3 years agoParse scan_data_resp of advertisement tracking event correctly
Chienyuan [Tue, 4 May 2021 06:57:18 +0000 (14:57 +0800)]
Parse scan_data_resp of advertisement tracking event correctly

Bug: 187042424
Tag: #refactor
Test: sl4a, BleOnLostOnFoundTest
Change-Id: I6276ede692e18b2774d5268bf0a9ce2e0b09eabe

3 years agoMerge "btaa: fix static packed BtaaHciPacket struct" am: 670a667977
Michael Sun [Tue, 4 May 2021 02:49:54 +0000 (02:49 +0000)]
Merge "btaa: fix static packed BtaaHciPacket struct" am: 670a667977

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

Change-Id: Iaa2309c5371be5122bbebbcd386626e2cdf30d78

3 years agoMerge "Fix btaa activity attribution for Linux build" am: be4e9d5934
Abhishek Pandit-Subedi [Tue, 4 May 2021 02:49:02 +0000 (02:49 +0000)]
Merge "Fix btaa activity attribution for Linux build" am: be4e9d5934

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

Change-Id: Iea64e3e6f5e5e0e2ccb7e9b41bc98a6c98158896

3 years agoMerge "btaa: fix static packed BtaaHciPacket struct"
Michael Sun [Tue, 4 May 2021 02:23:59 +0000 (02:23 +0000)]
Merge "btaa: fix static packed BtaaHciPacket struct"

3 years agoMerge "Fix btaa activity attribution for Linux build"
Abhishek Pandit-Subedi [Tue, 4 May 2021 01:56:08 +0000 (01:56 +0000)]
Merge "Fix btaa activity attribution for Linux build"

3 years agodumpsys: Clarify dumpsys acceptlist sizing
Chris Manton [Sun, 2 May 2021 21:08:11 +0000 (14:08 -0700)]
dumpsys: Clarify dumpsys acceptlist sizing

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

Change-Id: I37e29f239f48f3547a20f156886bd20c72253b7d

3 years agoshim: Remove le from shadow accept list after connection
Chris Manton [Sun, 2 May 2021 20:10:51 +0000 (13:10 -0700)]
shim: Remove le from shadow accept list after connection

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

Change-Id: I512714dbca70afd8fb169de6a6f161974a46c802

3 years agoAdd include/hardware::bthh_connection_state_text
Chris Manton [Thu, 29 Apr 2021 20:43:55 +0000 (13:43 -0700)]
Add include/hardware::bthh_connection_state_text

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

3 years agoMerge changes I35fefd23,Idaa677cb,If3a263d4 am: 78e895ba4d
Treehugger Robot [Tue, 4 May 2021 00:34:05 +0000 (00:34 +0000)]
Merge changes I35fefd23,Idaa677cb,If3a263d4 am: 78e895ba4d

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

Change-Id: Ie1d31cce815ef0a316e4b79afd0c49b69bbf0bf3

3 years agoMerge changes I35fefd23,Idaa677cb,If3a263d4
Treehugger Robot [Tue, 4 May 2021 00:15:42 +0000 (00:15 +0000)]
Merge changes I35fefd23,Idaa677cb,If3a263d4

* changes:
  Introduce stack_btu_test
  Remove bta/hh/bta_hh_le::BTA_HH_DEBUG
  Remove execute bit for source file bta/hh/bta_hh_le

3 years agobtaa: fix static packed BtaaHciPacket struct
Michael Sun [Mon, 3 May 2021 16:34:29 +0000 (16:34 +0000)]
btaa: fix static packed BtaaHciPacket struct

Update the BtaaHciPacket to not use packet pragma as it is platform
dependent. Further updated the HciProcessor to eliminate static
declarations.

Tag: #feature
Bug: 187019165
Test: mmma -j system/bt
BYPASS_LONG_LINES_REASON: consist with gd format

Change-Id: I82bf7fcfa50c9911a8b7cdc69e0da68eb2b80a35

3 years agoAdd topshim for bluetooth interface
Abhishek Pandit-Subedi [Sat, 10 Apr 2021 01:00:41 +0000 (18:00 -0700)]
Add topshim for bluetooth interface

In order for the Rust front-end to use the bluetooth interface, add
a topshim to give Rust code access to C++.

Also includes some debug code in adapter/main.rs which will eventually
be replaced with a proper dbus frontend.

Bug: 183208689
Tag: #floss
Test: atest --host bluetooth_test_gd
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 char lines

Change-Id: I58caec1ffadcc1d8d7e92f7c9669fa4f4d5bb91f

3 years agoFix btaa activity attribution for Linux build
Abhishek Pandit-Subedi [Mon, 3 May 2021 22:56:03 +0000 (22:56 +0000)]
Fix btaa activity attribution for Linux build

Missing entries in BUILD.gn and Linux stubs for dumpsys.

Bug: 187109138
Tag: #floss
Test: atest --host bluetooth_test_gd
Change-Id: I9d72a29d56d0461375cc9235894a384dae183fd6

3 years agoAdd rust binaries to link with C++ staticlib
Abhishek Pandit-Subedi [Mon, 15 Mar 2021 20:54:19 +0000 (13:54 -0700)]
Add rust binaries to link with C++ staticlib

Rather than using C++ binaries to link with Rust staticlib, we do it the
other way around. This allows us to write our dbus frontend with Rust
instead.

Bug: 179821440
Tag: #floss
Test: atest --host bluetooth_test_gd
Change-Id: I63037e0aaea152a4855e0a49971c1b2f9c312ac5

3 years agoAdd TARGET_FLOSS define
Abhishek Pandit-Subedi [Mon, 26 Apr 2021 19:40:11 +0000 (12:40 -0700)]
Add TARGET_FLOSS define

OS_GENERIC is used for host tests and Linux builds but it unfortunately
puts everything at the current working directory. Add a TARGET_FLOSS
define so that we can put them at absolute locations (i.e.
/etc/bluetooth).

Bug: 186442862
Tag: #floss
Test: atest --host bluetooth_test_gd
Change-Id: I1c9aaacd1b36b80523437b050d2232b7e5bba47c

3 years agoOOB: Add public address to OOB data
Martin Brabham [Tue, 27 Apr 2021 04:35:22 +0000 (21:35 -0700)]
OOB: Add public address to OOB data

Will need to figure out private addresses in follow-up CL

Bug: 178007935
Test: Compiles, test app.
Tag: #feature
Change-Id: I73e3ef9fbefb5443dbe719471683af3e3bcb4e1b

3 years agoMerge "Replace base::MessageLoopCurrent* by base::Current*Thread" am: 4a5ae7d60e
Treehugger Robot [Mon, 3 May 2021 21:51:08 +0000 (21:51 +0000)]
Merge "Replace base::MessageLoopCurrent* by base::Current*Thread" am: 4a5ae7d60e

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

Change-Id: I79b0f05a4e89df9e098f0fdc0348ba69293edd17

3 years agoMerge "Replace base::MessageLoopCurrent* by base::Current*Thread"
Treehugger Robot [Mon, 3 May 2021 21:35:53 +0000 (21:35 +0000)]
Merge "Replace base::MessageLoopCurrent* by base::Current*Thread"

3 years agoMerge "Handle connection failures on the control channel properly" am: 8c65349370
Sal Savage [Mon, 3 May 2021 20:49:32 +0000 (20:49 +0000)]
Merge "Handle connection failures on the control channel properly" am: 8c65349370

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

Change-Id: I240d1837118c778edbe825c019cedd7ae30bcdb6

3 years agoMerge "Add script to generate libchrome R91 version" am: 37d2b47789
Sonny Sasaka [Mon, 3 May 2021 20:48:33 +0000 (20:48 +0000)]
Merge "Add script to generate libchrome R91 version" am: 37d2b47789

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

Change-Id: Ib53269f3bd52162fff817c4cdaf210f6d7d814da

3 years agoMerge "Handle connection failures on the control channel properly"
Sal Savage [Mon, 3 May 2021 20:40:03 +0000 (20:40 +0000)]
Merge "Handle connection failures on the control channel properly"

3 years agoMerge "Add script to generate libchrome R91 version"
Sonny Sasaka [Mon, 3 May 2021 20:11:38 +0000 (20:11 +0000)]
Merge "Add script to generate libchrome R91 version"

3 years agoReplace base::MessageLoopCurrent* by base::Current*Thread
Abhishek Pandit-Subedi [Mon, 3 May 2021 19:56:20 +0000 (12:56 -0700)]
Replace base::MessageLoopCurrent* by base::Current*Thread

Make changes necessary for recent uprev of libchrome to r822064.

Bug: 187086497
Tag: #floss
Test: atest --host bluetooth_test_gd
Change-Id: I63f954c1ce5e0bf455e1da1e258d4a8b88fcfc9d

3 years agoMerge "OOB: Generate random for LE" am: 2d2e4a7603
Treehugger Robot [Mon, 3 May 2021 18:02:18 +0000 (18:02 +0000)]
Merge "OOB: Generate random for LE" am: 2d2e4a7603

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

Change-Id: Iac71010f1b4c621240cbb262a00e01606d65b618

3 years agoMerge "OOB: Generate random for LE"
Treehugger Robot [Mon, 3 May 2021 17:40:25 +0000 (17:40 +0000)]
Merge "OOB: Generate random for LE"

3 years agoUnnecessary def BTA_GATTC_CONN_MAX => GATT_MAX_PHY_CHANNEL am: f50690c3fc
Chris Manton [Mon, 3 May 2021 03:59:10 +0000 (03:59 +0000)]
Unnecessary def BTA_GATTC_CONN_MAX => GATT_MAX_PHY_CHANNEL am: f50690c3fc

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

Change-Id: I124383b300bee22a80d9f887c0c6fcdc4af0be81

3 years agoRe-point bta:: tests to common test/mock am: 2dbbbca5f1
Chris Manton [Mon, 3 May 2021 03:59:07 +0000 (03:59 +0000)]
Re-point bta:: tests to common test/mock am: 2dbbbca5f1

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

Change-Id: Id82d3791a88c7fa2017e5775631137bfa215e02a

3 years agoConst-ify the bta/hh/bta_hh::API data types am: ee6b8adcd1
Chris Manton [Mon, 3 May 2021 03:59:04 +0000 (03:59 +0000)]
Const-ify the bta/hh/bta_hh::API data types am: ee6b8adcd1

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

Change-Id: I2e5641f84bfba2dfc6808ffdece1965a167a645b

3 years agoRemove unused member tHID_HOST_DEV_CTB::conn_substate am: a67b1f54c9
Chris Manton [Mon, 3 May 2021 03:59:02 +0000 (03:59 +0000)]
Remove unused member tHID_HOST_DEV_CTB::conn_substate am: a67b1f54c9

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

Change-Id: I5b4a6a19da4fa75a4491d83c7f7d9f9c3510f0e6

3 years agoMove stack/l2cap::text from compilation unit into header am: 3fbc096f45
Chris Manton [Mon, 3 May 2021 03:58:59 +0000 (03:58 +0000)]
Move stack/l2cap::text from compilation unit into header am: 3fbc096f45

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

Change-Id: I62e859e7f63a1e7dae963ba97e25bf0c05a53607

3 years agoAdd BTA_ID_HH for logging am: 568b92ff38
Chris Manton [Mon, 3 May 2021 03:58:57 +0000 (03:58 +0000)]
Add BTA_ID_HH for logging am: 568b92ff38

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

Change-Id: I814d0939fccd25f11c25f0e794c88c6258f28660

3 years agoAdd include/hardware/bt_hh::bthh_connection_state_text am: df8fbbf2b6
Chris Manton [Mon, 3 May 2021 03:58:55 +0000 (03:58 +0000)]
Add include/hardware/bt_hh::bthh_connection_state_text am: df8fbbf2b6

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

Change-Id: Icd5f41ee2e0b42dc7ca60d47a03bf698fc48988f

3 years agoRemove unused declaration am: f260dc6e96
Chris Manton [Mon, 3 May 2021 03:58:52 +0000 (03:58 +0000)]
Remove unused declaration am: f260dc6e96

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

Change-Id: I2b8eacbd64e9ac64dfeb812ddd2efe92696a31e2

3 years agobtm_log: Streamline hid logging am: f7dd3dd0bf
Chris Manton [Mon, 3 May 2021 03:58:50 +0000 (03:58 +0000)]
btm_log: Streamline hid logging am: f7dd3dd0bf

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

Change-Id: If4e8e7ba18e6a67779b5f80d877ac9420792a967

3 years agolog: Swap proper initiator am: 0973f8d157
Chris Manton [Mon, 3 May 2021 03:58:03 +0000 (03:58 +0000)]
log: Swap proper initiator am: 0973f8d157

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

Change-Id: Icb78817b012519b7151a8374b1d66da6f5b4df75

3 years agoIntroduce stack_btu_test
Chris Manton [Sat, 1 May 2021 16:26:56 +0000 (09:26 -0700)]
Introduce stack_btu_test

Towards testable code

Bug: 163134718
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
No-Typo-Check: Legacy code mocks

Change-Id: I35fefd23efe47af881ae22765157c7e723973c10

3 years agoUnnecessary def BTA_GATTC_CONN_MAX => GATT_MAX_PHY_CHANNEL
Chris Manton [Sat, 1 May 2021 06:16:19 +0000 (23:16 -0700)]
Unnecessary def BTA_GATTC_CONN_MAX => GATT_MAX_PHY_CHANNEL

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

Change-Id: I034765099d25b207e8085fcdae59de866d400278

3 years agoRe-point bta:: tests to common test/mock
Chris Manton [Fri, 30 Apr 2021 22:21:38 +0000 (15:21 -0700)]
Re-point bta:: tests to common test/mock

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

Change-Id: I8dbfc4754a754011a0c06c5f8d21abce15931cd3

3 years agoConst-ify the bta/hh/bta_hh::API data types
Chris Manton [Wed, 17 Mar 2021 01:46:17 +0000 (18:46 -0700)]
Const-ify the bta/hh/bta_hh::API data types

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

Change-Id: I37c61447dc921ce10e112a30bdb8dc011dff3410

3 years agoRemove unused member tHID_HOST_DEV_CTB::conn_substate
Chris Manton [Mon, 15 Mar 2021 17:23:17 +0000 (10:23 -0700)]
Remove unused member tHID_HOST_DEV_CTB::conn_substate

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

Change-Id: I7fcfc640ef7728ae924e55d3ce1f4fa43b09963a

3 years agoMove stack/l2cap::text from compilation unit into header
Chris Manton [Fri, 30 Apr 2021 06:20:36 +0000 (23:20 -0700)]
Move stack/l2cap::text from compilation unit into header

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

Change-Id: I7b14bb2a83444d0147dd1f02f39881f8990998d7

3 years agoAdd BTA_ID_HH for logging
Chris Manton [Thu, 29 Apr 2021 20:44:11 +0000 (13:44 -0700)]
Add BTA_ID_HH for logging

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

Change-Id: Ib3798e340688cc400f96b743afc15f46e365022a

3 years agoAdd include/hardware/bt_hh::bthh_connection_state_text
Chris Manton [Thu, 29 Apr 2021 20:43:55 +0000 (13:43 -0700)]
Add include/hardware/bt_hh::bthh_connection_state_text

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

Change-Id: I9050d99e913c96454837f95a266efcf828bcf6b4

3 years agoRemove unused declaration
Chris Manton [Thu, 29 Apr 2021 05:23:22 +0000 (22:23 -0700)]
Remove unused declaration

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

Change-Id: I5c6a76d903e56fe4ec721ec0701e305e8bd1b13d

3 years agobtm_log: Streamline hid logging
Chris Manton [Thu, 29 Apr 2021 05:22:49 +0000 (22:22 -0700)]
btm_log: Streamline hid logging

Bug: 163134718
Test: gd/cert/run
Tag: #refactor
No-Typo-Check: Legacy code mocks
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: If3f967ddabe64c481536debd44a31b989eff1565

3 years agolog: Swap proper initiator
Chris Manton [Thu, 29 Apr 2021 00:51:59 +0000 (17:51 -0700)]
log: Swap proper initiator

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

Change-Id: I9ade378b5de1677d6be9d7e56af8589ff023e613

3 years agoRemove bta/hh/bta_hh_le::BTA_HH_DEBUG
Chris Manton [Fri, 30 Apr 2021 17:31:46 +0000 (10:31 -0700)]
Remove bta/hh/bta_hh_le::BTA_HH_DEBUG

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

Change-Id: Idaa677cb4eeb8342246adbd72e4980fa1242fea0

3 years agoRemove execute bit for source file bta/hh/bta_hh_le
Chris Manton [Fri, 30 Apr 2021 17:29:44 +0000 (10:29 -0700)]
Remove execute bit for source file bta/hh/bta_hh_le

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

Change-Id: If3a263d4a61939af0a00e5495207138a82a0e5b6

3 years agoMerge "ScanningManagerTest: Wait for the Filter command" am: 81ce4d3e70
Treehugger Robot [Sat, 1 May 2021 20:35:02 +0000 (20:35 +0000)]
Merge "ScanningManagerTest: Wait for the Filter command" am: 81ce4d3e70

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

Change-Id: Id0347af4b3465bce562c48549f0aca31608211c4

3 years agoGD: Split tests into module vs unit tests am: 479f99dcab
Myles Watson [Sat, 1 May 2021 20:34:55 +0000 (20:34 +0000)]
GD: Split tests into module vs unit tests am: 479f99dcab

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

Change-Id: I2e600abbaaec0e6acd7d82d2abea062d6b804962

3 years agoMerge "ScanningManagerTest: Wait for the Filter command"
Treehugger Robot [Sat, 1 May 2021 20:21:47 +0000 (20:21 +0000)]
Merge "ScanningManagerTest: Wait for the Filter command"

3 years agoScanningManagerTest: Wait for the Filter command
Myles Watson [Fri, 30 Apr 2021 23:45:51 +0000 (16:45 -0700)]
ScanningManagerTest: Wait for the Filter command

Bug: 176832968
Test: atest bluetooth_test_gd
Tag: #gd-refactor
Change-Id: Idf36458a196e1ad3278f3eb8a2d384586ac40afe

3 years agoGD: Split tests into module vs unit tests
Myles Watson [Sat, 1 May 2021 14:15:40 +0000 (07:15 -0700)]
GD: Split tests into module vs unit tests

Move simpler, single-threaded tests into their own set of unit tests.

Bug: 176832968
Test: atest bluetooth_test_gd_unit
Tag: #gd-refactor
Change-Id: Ic3fa06454d119764aa547f975843583c00c32fc4

3 years agoOOB: Generate random for LE
Martin Brabham [Tue, 27 Apr 2021 04:35:22 +0000 (21:35 -0700)]
OOB: Generate random for LE

Bug: 184377951
Test: Compiles, test app.
Tag: #feature
Change-Id: I92c1fa84383f2a30fbea1f858417393aefe1d302

3 years agoAdd script to generate libchrome R91 version
Sonny Sasaka [Sat, 1 May 2021 00:58:26 +0000 (17:58 -0700)]
Add script to generate libchrome R91 version

Bug: 179821440
Tag: #floss
Test: None
Change-Id: I9114fb825a88b69fb8017943ed24a9cf169c9a09

3 years agoEnable missing HCI cmds in rootcanal am: 1d73e8ba2d
Erwin Jansen [Sat, 1 May 2021 00:45:12 +0000 (00:45 +0000)]
Enable missing HCI cmds in rootcanal am: 1d73e8ba2d

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

Change-Id: I306349ec2b6d0f627bd5f0ed951ecc62b0fa54b6

3 years agoEnable missing HCI cmds in rootcanal
Erwin Jansen [Fri, 30 Apr 2021 22:31:21 +0000 (15:31 -0700)]
Enable missing HCI cmds in rootcanal

This enables:

- 7.8.44 LE Set Address Resolution Enable command
- 7.8.45 LE Set Resolvable Private Address Timeout

Both are NOPs for now.

Bug: 186861350
Bug: 186541528
Test: NimBLE gets a bit further with root canal
Change-Id: I3d1b95a30afc97d1f1f7555ac891b4f4df872eec