OSDN Git Service

android-x86/system-bt.git
3 years agoRootCanal: Check PIN on both sides
Myles Watson [Fri, 15 Jan 2021 01:27:27 +0000 (17:27 -0800)]
RootCanal: Check PIN on both sides

Bug: 148864229
Tag: #gd-refactor
Test: cert/run
Change-Id: I54801c552afe6cc1068c9104836fbe4a211d566c

3 years agoRootCanal: Reject unsolicited PIN responses
Myles Watson [Thu, 14 Jan 2021 01:36:19 +0000 (17:36 -0800)]
RootCanal: Reject unsolicited PIN responses

Bug: 148864229
Tag: #gd-refactor
Test: cert/run
Change-Id: Ic6bcd706e243ea37e949cefaa77f5fd02e197061

3 years agoMerge changes from topic "dip1.3"
Treehugger Robot [Fri, 8 Jan 2021 21:42:32 +0000 (21:42 +0000)]
Merge changes from topic "dip1.3"

* changes:
  Use Bluetooth UUID definitions of header file
  DIP: Implement API to get device identification information

3 years agoMerge "rusty-gd: Fill in new and parse methods for *Data structs"
Qasim Javed [Fri, 8 Jan 2021 20:11:04 +0000 (20:11 +0000)]
Merge "rusty-gd: Fill in new and parse methods for *Data structs"

3 years agoL2cap LE shim improvements
Hansong Zhang [Wed, 6 Jan 2021 21:13:39 +0000 (13:13 -0800)]
L2cap LE shim improvements

Implement connection updates

Test: CtsVerifier
Tag: #gd-refactor
Bug: 141555841
Change-Id: I52891feb017020d9d557e8dac209f0474a18524d

3 years agoFix crash when removing bond to HID device
Jakub Pawlowski [Fri, 8 Jan 2021 13:05:58 +0000 (14:05 +0100)]
Fix crash when removing bond to HID device

This fixes:
JNI DETECTED ERROR IN APPLICATION: a thread (tid 4760 is making JNI calls
without being attached in call to ExceptionCheck

Bug: none
Test: manually connect and unbond HID device
Tag: #feature
Change-Id: I2f8bd0be6229c84ef34bd236962f00a69e630c5c

3 years agogd_acl: Assert with handle value
Chris Manton [Fri, 8 Jan 2021 01:45:07 +0000 (17:45 -0800)]
gd_acl: Assert with handle value

Toward stable code

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

3 years agoMerge changes Idef1560b,I40243c0f,I5c466874,Ie4d1438c,I38a17794, ...
Treehugger Robot [Fri, 8 Jan 2021 01:14:01 +0000 (01:14 +0000)]
Merge changes Idef1560b,I40243c0f,I5c466874,Ie4d1438c,I38a17794, ...

* changes:
  Complete hci legacy interface
  Re-log bta/ag/bta_ag_sco::bta_ag_remove_sco
  Re-log bta/ag/bta_ag_cmd::bta_ag_hfp_result
  Re-log bta/ag/bta_ag_main::bta_ag_api_result
  Add and use tBTM_CB::tACL_CB::Init
  Un-include stack/btm/btm_int
  Properly include stack/test/common/mock_btm_layer
  Use tACL_CONN::SupportsSecureConnections
  Use proper types bta/ag/bta_ag_sco::tBTA_AG_EVT
  Declare stack/gatt/gatt_utils::btm_ble_read_sec_key_size
  Add stack/include/hcidefs::hci_mode_text
  Use btm_client_interface::init,free
  btm_loghistory: HeadsetInterface::PhoneStateChange
  Use inclusive language
  Enum-ify stack/smp/smp_int::tSMP_EVENT,tSMP_BR_EVENT
  Various inclusion stack/::
  Add API btm_client_interface methods
  Declare explicitly global tBTM_CB
  Move stack/include/hcimsgs#defs into ble compilation unit
  Move stack/include/hcimsgs#defs into br_edr compilation unit
  Spell check HCIC_BLE_ENCRYPT_KEY_SIZE

3 years agorusty-gd: Fill in new and parse methods for *Data structs
Qasim Javed [Wed, 6 Jan 2021 22:36:10 +0000 (14:36 -0800)]
rusty-gd: Fill in new and parse methods for *Data structs

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

Change-Id: Ifff55709c1a3d65ca443351e2e08effdd2fa34d8

3 years agoComplete hci legacy interface
Chris Manton [Thu, 7 Jan 2021 03:38:39 +0000 (19:38 -0800)]
Complete hci legacy interface

Towards modular and testable code

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

Change-Id: Idef1560bb863b3fc400f2f2ec2cbc5c4495abf6d

3 years agoRe-log bta/ag/bta_ag_sco::bta_ag_remove_sco
Chris Manton [Fri, 18 Dec 2020 00:08:57 +0000 (16:08 -0800)]
Re-log bta/ag/bta_ag_sco::bta_ag_remove_sco

Towards loggable code

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

Change-Id: I40243c0f58e142f6eddbcd85810446d0b3a70f5c

3 years agoRe-log bta/ag/bta_ag_cmd::bta_ag_hfp_result
Chris Manton [Fri, 18 Dec 2020 00:08:34 +0000 (16:08 -0800)]
Re-log bta/ag/bta_ag_cmd::bta_ag_hfp_result

Towards loggable code

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

Change-Id: I5c46687486a1648c614ede6f495d7a13de3916fd

3 years agoRe-log bta/ag/bta_ag_main::bta_ag_api_result
Chris Manton [Sat, 19 Dec 2020 01:57:56 +0000 (17:57 -0800)]
Re-log bta/ag/bta_ag_main::bta_ag_api_result

Towards loggable code

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

Change-Id: Ie4d1438ced9daa7d74bea8c470508fdf562f045c

3 years agoAdd and use tBTM_CB::tACL_CB::Init
Chris Manton [Sat, 19 Dec 2020 04:22:26 +0000 (20:22 -0800)]
Add and use tBTM_CB::tACL_CB::Init

Towards encapsulated code

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

Change-Id: I38a17794c6f0af25b40d8b095621d9df658dff42

3 years agoUn-include stack/btm/btm_int
Chris Manton [Wed, 6 Jan 2021 01:42:27 +0000 (17:42 -0800)]
Un-include stack/btm/btm_int

Towards readable code

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

Change-Id: I1271da085b9ea67e579796e20e3664773ceefcd8

3 years agoProperly include stack/test/common/mock_btm_layer
Chris Manton [Thu, 7 Jan 2021 20:07:59 +0000 (12:07 -0800)]
Properly include stack/test/common/mock_btm_layer

Towards readable code

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

3 years agoUse tACL_CONN::SupportsSecureConnections
Chris Manton [Sat, 2 Jan 2021 03:12:36 +0000 (19:12 -0800)]
Use tACL_CONN::SupportsSecureConnections

Towards encapsulated code

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

Change-Id: I7bfe087dcc28cfaeb492db1e1a6ec276e1e29ce2

3 years agoUse proper types bta/ag/bta_ag_sco::tBTA_AG_EVT
Chris Manton [Tue, 15 Dec 2020 02:25:58 +0000 (18:25 -0800)]
Use proper types bta/ag/bta_ag_sco::tBTA_AG_EVT

Towards readable code

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

Change-Id: I43215ff771cb4163ced273778e527b63891287e7

3 years agoDeclare stack/gatt/gatt_utils::btm_ble_read_sec_key_size
Chris Manton [Wed, 6 Jan 2021 01:49:43 +0000 (17:49 -0800)]
Declare stack/gatt/gatt_utils::btm_ble_read_sec_key_size

Towards readable code

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

Change-Id: I6b2a9a8205ef3d393e4b85907f89bf222a26cce2

3 years agoAdd stack/include/hcidefs::hci_mode_text
Chris Manton [Sat, 19 Dec 2020 01:59:54 +0000 (17:59 -0800)]
Add stack/include/hcidefs::hci_mode_text

Towards loggable code

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

Change-Id: I3ad073e4db75aad362c02e0e96d768ba40bb8452

3 years agoUse btm_client_interface::init,free
Chris Manton [Wed, 6 Jan 2021 01:48:55 +0000 (17:48 -0800)]
Use btm_client_interface::init,free

Towards modular code

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

Change-Id: Iba73720c0ded4b6091ad2bbec1ff4d9225fa731d

3 years agobtm_loghistory: HeadsetInterface::PhoneStateChange
Chris Manton [Thu, 17 Dec 2020 22:38:49 +0000 (14:38 -0800)]
btm_loghistory: HeadsetInterface::PhoneStateChange

Towards loggable code

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

Change-Id: I3aee041f42df8446ee6853f2a6c9ee356c808b27

3 years agoUse inclusive language
Chris Manton [Wed, 6 Jan 2021 21:12:49 +0000 (13:12 -0800)]
Use inclusive language

Towards inclusive language

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

Change-Id: Icb382782abddf5a63e1145b6a9f5e65526540fb7

3 years agoEnum-ify stack/smp/smp_int::tSMP_EVENT,tSMP_BR_EVENT
Chris Manton [Sun, 11 Oct 2020 23:58:33 +0000 (16:58 -0700)]
Enum-ify stack/smp/smp_int::tSMP_EVENT,tSMP_BR_EVENT

Towards readable code

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

Change-Id: Idf496f1d8156cab0c7c3db3418f3dffa4645eb3a

3 years agoVarious inclusion stack/::
Chris Manton [Wed, 6 Jan 2021 01:45:08 +0000 (17:45 -0800)]
Various inclusion stack/::

Towards readable code

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

Change-Id: Iba63fafcfe774cbf1e29c39fd5cf8ca7e67b918d

3 years agoAdd API btm_client_interface methods
Chris Manton [Wed, 6 Jan 2021 01:39:22 +0000 (17:39 -0800)]
Add API btm_client_interface methods

Towards modular code

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

Change-Id: I2b73a014bb83ccb65bc8db71dda4389f69a39536

3 years agoDeclare explicitly global tBTM_CB
Chris Manton [Wed, 6 Jan 2021 01:37:38 +0000 (17:37 -0800)]
Declare explicitly global tBTM_CB

Towards modular code

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

Change-Id: Ia9f3f8208e4fd439196137e023e176ca95f645b4

3 years agoMove stack/include/hcimsgs#defs into ble compilation unit
Chris Manton [Tue, 5 Jan 2021 21:11:15 +0000 (13:11 -0800)]
Move stack/include/hcimsgs#defs into ble compilation unit

Removing unnecessary exposure

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

Change-Id: I99c216852f96a8d12b1bdafc73414dc0ad03ff02

3 years agoMove stack/include/hcimsgs#defs into br_edr compilation unit
Chris Manton [Tue, 5 Jan 2021 21:06:10 +0000 (13:06 -0800)]
Move stack/include/hcimsgs#defs into br_edr compilation unit

Removing unnecessary exposure

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

Change-Id: I103052d539966f9055d8aaad7a415ce4d617044e

3 years agoSpell check HCIC_BLE_ENCRYPT_KEY_SIZE
Chris Manton [Wed, 6 Jan 2021 21:26:58 +0000 (13:26 -0800)]
Spell check HCIC_BLE_ENCRYPT_KEY_SIZE

Towards readable code

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

Change-Id: I0097d9f4b3e428a6a1dcf1ed732a14f7b46a287b

3 years agoRevert "Updateability: Remove IBluetoothHeadsetPhone aidl"
chapin [Thu, 7 Jan 2021 17:00:29 +0000 (17:00 +0000)]
Revert "Updateability: Remove IBluetoothHeadsetPhone aidl"

Revert submission 1311861-BluetoothInCallService

Reason for revert: Bug: 176883407
Reverted Changes:
Ie3a5ceda5:UpdateAbility: Implement BluetoothInCallService an...
I2e3bc64eb:Updateability: Remove IBluetoothHeadsetPhone aidl
If26bab4ad:Bluetooth updateability: Move BluetoothPhoneServic...

Change-Id: Ia301026b4ce2cadd5e27c878f74f91c504be014f

3 years agoMerge "Implement bluetooth interface functions to check if a headset supports voice...
Treehugger Robot [Thu, 7 Jan 2021 17:55:04 +0000 (17:55 +0000)]
Merge "Implement bluetooth interface functions to check if a headset supports voice recognition as well as echo cancellation and/or noise reduction"

3 years agoMerge "Implement robust caching (server)"
HsingYuan Lo [Thu, 7 Jan 2021 10:00:58 +0000 (10:00 +0000)]
Merge "Implement robust caching (server)"

3 years agoImplement bluetooth interface functions to check if a headset supports
Rahul Sabnis [Mon, 14 Dec 2020 19:02:44 +0000 (11:02 -0800)]
Implement bluetooth interface functions to check if a headset supports
voice recognition as well as echo cancellation and/or noise reduction

Tag: #feature
Bug: 172960943
Test: Manual
Change-Id: I5e78b05f1bc5e4a44c506e02fe5fc79fdf3aebfd

3 years agohci_legacy_interface: Add Start/Cancel Inquiry
Chris Manton [Tue, 5 Jan 2021 18:20:53 +0000 (10:20 -0800)]
hci_legacy_interface: Add Start/Cancel Inquiry

Towards testable code

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

Change-Id: Ieb9aa232ccc29de4aec15b722ff7a105859a1ca4

3 years agoRe-log btif/src/btif_hf::btif_hf_upstreams_evt
Chris Manton [Thu, 17 Dec 2020 21:49:41 +0000 (13:49 -0800)]
Re-log btif/src/btif_hf::btif_hf_upstreams_evt

Towards loggable code

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

Change-Id: Ice0d88dfa5a2e80740ff86b4380d39eb2257b675

3 years agoRe-log bta/ag/bta_ag_main::bta_ag_sm_execute
Chris Manton [Sat, 26 Dec 2020 23:46:06 +0000 (15:46 -0800)]
Re-log bta/ag/bta_ag_main::bta_ag_sm_execute

Towards loggable code

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

Change-Id: I2fd4a4772fecbb36b21bdfca4d9dfa7149e7e00b

3 years agoRe-log bta/ag/bta_ag_sco::bta_ag_create_sco
Chris Manton [Tue, 15 Dec 2020 01:11:27 +0000 (17:11 -0800)]
Re-log bta/ag/bta_ag_sco::bta_ag_create_sco

Towards loggable code

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

Change-Id: I4379286bbe807d1af840c1c6c1e7a71cdcf75d44

3 years agoRe-log bta/ag/bta_ag_main::bta_ag_api_result
Chris Manton [Sat, 26 Dec 2020 23:45:57 +0000 (15:45 -0800)]
Re-log bta/ag/bta_ag_main::bta_ag_api_result

Towards readable code

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

Change-Id: I3ee72fb91801b185fe85edb0a00296749da3b56e

3 years agoUse get_btm_client_interface().security.BTM_SecRegister
Chris Manton [Mon, 4 Jan 2021 06:40:28 +0000 (22:40 -0800)]
Use get_btm_client_interface().security.BTM_SecRegister

Towards readable code

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

Change-Id: Ie54f7af90ba5000fd7a27f153e7e61419dc6fbbb

3 years agoUse get_btm_client_interface().lifecycle.BTM_GetHCIConnHandle
Chris Manton [Mon, 4 Jan 2021 01:36:44 +0000 (17:36 -0800)]
Use get_btm_client_interface().lifecycle.BTM_GetHCIConnHandle

Towards readable code

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

Change-Id: I6b694e5e29e53857498c765b777720c0a73fce0b

3 years agoEnum-ify stack/include/btm_api_types::BTM_AUTH_
Chris Manton [Thu, 5 Nov 2020 22:27:00 +0000 (14:27 -0800)]
Enum-ify stack/include/btm_api_types::BTM_AUTH_

Towards readable code

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

Change-Id: I5e17d7d826bbae3570efd9dbf2ae35cf0f11d484

3 years agoDeclare stack/include/btm_::init/free
Chris Manton [Wed, 6 Jan 2021 02:10:42 +0000 (18:10 -0800)]
Declare stack/include/btm_::init/free

Towards readable code

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

Change-Id: I7cb8e5813ae2657ffd24f01fe0d9037e06741e3f

3 years agoAdd stack/include/hcidefs::tHCI_ENCRYPT_MODE
Chris Manton [Wed, 30 Dec 2020 20:35:12 +0000 (12:35 -0800)]
Add stack/include/hcidefs::tHCI_ENCRYPT_MODE

Towards readable code

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

Change-Id: Ib4332bd4c0bbb8ba3fe9cb6ae981a9841c608591

3 years agoRe-arrange fields stack/include/acl_api_types::tBTM_
Chris Manton [Fri, 1 Jan 2021 17:13:55 +0000 (09:13 -0800)]
Re-arrange fields stack/include/acl_api_types::tBTM_

Towards encapsulation

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

Change-Id: I08a54cae0087fb9b0dcdf060e2a445f63a64a481

3 years agoEnum-ify bta/dm/bta_dm_int::tBTA_DM_CONN_STATE
Chris Manton [Sat, 5 Dec 2020 01:01:50 +0000 (17:01 -0800)]
Enum-ify bta/dm/bta_dm_int::tBTA_DM_CONN_STATE

Towards readable code

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

Change-Id: I9f67a9c775a5183a705c822b71810cd880f1faee

3 years agoRe-log stack/gatt/gatt_main::gatt_notify_phy_updated
Chris Manton [Wed, 6 Jan 2021 01:48:34 +0000 (17:48 -0800)]
Re-log stack/gatt/gatt_main::gatt_notify_phy_updated

Towards loggable code

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

Change-Id: I5ceaa69338345de6c0ac3497c0e572be04bbeb58

3 years agoEnum-ify stack/include/gatt_api::tGATT_DISC_TYPE
Chris Manton [Fri, 20 Nov 2020 03:06:01 +0000 (19:06 -0800)]
Enum-ify stack/include/gatt_api::tGATT_DISC_TYPE

Towards readable code

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

Change-Id: I4ced3dce19de69bc700e6f1d1a79e64c7aeb11a2

3 years agoEnum-ify stack/include/gatt_api::GATT_REASON
Chris Manton [Fri, 20 Nov 2020 02:13:14 +0000 (18:13 -0800)]
Enum-ify stack/include/gatt_api::GATT_REASON

Towards readable code

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

Change-Id: I4432ffbfaeb2167840ff9873787ed96bc7858c66

3 years agoAdd stack/gatt/gatt_int::kGattConnected/Disconnected
Chris Manton [Fri, 20 Nov 2020 01:44:36 +0000 (17:44 -0800)]
Add stack/gatt/gatt_int::kGattConnected/Disconnected

Towards readable code

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

Change-Id: Iad9e85c56975f7ca97dfb62d4f5348c03aacc2f5

3 years agoEnum-ify stack/smp/smp_int::SMP_MODEL_
Chris Manton [Fri, 6 Nov 2020 17:30:39 +0000 (09:30 -0800)]
Enum-ify stack/smp/smp_int::SMP_MODEL_

Towards readable code

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

Change-Id: I5ba9e3743a9d2374304caa10a24fca625d137bcf

3 years agoEnum-ify stack/include/smp_api_types::SMP_AUTH_
Chris Manton [Fri, 6 Nov 2020 17:26:34 +0000 (09:26 -0800)]
Enum-ify stack/include/smp_api_types::SMP_AUTH_

Towards readable code

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

Change-Id: I8992cea91fff8c793f2caa32545b43c3759d71bb

3 years agoAdd tACL_CONN::is_power_mode_pending
Chris Manton [Sat, 26 Dec 2020 23:42:50 +0000 (15:42 -0800)]
Add tACL_CONN::is_power_mode_pending

Towards readable code

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

Change-Id: I51e850cda37bc626943bc161ca48d2fe9ded5529

3 years agoUse tACL_CB::DefaultPacketTypes
Chris Manton [Sun, 13 Dec 2020 01:13:46 +0000 (17:13 -0800)]
Use tACL_CB::DefaultPacketTypes

Towards encapsulation

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

3 years agoLE L2cap shim: Implement fixed channel timeout
Hansong Zhang [Wed, 30 Dec 2020 22:54:32 +0000 (14:54 -0800)]
LE L2cap shim: Implement fixed channel timeout

Implement timeout settings with Fixed channel acquire/release.  So far
we only have two timeout options: no timeout, and disconnect
immediately, which we can use existing methods to implement.

Test: CtsVerifier
Tag: #gd-refactor
Bug: 141555841
Change-Id: If262e2773575b5c3c99a7286d66ca5f6a7fe7e58

3 years agoMerge "gd: Implement register/unregister scanner"
Treehugger Robot [Wed, 6 Jan 2021 14:30:22 +0000 (14:30 +0000)]
Merge "gd: Implement register/unregister scanner"

3 years agoMerge "Refactor scanning callback mechanism for GD"
Treehugger Robot [Wed, 6 Jan 2021 14:00:06 +0000 (14:00 +0000)]
Merge "Refactor scanning callback mechanism for GD"

3 years agoMerge RQ1A.210105.003 to aosp-master - DO NOT MERGE
Bill Yi [Wed, 6 Jan 2021 02:30:22 +0000 (18:30 -0800)]
Merge RQ1A.210105.003 to aosp-master - DO NOT MERGE

Merged-In: I729cc4a1d85ec47af278d5f81a52991fdd174113
Merged-In: I0748c425ef7e832293ae2c5344e265f89677c4e2
Change-Id: I17eee2454dc223a1caa0ad40817a5d5c927716a5

3 years agoMerge "Make it possible to pass multiple BLE services to settings"
Treehugger Robot [Tue, 5 Jan 2021 22:53:25 +0000 (22:53 +0000)]
Merge "Make it possible to pass multiple BLE services to settings"

3 years agoMerge changes Ia9c30515,Ie2fe04cd,I334e82ed,Idf55cc17,Id0815ac6, ...
Treehugger Robot [Tue, 5 Jan 2021 21:21:04 +0000 (21:21 +0000)]
Merge changes Ia9c30515,Ie2fe04cd,I334e82ed,Idf55cc17,Id0815ac6, ...

* changes:
  Properly type bta_ag_at_hsp_cback::tBTA_AG_EVT
  Enum-ify stack/include/btm_api_types::tBTM_IO_CAP
  Enum-ify bta/av/bta_av_int::BTA_AV_RS_
  Enum-ify stack/btm/security_device_record::tBTM_SM4_
  Enum-ify stack/include/l2cdefs::tL2CAP_CONN
  Enum-ify stack/include/btm_api_types::BTM_LE_KEY
  Enum-ify stack/avdt/avdt_int::AVDT_CCB_
  Enum-ify bta/include/bta_ag_api::tBTA_AG_EVT
  Add bta/ag/bta_ag_int::tBTA_AG_API_RESULT::ToString
  Consolidate exits stack/acl/btm_acl::hci_start_role_switch_to_central
  Add BTM_LogHistory to BTM_RemoveSco
  Enum-ify bta/include/bta_ag_api::tBTA_AG_RES
  Add tACL_CONN::SupportsSecureConnections
  Re-log stack/btm/btm_sco::btm_sco_disc_chk_pend_for_modechange
  Re-log bta/av/bta_av_main::bta_av_sco_chg_cback
  Re-log bta/ag/bta_ag_sco::bta_ag_sco_event
  Re-log bta/ag/bta_ag_sco::bta_ag_sco_disc_cback
  Add tACL_CONN::RemoteAddress
  Introduce btm client interface
  Properly include stack/include/hci_error_code::<string>

3 years agoL2cap shim: fix L2CA_SendFixedChnlData
Hansong Zhang [Tue, 29 Dec 2020 23:11:54 +0000 (15:11 -0800)]
L2cap shim: fix L2CA_SendFixedChnlData

The return value should be L2CAP_DW_*

Test: CtsVerifier
Tag: #gd-refactor
Bug: 141555841
Change-Id: I729cc4a1d85ec47af278d5f81a52991fdd174113

3 years agoMake it possible to pass multiple BLE services to settings
Jakub Pawlowski [Tue, 29 Dec 2020 14:57:38 +0000 (15:57 +0100)]
Make it possible to pass multiple BLE services to settings

In BTIF layer, instead of passing just one service when it is discovered,
wait until service discovery is finished, and then go through whole list.

This enables us to pass multiple services from one device. This will be
useful for the LE Audio profile.

Bug: 176477621
Tag: #feature
Test: manually tested with LE and dual mode devices
Change-Id: I58ec5ff1740a6197b1a26ec74d21bd70b2f244d4

3 years agoProperly type bta_ag_at_hsp_cback::tBTA_AG_EVT
Chris Manton [Sat, 26 Dec 2020 23:45:32 +0000 (15:45 -0800)]
Properly type bta_ag_at_hsp_cback::tBTA_AG_EVT

Careful...integer width differs

Towards readable code

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

Change-Id: Ia9c3051547825d6e48f55345ece973160e2aa429

3 years agoEnum-ify stack/include/btm_api_types::tBTM_IO_CAP
Chris Manton [Thu, 5 Nov 2020 23:11:29 +0000 (15:11 -0800)]
Enum-ify stack/include/btm_api_types::tBTM_IO_CAP

Towards readable code

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

Change-Id: Ie2fe04cda49801502d85d66091904d062e2d0064

3 years agoEnum-ify bta/av/bta_av_int::BTA_AV_RS_
Chris Manton [Thu, 15 Oct 2020 17:15:23 +0000 (10:15 -0700)]
Enum-ify bta/av/bta_av_int::BTA_AV_RS_

Also add BtaAvRoleSwitchText

Towards readable and loggable code

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

Change-Id: I334e82ed2d5bb7860b4089b2f2c00158bfb7c2f3

3 years agoEnum-ify stack/btm/security_device_record::tBTM_SM4_
Chris Manton [Fri, 16 Oct 2020 21:14:55 +0000 (14:14 -0700)]
Enum-ify stack/btm/security_device_record::tBTM_SM4_

Towards readable code

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

Change-Id: Idf55cc17565dcc19dec61d2d477438044af7e318

3 years agoEnum-ify stack/include/l2cdefs::tL2CAP_CONN
Chris Manton [Sun, 11 Oct 2020 23:57:42 +0000 (16:57 -0700)]
Enum-ify stack/include/l2cdefs::tL2CAP_CONN

Towards readable code

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

Change-Id: Id0815ac6ed901b03d660b84d044a0ef903e222ff

3 years agoEnum-ify stack/include/btm_api_types::BTM_LE_KEY
Chris Manton [Thu, 10 Sep 2020 03:34:37 +0000 (20:34 -0700)]
Enum-ify stack/include/btm_api_types::BTM_LE_KEY

Towards readable code

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

3 years agoEnum-ify stack/avdt/avdt_int::AVDT_CCB_
Chris Manton [Sun, 20 Dec 2020 19:04:25 +0000 (11:04 -0800)]
Enum-ify stack/avdt/avdt_int::AVDT_CCB_

Towards readable code

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

Change-Id: I671c666b03bc7baed46901421ecbaf7c74ff9942

3 years agoEnum-ify bta/include/bta_ag_api::tBTA_AG_EVT
Chris Manton [Tue, 15 Dec 2020 02:17:13 +0000 (18:17 -0800)]
Enum-ify bta/include/bta_ag_api::tBTA_AG_EVT

Towards readable code

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

Change-Id: Ic430d4ca56ce4c734e9f8cf3b157f466a646d8a6

3 years agoAdd bta/ag/bta_ag_int::tBTA_AG_API_RESULT::ToString
Chris Manton [Tue, 15 Dec 2020 05:22:10 +0000 (21:22 -0800)]
Add bta/ag/bta_ag_int::tBTA_AG_API_RESULT::ToString

Towards loggable code

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

Change-Id: I66a697dec3da605b3580975557bb17fe9e69b0ba

3 years agoConsolidate exits stack/acl/btm_acl::hci_start_role_switch_to_central
Chris Manton [Thu, 17 Dec 2020 06:50:17 +0000 (22:50 -0800)]
Consolidate exits stack/acl/btm_acl::hci_start_role_switch_to_central

Also add role switch into hci interface

Towards readable code

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

Change-Id: Icd473efe6ee8c6e0032dd5f5d4d4ed2880537ba1

3 years agoAdd BTM_LogHistory to BTM_RemoveSco
Chris Manton [Wed, 16 Dec 2020 22:23:20 +0000 (14:23 -0800)]
Add BTM_LogHistory to BTM_RemoveSco

Towards loggable code

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

Change-Id: Ifabbe8cf65fc56dbe43105d9cd133a7b6ae97025

3 years agoEnum-ify bta/include/bta_ag_api::tBTA_AG_RES
Chris Manton [Tue, 15 Dec 2020 05:22:28 +0000 (21:22 -0800)]
Enum-ify bta/include/bta_ag_api::tBTA_AG_RES

Also add bta_ag_result_text

Towards readable and loggable code

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

Change-Id: I192fd3060cbf0ab739af37b8ebda29edab87c3c5

3 years agoAdd tACL_CONN::SupportsSecureConnections
Chris Manton [Sat, 2 Jan 2021 03:11:49 +0000 (19:11 -0800)]
Add tACL_CONN::SupportsSecureConnections

Towards encapsulation

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

Change-Id: I4ede2886aa5d90bfab8fccea5edaed70ad1514e7

3 years agoRe-log stack/btm/btm_sco::btm_sco_disc_chk_pend_for_modechange
Chris Manton [Mon, 14 Dec 2020 23:28:35 +0000 (15:28 -0800)]
Re-log stack/btm/btm_sco::btm_sco_disc_chk_pend_for_modechange

Towards loggable code

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

Change-Id: I7ad0d2e091ae5e89718f9a5fddb74c2025afd909

3 years agoRe-log bta/av/bta_av_main::bta_av_sco_chg_cback
Chris Manton [Mon, 14 Dec 2020 23:27:47 +0000 (15:27 -0800)]
Re-log bta/av/bta_av_main::bta_av_sco_chg_cback

Towards loggable code

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

Change-Id: I2f5e63c5b647e0913a319808170cfd7983c59a5d

3 years agoRe-log bta/ag/bta_ag_sco::bta_ag_sco_event
Chris Manton [Mon, 14 Dec 2020 23:27:32 +0000 (15:27 -0800)]
Re-log bta/ag/bta_ag_sco::bta_ag_sco_event

Towards loggable code

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

Change-Id: I47a60377dd59377e757ccc8e675c477649f8bed0

3 years agoRe-log bta/ag/bta_ag_sco::bta_ag_sco_disc_cback
Chris Manton [Mon, 14 Dec 2020 23:27:21 +0000 (15:27 -0800)]
Re-log bta/ag/bta_ag_sco::bta_ag_sco_disc_cback

Towards loggable code

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

Change-Id: Idd8ec314c9fd1109f43f0aed4e0795d1281a97a9

3 years agogd: Implement register/unregister scanner
Chienyuan [Tue, 5 Jan 2021 07:08:02 +0000 (15:08 +0800)]
gd: Implement register/unregister scanner

Tag: #refactor
Bug: 169390539
Test: gd/cert/run --host
Change-Id: I677c53501fc19cefa716d053b06698d2b29d4e6d

3 years agoAdd tACL_CONN::RemoteAddress
Chris Manton [Thu, 31 Dec 2020 01:12:15 +0000 (17:12 -0800)]
Add tACL_CONN::RemoteAddress

Towards encapsulation

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

Change-Id: Ifc6ee3fe951a34d03a44bdd5273294651c4a0686

3 years agoIntroduce btm client interface
Chris Manton [Mon, 4 Jan 2021 01:35:22 +0000 (17:35 -0800)]
Introduce btm client interface

Eventually replace compile-time deps with interfaces

Towards modular code

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

Change-Id: If50e41e9f4c2c7bff4eabebe34df9e485972928c

3 years agoProperly include stack/include/hci_error_code::<string>
Chris Manton [Sun, 3 Jan 2021 18:51:37 +0000 (10:51 -0800)]
Properly include stack/include/hci_error_code::<string>

Towards loggable code

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

Change-Id: I02a8eb926c478b40a8d6e37443ef2cbf2f2f5d0e

3 years agoRefactor scanning callback mechanism for GD
Chienyuan [Wed, 30 Dec 2020 09:55:49 +0000 (17:55 +0800)]
Refactor scanning callback mechanism for GD

Tag: #refactor
Bug: 169390539
Test: gd/cert/run --host
Test: test/run_unit_tests.sh bluetoothtbd_test
Change-Id: I95478172ae83028e377a0bc195fd90dd64e455b3

3 years agoRe-log stack/l2cap/l2c_link::l2c_link_timeout
Chris Manton [Sat, 26 Dec 2020 23:06:35 +0000 (15:06 -0800)]
Re-log stack/l2cap/l2c_link::l2c_link_timeout

Towards loggable code

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

Change-Id: I2b979cc5d9d38af829b03092a66f4e67b1bf05c5

3 years agoRe-log stack/btm/btm_sco.::btm_sco_removed
Chris Manton [Sat, 26 Dec 2020 23:06:26 +0000 (15:06 -0800)]
Re-log stack/btm/btm_sco.::btm_sco_removed

Towards loggable code

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

Change-Id: I41c61bab20c2b5fdd544dcb66fd6d0e8dab68813

3 years agobtm_loghistory stack/btm/btm_sco::BTM_CreateSco
Chris Manton [Sat, 26 Dec 2020 23:06:07 +0000 (15:06 -0800)]
btm_loghistory stack/btm/btm_sco::BTM_CreateSco

Towards loggable code

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

Change-Id: I48603cf0fccc0eba5086ae9a6c0f3431382a824b

3 years agoRe-log btif/src/btif_profile_queue::btif_queue_connect_next
Chris Manton [Sat, 26 Dec 2020 23:05:35 +0000 (15:05 -0800)]
Re-log btif/src/btif_profile_queue::btif_queue_connect_next

Towards loggable code

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

Change-Id: I4393c8c2a5a1e13500c782d4ad694c0194b226e0

3 years agoRe-log btif/src/btif_profile_queue::queue_int_add
Chris Manton [Sat, 26 Dec 2020 23:05:26 +0000 (15:05 -0800)]
Re-log btif/src/btif_profile_queue::queue_int_add

Towards loggable code

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

Change-Id: I3c6f66f8bf3f02a6ad5d9029f8ff77aebb50a625

3 years agoRe-log btif/src/btif_profile_queue::ConnectNode
Chris Manton [Sat, 26 Dec 2020 23:05:07 +0000 (15:05 -0800)]
Re-log btif/src/btif_profile_queue::ConnectNode

Towards loggable code

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

Change-Id: I8a11860ac67c7700b8fad18094ee1b334a08c7b5

3 years agoRe-log btif/src/btif_hf::HeadsetInterface::PhoneStateChange
Chris Manton [Sat, 26 Dec 2020 23:04:45 +0000 (15:04 -0800)]
Re-log btif/src/btif_hf::HeadsetInterface::PhoneStateChange

Towards loggable code

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

Change-Id: I15eaff0ca87530a27c4ac52d85c1e38aa87fb4e0

3 years agoRe-log btif/src/btif_av::src_connect_sink
Chris Manton [Sat, 26 Dec 2020 23:04:26 +0000 (15:04 -0800)]
Re-log btif/src/btif_av::src_connect_sink

Towards loggable code

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

Change-Id: I2771820eb4a6cb4be372284d56b94ff6d4fdfce3

3 years agobtm_loghistory: btm_sec_auth_complete::Bonding
Chris Manton [Mon, 14 Dec 2020 06:47:17 +0000 (22:47 -0800)]
btm_loghistory: btm_sec_auth_complete::Bonding

Towards loggable code

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

Change-Id: I785ae8c22b6fed7a7f95a46dc5d026a0ef9f7328

3 years agoConsolidate exits stack/btm/btm_sec:NotifyBondingChange
Chris Manton [Mon, 14 Dec 2020 06:46:37 +0000 (22:46 -0800)]
Consolidate exits stack/btm/btm_sec:NotifyBondingChange

Towards readable code

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

Change-Id: I60dbeba12920ef4434cf2ccc91dcd8821ce8fbab

3 years agoAdd btm_history for btif/src/btif_av::a2dp
Chris Manton [Mon, 14 Dec 2020 06:21:40 +0000 (22:21 -0800)]
Add btm_history for btif/src/btif_av::a2dp

Towards readable code

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

Change-Id: I72835a8d229002d9f963e2c8c476605bf125bd01

3 years agoRemove friends stack/acl/acl::
Chris Manton [Fri, 1 Jan 2021 01:15:43 +0000 (17:15 -0800)]
Remove friends stack/acl/acl::

Towards readable code

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

Change-Id:
I73de315993083bf7756fb9c33be4150e040bc89a

Change-Id: Ie104ecf307d2a620dc6187c9008222e2f43b2672

3 years agoUse tACL_CONN::is_transport_
Chris Manton [Fri, 11 Dec 2020 00:28:58 +0000 (16:28 -0800)]
Use tACL_CONN::is_transport_

Towards encapsulated code

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

Change-Id: I065acf0d31c25750649249336120fa7acf62b33b

3 years agoRe-log StackAclBtmAcl::btm_acl_role_changed
Chris Manton [Fri, 11 Dec 2020 00:28:48 +0000 (16:28 -0800)]
Re-log StackAclBtmAcl::btm_acl_role_changed

Towards loggable code

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

Change-Id: I8161729fc4f71f2c7dcf1b33ec73dfe4f861b8c4

3 years agoRe-log BTM_SetPowerMode
Chris Manton [Fri, 11 Dec 2020 00:21:10 +0000 (16:21 -0800)]
Re-log BTM_SetPowerMode

Towards loggable code

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

Change-Id: Id7c72fa3eff6a88d3574bcf2a8d715badd87e2c8

3 years agoRemove #ifdef BTM_SSR_INCLUDED
Chris Manton [Sun, 20 Dec 2020 17:14:05 +0000 (09:14 -0800)]
Remove #ifdef BTM_SSR_INCLUDED

SSR may not be used but will be compiled.

Towards readable code

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