OSDN Git Service

android-x86/system-bt.git
3 years agoshim/l2cap: Fix RegisterLECoc function
Łukasz Rymanowski [Fri, 2 Oct 2020 09:35:38 +0000 (09:35 +0000)]
shim/l2cap: Fix RegisterLECoc function

Change-Id: I6079b1456580f9f49aa18396177e2eef0d9e1398

3 years agoMerge "Implement encryption key size negotiation"
Jakub Pawlowski [Wed, 7 Oct 2020 06:16:54 +0000 (06:16 +0000)]
Merge "Implement encryption key size negotiation"

3 years agoGD: Store peer keys in legacy format
Jakub Pawlowski [Thu, 1 Oct 2020 13:12:25 +0000 (15:12 +0200)]
GD: Store peer keys in legacy format

Bug: 142341141
Tag: #gd-refactor
Test: cert/run --host SecurityRecordStorageTest
Change-Id: I94d270da66977fef6356f011b649bb405d0c4324

3 years agoImplement encryption key size negotiation
Jakub Pawlowski [Mon, 5 Oct 2020 18:29:24 +0000 (20:29 +0200)]
Implement encryption key size negotiation

Bug: 142341141
Tag: #gd-refactor
Test: gd/cert/run --host LeSecurityTest:test_min_encryption_key_size_equal_to_max
Change-Id: I478d29cf20537075ef2a3dc9f707040e0b657ae1

3 years agoMerge "GD-Logging: Change LOG_DEBUG to LOG_INFO"
Jack He [Tue, 6 Oct 2020 22:56:19 +0000 (22:56 +0000)]
Merge "GD-Logging: Change LOG_DEBUG to LOG_INFO"

3 years agoMerge "DO NOT MERGE - Merge RP1A.201005.006"
Xin Li [Tue, 6 Oct 2020 20:17:27 +0000 (20:17 +0000)]
Merge "DO NOT MERGE - Merge RP1A.201005.006"

3 years agoGD-Logging: Change LOG_DEBUG to LOG_INFO
Jack He [Tue, 6 Oct 2020 05:50:55 +0000 (22:50 -0700)]
GD-Logging: Change LOG_DEBUG to LOG_INFO

* Given that LOG_DEBUG will be disabled by default,
  changing existing LOG_DEBUG to LOG_INFO so that
  we don't lose these logs

Bug: 170163727
Test: atest bluetooth_test_gd, manual device test
Tag: #gd-refactor
Change-Id: I84db7751d4bbe6d3ea88122b8cdf72bc150fbe7a

3 years agoMerge "bthal: Do not allow to initialize more than once"
Treehugger Robot [Tue, 6 Oct 2020 18:27:28 +0000 (18:27 +0000)]
Merge "bthal: Do not allow to initialize more than once"

3 years agoDO NOT MERGE - Merge RP1A.201005.006
The Android Open Source Project [Tue, 6 Oct 2020 04:00:27 +0000 (21:00 -0700)]
DO NOT MERGE - Merge RP1A.201005.006

Bug: 168212094
Merged-In: I1bd8713eecebc2bc3d919402b035987e06a2d4d3
Change-Id: I1be981905f9b5c60b9fc0071200116a368996e00

3 years agoProperly shim controller flags
Chris Manton [Tue, 6 Oct 2020 00:32:51 +0000 (17:32 -0700)]
Properly shim controller flags

Bug: 166280067
Tag: #refactor
Test: gd/cert/run --host
Test: ble paired 2 phones
Test: act.py -tc BleCocTest
Change-Id: I7d311bda8d86ca87032d8a45d35ab4d00a5d4038

3 years agoRe-log stack/l2cap/l2c_ble::l2cble_conn_comp
Chris Manton [Mon, 21 Sep 2020 20:57:11 +0000 (13:57 -0700)]
Re-log stack/l2cap/l2c_ble::l2cble_conn_comp

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I6dfd621e83868b36fdb1ac16825db8176600adb9

3 years agoLegacy ACL shim interface
Chris Manton [Mon, 5 Oct 2020 17:07:15 +0000 (10:07 -0700)]
Legacy ACL shim interface

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I2aaa3459e9537a896b374aa2a3eac85aaf1ea30c

3 years agoRemove unused #defs stack/include/hcidefs
Chris Manton [Mon, 21 Sep 2020 15:20:28 +0000 (08:20 -0700)]
Remove unused #defs stack/include/hcidefs

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I6b657cf604fac0e3fdb4e51b071c02b451f6e95c

3 years agoRemove unused #defs stack/include/bt_types
Chris Manton [Mon, 21 Sep 2020 00:41:54 +0000 (17:41 -0700)]
Remove unused #defs stack/include/bt_types

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: Iff89e74e95d78fe5cf053ca20fead3076fd18cdf

3 years agoRemove unused var tBTM_SEC_DEV_REC::link_key_changed
Chris Manton [Sun, 20 Sep 2020 23:30:42 +0000 (16:30 -0700)]
Remove unused var tBTM_SEC_DEV_REC::link_key_changed

set-once-to-default-read-never

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: Ife93f8028096744171ae79f2d8608c87e352eff0

3 years agoStreamline stack/l2cap/l2c_ble::l2cble_notify_le_connection
Chris Manton [Sat, 3 Oct 2020 16:22:57 +0000 (09:22 -0700)]
Streamline stack/l2cap/l2c_ble::l2cble_notify_le_connection

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I1ffb5df7acd8f616822ec3eeacef7d88d6dbc249

3 years agoAdd stack/include/bt_types::AddressTypeText
Chris Manton [Mon, 21 Sep 2020 21:00:48 +0000 (14:00 -0700)]
Add stack/include/bt_types::AddressTypeText

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I43b7c46837435ea544eb2e8c90ef981a3bdf3e2f

3 years agoRe-Api stack/acl/btm_acl::btm_ble_get_acl_remote_addr
Chris Manton [Sun, 4 Oct 2020 22:03:38 +0000 (15:03 -0700)]
Re-Api stack/acl/btm_acl::btm_ble_get_acl_remote_addr

Towards readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1ba3ec9198e9832e323da0e8b6e604eb8c8c1c81

3 years agoRe-log stack/acl/btm_acl
Chris Manton [Sun, 4 Oct 2020 01:13:17 +0000 (18:13 -0700)]
Re-log stack/acl/btm_acl

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Iaf187f592f23992451a741e48d6a9f3730de3f56

3 years agoReplace tBTA_LE_KEY_TYPE=>tBTM_LE_KEY_TYPE
Chris Manton [Thu, 10 Sep 2020 03:32:52 +0000 (20:32 -0700)]
Replace tBTA_LE_KEY_TYPE=>tBTM_LE_KEY_TYPE

Towards the shortest path

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I9475559159475f9f9d81a921cf14c2db62be3839

3 years agoSimplify StackAclBtmAcl::btm_bda_to_acl
Chris Manton [Sun, 16 Aug 2020 22:03:26 +0000 (15:03 -0700)]
Simplify StackAclBtmAcl::btm_bda_to_acl

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I6573f60cbf5e469fe780c6d5a4506c0dcd39f590

3 years agoInternally link stack/acl/btm_acl::btm_ble_get_acl_remote_addr
Chris Manton [Mon, 17 Aug 2020 04:55:20 +0000 (21:55 -0700)]
Internally link stack/acl/btm_acl::btm_ble_get_acl_remote_addr

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Id440b966613aaeb4b39ece7d4517a5158e823456

3 years agoMerge "Remove init flags log message, you can check the dumpsys now"
Treehugger Robot [Tue, 6 Oct 2020 02:31:40 +0000 (02:31 +0000)]
Merge "Remove init flags log message, you can check the dumpsys now"

3 years agoMerge "Add A2DP/SDP fuzzers for bt-stack"
Treehugger Robot [Tue, 6 Oct 2020 00:58:46 +0000 (00:58 +0000)]
Merge "Add A2DP/SDP fuzzers for bt-stack"

3 years agoenum-ify tgatt_status
Chris Manton [Sun, 4 Oct 2020 17:09:34 +0000 (10:09 -0700)]
enum-ify tgatt_status

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I44a41dfbf11c1bbca77c8f568ed1ada236476d6f

3 years agoInclude security_device_record stack/acl/btm_acl
Chris Manton [Mon, 17 Aug 2020 15:01:56 +0000 (08:01 -0700)]
Include security_device_record stack/acl/btm_acl

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I3b2ed7bd82dff9b504223aa9ea93a72a1c0575b7

3 years agoRemove unused defs BTM_ACL_PKT_TYPES_MASK_
Chris Manton [Sun, 16 Aug 2020 18:21:05 +0000 (11:21 -0700)]
Remove unused defs BTM_ACL_PKT_TYPES_MASK_

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I59f2004e5450834dcdc725f52942923aa5294fe4

3 years agolog tgatt status properly
Chris Manton [Sun, 4 Oct 2020 06:47:35 +0000 (23:47 -0700)]
log tgatt status properly

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I5e4c526baca73a3c4e5e64a4b4bea4daab31116a

3 years agoencapsulate tBTM_BOND_TYPE within tBTM_SEC_DEV_REC
Chris Manton [Mon, 7 Sep 2020 19:51:18 +0000 (12:51 -0700)]
encapsulate tBTM_BOND_TYPE within tBTM_SEC_DEV_REC

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: Ia5e04ba5c05783ee6b7458989f1898c50db80584

3 years agoProperly add typedef for gatt status
Chris Manton [Sun, 4 Oct 2020 06:46:48 +0000 (23:46 -0700)]
Properly add typedef for gatt status

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I058946087572442b26a42e36076db273076c7518

3 years agoMerge "GD Security: Fix bad conditional"
Treehugger Robot [Sat, 3 Oct 2020 23:57:33 +0000 (23:57 +0000)]
Merge "GD Security: Fix bad conditional"

3 years agoGD Security: Fix bad conditional
Martin Brabham [Fri, 2 Oct 2020 19:03:34 +0000 (12:03 -0700)]
GD Security: Fix bad conditional

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Test: atest --host bluetooth_test_gd
Change-Id: I87bb3ac3ae7ccfc8164cf8565eb1e88f2f44e2d6

3 years agoAdd include stack/smp/smp_act::smp_api_types.h
Chris Manton [Sun, 13 Sep 2020 22:39:15 +0000 (15:39 -0700)]
Add include stack/smp/smp_act::smp_api_types.h

Include what you use

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1de6caf318d75776ac2dbc5456ea32e287622d39

3 years agoEncapulate tBTM_SEC_DEV_REC::pin_code_length
Chris Manton [Sun, 20 Sep 2020 23:25:17 +0000 (16:25 -0700)]
Encapulate tBTM_SEC_DEV_REC::pin_code_length

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: Ic48c5e60495b4308bf6c7b26e9de18745453bed8

3 years agoWrap API around tBTM_SEC_DEV_REC::BTM_SEC_
Chris Manton [Sun, 20 Sep 2020 20:45:43 +0000 (13:45 -0700)]
Wrap API around tBTM_SEC_DEV_REC::BTM_SEC_

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I3e337b78e2ba7ed2eb2cf328d6b03c43a998fef4

3 years agoRe-log btif/src/btif_sdp_server::
Chris Manton [Thu, 24 Sep 2020 18:15:58 +0000 (11:15 -0700)]
Re-log btif/src/btif_sdp_server::

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: Ia57c281cc844a4c254c53324a4c4bd1eaf7af1c3

3 years agoRemove unused decls stack/btm/btm_int
Chris Manton [Sun, 20 Sep 2020 22:20:48 +0000 (15:20 -0700)]
Remove unused decls stack/btm/btm_int

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: If3c47ffa09fa458a381a381cddc6f37a9835f7a4

3 years agoenum-ify BTM_SEC_ and BTM_SEC_LE
Chris Manton [Sun, 20 Sep 2020 20:10:11 +0000 (13:10 -0700)]
enum-ify BTM_SEC_ and BTM_SEC_LE

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: Ifde2b62d2e368188d3454236b616adc2ca9dfcce

3 years agoRemove unused var tBTM_CB::state_temp_buffer
Chris Manton [Sun, 20 Sep 2020 20:14:00 +0000 (13:14 -0700)]
Remove unused var tBTM_CB::state_temp_buffer

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I2b6ffcae31b3b6fea84e59fac01962609557217b

3 years agoEncapsulate tBTM_CB::btm_scn
Chris Manton [Sun, 20 Sep 2020 19:46:31 +0000 (12:46 -0700)]
Encapsulate tBTM_CB::btm_scn

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: Ic947434651ba3312342507ac1ff4da92e176b0bb

3 years agoEncapsulate tBTM_CB::enc_rand, ediv, key_size
Chris Manton [Sun, 20 Sep 2020 16:13:26 +0000 (09:13 -0700)]
Encapsulate tBTM_CB::enc_rand, ediv, key_size

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I7e5962356b64b52011e370deb03b53a2ca4b42ad

3 years agoEncapsulate tBTM_CB::enc_handle
Chris Manton [Sun, 20 Sep 2020 16:01:13 +0000 (09:01 -0700)]
Encapsulate tBTM_CB::enc_handle

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: I735a002c545f62ae75676e72d068a2f3d097eda9

3 years agoL2CA_SetFlushTimeout does nothing.
Chris Manton [Sat, 3 Oct 2020 20:19:51 +0000 (13:19 -0700)]
L2CA_SetFlushTimeout does nothing.

aosp/1443546

Bug: 159815595
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink
Change-Id: Ib18923477830f5f5bf2c8748da5a817a9871ec1e

3 years agoRe-align read remote version information on legacy
Chris Manton [Sat, 3 Oct 2020 17:01:53 +0000 (10:01 -0700)]
Re-align read remote version information on legacy

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I7be1ecba73234431194ad9702ec3ea06b09c60bc

3 years agoMerge changes Ib1f71d7e,I917ba220,Ic58e879c,If152037d,I063d0092
Treehugger Robot [Sat, 3 Oct 2020 00:46:19 +0000 (00:46 +0000)]
Merge changes Ib1f71d7e,I917ba220,Ic58e879c,If152037d,I063d0092

* changes:
  Precise naming match => is_in_security_db
  enum-ify _SCAN both classic and ble
  enum-ify _INQUIRY both classic and ble
  enum-ify _CONNECTABLE both classic and ble
  enum-ify _DISCOVERABLE both classic and ble

3 years agoMerge "Convert mask types from uint32_t to enum type"
Treehugger Robot [Fri, 2 Oct 2020 23:30:05 +0000 (23:30 +0000)]
Merge "Convert mask types from uint32_t to enum type"

3 years agoSMP: Assume L2cap tx completes immediately
Hansong Zhang [Fri, 2 Oct 2020 00:47:03 +0000 (17:47 -0700)]
SMP: Assume L2cap tx completes immediately

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5bf5c5067f3ad3d48716fdc65f73920107d034cf

3 years agoL2cap: LE address type is not used
Hansong Zhang [Thu, 1 Oct 2020 07:03:59 +0000 (00:03 -0700)]
L2cap: LE address type is not used

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie13f6e7cda6feb23d25ae661abeb7221757e9da7

3 years agoLink flush timeout is unused
Hansong Zhang [Thu, 1 Oct 2020 06:53:46 +0000 (23:53 -0700)]
Link flush timeout is unused

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Icf6fec9bd038210a31eb8ab38a96f44d3ce2ffd2

3 years agoConvert mask types from uint32_t to enum type
Mikhail Naganov [Fri, 2 Oct 2020 01:08:16 +0000 (18:08 -0700)]
Convert mask types from uint32_t to enum type

This applies to the following types:

- audio_gain_mode_t;
- audio_flags_mask_t;
- audio_channel_representation_t;
- audio_channel_mask_t;
- audio_devices_t.

Enum types are distinct thus proper overloading on the type
is possible in C++. Also, assignments to enum types are
less prone to errors.

Bug: 169889714
Test: basic audio functionality
Tag: #refactor
Change-Id: I7b064b282ce9f533f91ef13a4852b3e9f308f6c0

3 years agoPrecise naming match => is_in_security_db
Chris Manton [Sun, 20 Sep 2020 15:43:57 +0000 (08:43 -0700)]
Precise naming match => is_in_security_db

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: Ib1f71d7e94ab471a04c25b74cfb8cda5fab3cef5

3 years agoenum-ify _SCAN both classic and ble
Chris Manton [Sun, 20 Sep 2020 06:29:24 +0000 (23:29 -0700)]
enum-ify _SCAN both classic and ble

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I917ba2204a79af800afefe1b7e046a9510316030

3 years agoenum-ify _INQUIRY both classic and ble
Chris Manton [Sun, 20 Sep 2020 06:21:23 +0000 (23:21 -0700)]
enum-ify _INQUIRY both classic and ble

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: Ic58e879c9b62fcba510111b178e0aa092873bcac

3 years agoenum-ify _CONNECTABLE both classic and ble
Chris Manton [Sun, 20 Sep 2020 05:50:58 +0000 (22:50 -0700)]
enum-ify _CONNECTABLE both classic and ble

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: If152037d43646197b456dfe6174bb897f4911c3a

3 years agoenum-ify _DISCOVERABLE both classic and ble
Chris Manton [Sun, 20 Sep 2020 05:36:56 +0000 (22:36 -0700)]
enum-ify _DISCOVERABLE both classic and ble

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I063d0092569663c25166f15d369b57e6bf88388d

3 years agoHIDH: Don't set a minimum MTU
Myles Watson [Fri, 2 Oct 2020 16:49:50 +0000 (09:49 -0700)]
HIDH: Don't set a minimum MTU

Bug: 169780397
Test: Pair with a logitech 557 mouse
Tag: #gd-refactor
Change-Id: I5ad88645ea45e3ae016f5a6f54017558ae2b8049

3 years agoAdd ACL shim event registration - with deps
Chris Manton [Mon, 28 Sep 2020 20:15:06 +0000 (13:15 -0700)]
Add ACL shim event registration - with deps

Bug: 166280067
Tag: #refactor
Test: gd/cert/run --host
Test: ble paired 2 phones
Test: act.py -tc BleCocTest
Change-Id: I6494212c0f61d478792fc2948c12ae4187576cd1

3 years agoSingle out Register events LE_META_EVENT as special
Chris Manton [Sat, 26 Sep 2020 23:07:41 +0000 (16:07 -0700)]
Single out Register events LE_META_EVENT as special

LE_META_EVENT is a special event that multiplexes LE
events underneath and should not be exposed.

Test Parameters: INIT_gd_hci=true

Bug: 166280067
Tag: #refactor
Test: gd/cert/run --host
Test: ble paired 2 phones
Test: act.py -tc BleCocTest
Change-Id: Idf8dd9fa9e13fc9e2d1d7d89d6af0a16ec574b89

3 years agoMerge "Store LE device keys when bonded"
Jakub Pawlowski [Fri, 2 Oct 2020 06:41:13 +0000 (06:41 +0000)]
Merge "Store LE device keys when bonded"

3 years agoMerge "HIDH: Register for HID_PSM_CONTROL"
Treehugger Robot [Fri, 2 Oct 2020 02:00:35 +0000 (02:00 +0000)]
Merge "HIDH: Register for HID_PSM_CONTROL"

3 years agoMerge "Revert "Add ACL shim event registration""
Treehugger Robot [Thu, 1 Oct 2020 23:19:19 +0000 (23:19 +0000)]
Merge "Revert "Add ACL shim event registration""

3 years agoHIDH: Register for HID_PSM_CONTROL
Myles Watson [Thu, 1 Oct 2020 22:49:41 +0000 (15:49 -0700)]
HIDH: Register for HID_PSM_CONTROL

Bug: 169780397
Test: Pair with a classic HID device
Tag: #gd-refactor
Change-Id: I22fa725c2665282b2c246256c838fdbc8bc05549

3 years agoRevert "Add ACL shim event registration"
Chris Manton [Thu, 1 Oct 2020 17:48:30 +0000 (10:48 -0700)]
Revert "Add ACL shim event registration"

Test: Compiles
Bug: 166280067
Tag: #refactor

This reverts commit a6b323be6e84c6fb0e986b73a8555314044618ab.

Change-Id: I99b4f8b8fa7118cd2754477209b8e81916cb4811

3 years agoL2cap user dynamic channel: move psm alloc to bta
Hansong Zhang [Thu, 1 Oct 2020 06:41:01 +0000 (23:41 -0700)]
L2cap user dynamic channel: move psm alloc to bta

Only used by bta_jv. No need to have a L2cap-level psm allocation.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If445b392d1ca67a5a94c5cc180566d31c1dcf698

3 years agoClean up unused avdt definitions
Hansong Zhang [Thu, 1 Oct 2020 06:20:11 +0000 (23:20 -0700)]
Clean up unused avdt definitions

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iac74f0262f77d4a9dd040f767f0b54151c089376

3 years agoMerge changes from topic "gd_security_shim"
Treehugger Robot [Thu, 1 Oct 2020 18:24:37 +0000 (18:24 +0000)]
Merge changes from topic "gd_security_shim"

* changes:
  BTM Shim: Put/Get information bits to ConfirmationData
  Introduce ConfirmationData

3 years agoBTM Shim: Put/Get information bits to ConfirmationData
Martin Brabham [Mon, 21 Sep 2020 17:12:30 +0000 (10:12 -0700)]
BTM Shim: Put/Get information bits to ConfirmationData

We need the io_caps, auth_reqs, and oob present to send to BTA.
We won't need this when the shim goes away, but for now its necessary.

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Test: atest --host bluetooth_test_gd
Change-Id: I3f3a2ba909ed4384ca44ad2ddca5b5ecda64822e

3 years agoIntroduce ConfirmationData
Martin Brabham [Thu, 17 Sep 2020 19:50:18 +0000 (12:50 -0700)]
Introduce ConfirmationData

ConfirmationData is an object to contain information
for passing to the UI via Display* functions defined
in the class Ui.

This consolidates the required function signature from 2-3 arguments
down to a single argument.  Additionally, we gain a feature
for putting and getting extra data.  This extra data mechanism
will allow for the SecurityModule to pass information to the shim
such as:

    - IO Capability
    - Authentication Requirements
    - MITM bit

It is required that we map these in the shim and pass them back to
BTA in order to drive the BTA state machine properly.

BYPASS_INCLUSIVE_LANGUAGE_REASON="following bluetooth specification terms"

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I30b19fb5a3d5fa3462cf4fdc5f47df5d5bb4c478

3 years agoBTA_AV: Unused variables
Hansong Zhang [Wed, 30 Sep 2020 23:54:55 +0000 (16:54 -0700)]
BTA_AV: Unused variables

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I9aa90fdb30e91cb61d4db4596d5f68743540d225

3 years agoL2CA_SetFlushTimeout does nothing.
Hansong Zhang [Wed, 30 Sep 2020 23:33:21 +0000 (16:33 -0700)]
L2CA_SetFlushTimeout does nothing.

Since LinkFlushTimeout is always 0 and we always set it to 0.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia6a87f45f59b4bb429aba98f921785b3e9e0d309

3 years agoL2cap: clean up flush timeout option
Hansong Zhang [Wed, 30 Sep 2020 23:30:40 +0000 (16:30 -0700)]
L2cap: clean up flush timeout option

Seems that only one value is used.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6da78ec6108cb34316199fb16b52bacee6bf74a1

3 years agoBTA_AV: Unused variable
Hansong Zhang [Wed, 30 Sep 2020 23:29:20 +0000 (16:29 -0700)]
BTA_AV: Unused variable

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0fbf4c28f24bd61aa500dc00f9da51dd5bc2234e

3 years agoBTA_AV: Simplify flush timeout parameter
Hansong Zhang [Wed, 30 Sep 2020 23:24:09 +0000 (16:24 -0700)]
BTA_AV: Simplify flush timeout parameter

Always 0.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ibd66605d65a421386b2b48766808b5be3f3c8e4e

3 years agoL2cap: our cfg option never uses flush timeout
Hansong Zhang [Wed, 30 Sep 2020 23:16:29 +0000 (16:16 -0700)]
L2cap: our cfg option never uses flush timeout

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1fe3a1192bf70d590926e7702aadb57722835a85

3 years agoMerge "Use bta/sys/bta_sys::BtaIdSysText()"
Treehugger Robot [Thu, 1 Oct 2020 03:06:17 +0000 (03:06 +0000)]
Merge "Use bta/sys/bta_sys::BtaIdSysText()"

3 years agoIncoming ACL packets stop at acl layer first
Chris Manton [Wed, 30 Sep 2020 22:46:41 +0000 (15:46 -0700)]
Incoming ACL packets stop at acl layer first

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest

Change-Id: Icbc0193a0db19c05f1edd5d4c3ea168819bae17b

3 years agoRe-log bta/../LOG_
Chris Manton [Fri, 4 Sep 2020 01:37:35 +0000 (18:37 -0700)]
Re-log bta/../LOG_

Towards readable logs

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: If2da96e529d07baa0e3f74d384833ce19d25b33a

3 years agoUse bta/sys/bta_sys::BtaIdSysText()
Chris Manton [Thu, 24 Sep 2020 06:11:42 +0000 (23:11 -0700)]
Use bta/sys/bta_sys::BtaIdSysText()

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest

Change-Id: I149985efc21bdad7b5039085226194c80877485f

3 years agoMerge "Add ACL shim event registration"
Treehugger Robot [Wed, 30 Sep 2020 22:53:40 +0000 (22:53 +0000)]
Merge "Add ACL shim event registration"

3 years agoMerge changes I2f2c69a4,I41a65c6c,I101aa769,I87d34f49,Ifb5e07f6, ...
Treehugger Robot [Wed, 30 Sep 2020 22:15:48 +0000 (22:15 +0000)]
Merge changes I2f2c69a4,I41a65c6c,I101aa769,I87d34f49,Ifb5e07f6, ...

* changes:
  Remove unnecessary declarations stack/btm/btm_sco
  Locally link and remove unused funcs stack/btm/btm_sco
  Re-log stack/btm/btm_ble_gap::btm_ble_update_inq_result
  Remove duplicate decls stack/btm/btm_int
  Locally link and remove unused funcs stack/btm/btm_inq
  Remove decl stack/btm/btm_int
  Locally link and remove unused funcs stack/btm/btm_devctl
  Locally link and remove unused funcs stack/btm/btm_ble_cont_energy
  Locally link and remove unused funcs stack/btm/btm_ble_adv_filter
  Locally link and remove unused funcs stack/btm/btm_ble_addr
  Remove unnecessary declarations stack/btm/btm_ble_int
  Remove duplicate decls
  Add bta/sys/bta_sys::BtaIdSysText()
  Re-log parts of btif/src/btif_storage
  Re-log parts of btif/src/btif_sock_thread
  Re-log btif/src/btif_sock_rfc::btsock_rfc_listen

3 years agoAdd ACL shim event registration
Chris Manton [Mon, 28 Sep 2020 20:15:06 +0000 (13:15 -0700)]
Add ACL shim event registration

Bug: 166280067
Tag: #refactor
Test: gd/cert/run --host
Test: ble paired 2 phones
Test: act.py -tc BleCocTest
Change-Id: Ie5c1fcf271c8af2d7e8ef32f43e87672c47d536b

3 years agoMerge "Properly update config when the MAC Address changes"
Sal Savage [Wed, 30 Sep 2020 20:06:18 +0000 (20:06 +0000)]
Merge "Properly update config when the MAC Address changes"

3 years agoRemove unnecessary declarations stack/btm/btm_sco
Chris Manton [Sun, 20 Sep 2020 02:41:02 +0000 (19:41 -0700)]
Remove unnecessary declarations stack/btm/btm_sco

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I2f2c69a445738420f0a316a1e4c36a879f6ce516

3 years agoLocally link and remove unused funcs stack/btm/btm_sco
Chris Manton [Wed, 30 Sep 2020 16:43:20 +0000 (09:43 -0700)]
Locally link and remove unused funcs stack/btm/btm_sco

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I41a65c6c12648868c804b1783558bb4aa1b96aed

3 years agoRe-log stack/btm/btm_ble_gap::btm_ble_update_inq_result
Chris Manton [Sat, 26 Sep 2020 23:24:26 +0000 (16:24 -0700)]
Re-log stack/btm/btm_ble_gap::btm_ble_update_inq_result

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I101aa7696dbb42661753cf6cd08f3c1dca5c4c6f

3 years agoRemove duplicate decls stack/btm/btm_int
Chris Manton [Sun, 20 Sep 2020 02:42:01 +0000 (19:42 -0700)]
Remove duplicate decls stack/btm/btm_int

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I87d34f49bc6a325d6dcc6ada7ac125fedd9cd9b3

3 years agoLocally link and remove unused funcs stack/btm/btm_inq
Chris Manton [Sun, 20 Sep 2020 02:40:37 +0000 (19:40 -0700)]
Locally link and remove unused funcs stack/btm/btm_inq

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: Ifb5e07f6ed4c34af4fb06765d9db53ef802ad24b

3 years agoRemove decl stack/btm/btm_int
Chris Manton [Sun, 20 Sep 2020 02:28:26 +0000 (19:28 -0700)]
Remove decl stack/btm/btm_int

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest

Change-Id: Ie3915f1024cd82063534b9898fc60fa3eb776f10

3 years agoLocally link and remove unused funcs stack/btm/btm_devctl
Chris Manton [Sun, 20 Sep 2020 02:27:54 +0000 (19:27 -0700)]
Locally link and remove unused funcs stack/btm/btm_devctl

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I1eda2d00df6b05437fdd1d5a9cb331f53d3a94fd

3 years agoLocally link and remove unused funcs stack/btm/btm_ble_cont_energy
Chris Manton [Sun, 20 Sep 2020 02:27:12 +0000 (19:27 -0700)]
Locally link and remove unused funcs stack/btm/btm_ble_cont_energy

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I7df768d8a8e953fed7478e527b97412511d2252f

3 years agoLocally link and remove unused funcs stack/btm/btm_ble_adv_filter
Chris Manton [Sun, 20 Sep 2020 01:46:52 +0000 (18:46 -0700)]
Locally link and remove unused funcs stack/btm/btm_ble_adv_filter

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I3d9da417cd70567e0f985c34500098827c4e842d

3 years agoLocally link and remove unused funcs stack/btm/btm_ble_addr
Chris Manton [Sun, 20 Sep 2020 01:45:52 +0000 (18:45 -0700)]
Locally link and remove unused funcs stack/btm/btm_ble_addr

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I38adcdc582a3330e2fab95310e5e706fa40e8c0d

3 years agoRemove unnecessary declarations stack/btm/btm_ble_int
Chris Manton [Sun, 20 Sep 2020 01:33:06 +0000 (18:33 -0700)]
Remove unnecessary declarations stack/btm/btm_ble_int

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest

Change-Id: I53c769dff909d282c57e558f69086fe4fa670e35

3 years agoRemove duplicate decls
Chris Manton [Sun, 20 Sep 2020 01:11:32 +0000 (18:11 -0700)]
Remove duplicate decls

Also in: stack/btm/btm_ble_int

Towards readable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: Id033e59c15e26fbba35294a2a148296f0f69e790

3 years agoAdd bta/sys/bta_sys::BtaIdSysText()
Chris Manton [Thu, 24 Sep 2020 06:11:30 +0000 (23:11 -0700)]
Add bta/sys/bta_sys::BtaIdSysText()

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest

Change-Id: Ie2bde0d4b46e3721d8523fa9293ddbc97e4e1fd2

3 years agoRe-log parts of btif/src/btif_storage
Chris Manton [Thu, 24 Sep 2020 18:18:41 +0000 (11:18 -0700)]
Re-log parts of btif/src/btif_storage

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: I2d2a3a44037a132f2361acb36d039e9d8c757c8d

3 years agoRe-log parts of btif/src/btif_sock_thread
Chris Manton [Thu, 24 Sep 2020 18:17:57 +0000 (11:17 -0700)]
Re-log parts of btif/src/btif_sock_thread

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: I455eba51f92a8185997fefc88fad4bfffc36cd0e

3 years agoRe-log btif/src/btif_sock_rfc::btsock_rfc_listen
Chris Manton [Thu, 24 Sep 2020 18:16:55 +0000 (11:16 -0700)]
Re-log btif/src/btif_sock_rfc::btsock_rfc_listen

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: Ie7839827710efa59e6181fd34cc7d1e4a3aad3cd

3 years agoCertSecurity: Add missing events to registration
Martin Brabham [Tue, 29 Sep 2020 23:34:05 +0000 (16:34 -0700)]
CertSecurity: Add missing events to registration

Bug: 169707911
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: Id28bcad19a0ee58e5127b47f52a6935d96bd6c67

3 years agoStore LE device keys when bonded
Jakub Pawlowski [Wed, 30 Sep 2020 17:21:38 +0000 (19:21 +0200)]
Store LE device keys when bonded

Bug: 142341141
Tag: #gd-refactor
Test: Pair LE device with phone, confirm that keys are in storage
Change-Id: Ia69b10dac9516d460faa26f2aae769fcfbae8780