OSDN Git Service
Chris Manton [Tue, 18 Aug 2020 20:40:14 +0000 (13:40 -0700)]
Add proper inclusion ordering
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I33b142077bc16b36aeb6d4e996829de9a96e571c
Chris Manton [Sun, 16 Aug 2020 22:17:15 +0000 (15:17 -0700)]
Remove unused defs stack/include/btm_api
BTM_FEATURE_BYTES_PER_PAGE
BTM_EXT_FEATURES_PAGE_MAX
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I44e728287f3656244d97b4bf126e07676050bd63
Chris Manton [Sun, 16 Aug 2020 17:47:42 +0000 (10:47 -0700)]
Use security interface stack/include/sec_hci_link_interface
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8a29a2766045b395e92874dafd518b45cc768371
Chris Manton [Sun, 16 Aug 2020 17:45:56 +0000 (10:45 -0700)]
Add security interface stack/include/sec_hci_link_interface
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5fe0f3629c6b2ecc379239a61884d6d935ed672a
Treehugger Robot [Wed, 19 Aug 2020 12:51:55 +0000 (12:51 +0000)]
Merge "GD-HCI: Write empty value to storage instead of nullptr"
Treehugger Robot [Wed, 19 Aug 2020 12:37:42 +0000 (12:37 +0000)]
Merge "Robust Caching - server hash calculation"
Łukasz Rymanowski [Tue, 18 Aug 2020 21:20:40 +0000 (23:20 +0200)]
stack/gatt: Store gatt client supported features
Tag: #feature
Bug:
159786353
Sponsor: jpawlowski@
Test: manual
Change-Id: I8cde2d62599d4d46a4e10babd0bf2f9d53886d5d
HsingYuan Lo [Wed, 19 Aug 2020 07:49:08 +0000 (15:49 +0800)]
Robust Caching - server hash calculation
Bug:
154056389
Test: atest net_test_stack_gatt_sr_hash_native
Tag: #feature
Change-Id: I6cf888a8733dfaf9fb0d4b96de454450610ebcff
Hansong Zhang [Wed, 19 Aug 2020 02:18:57 +0000 (19:18 -0700)]
Simplify BTM_SecAddDevice
Ah 0 is BTM_IO_CAP_OUT. When we load a device from storage, we always
it's display only.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0f51d2e03e58734e2244d959446e3728707edb27
Hansong Zhang [Wed, 19 Aug 2020 02:17:12 +0000 (19:17 -0700)]
Simplify bta_dm_add_device
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic105f51422e9b74b0d1984a3ec9d83edecfcd8af
Hansong Zhang [Wed, 19 Aug 2020 02:14:48 +0000 (19:14 -0700)]
BTA_DmAddDevice: is_trusted, tm, io_cap are 0
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I935b4284f1790ea9f1d3ce8173dd0afb8fd3c524
Zach Johnson [Wed, 19 Aug 2020 04:01:25 +0000 (04:01 +0000)]
Merge changes I228ee25f,I85914c62,I3a5c970d,I5f54b858,I6a885f21, ...
* changes:
report_dup is always true
Remove useless states
Flatten btm_set_inq_event_filter
pending_filt_complete_event is always zero
inqfilt_active is always false
Setting inqfilt_active to true has no effect
p_inq->state is always BTM_INQ_SET_FILT_STATE when calling
inqfilt_active is always true inside btm_set_inq_event_filter
Status is always success
p_inqfilter_cmpl_cb is never set
hci_status is always success
We never set the inquiry filter
btm_set_inq_event_filter always returns CMD_STARTED
Treehugger Robot [Wed, 19 Aug 2020 02:21:35 +0000 (02:21 +0000)]
Merge "GD Hack: Start service discovery on bonded"
Zach Johnson [Wed, 19 Aug 2020 00:15:20 +0000 (17:15 -0700)]
report_dup is always true
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I228ee25fab7cb06ec3198947e4715073c96876f1
Treehugger Robot [Wed, 19 Aug 2020 00:13:54 +0000 (00:13 +0000)]
Merge "GD-HCI Shim: Add missing cmds that do not generate cmd complete"
Zach Johnson [Wed, 19 Aug 2020 00:09:49 +0000 (17:09 -0700)]
Remove useless states
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I85914c6205d04481e48e9ae82511d2242d5920b3
Zach Johnson [Wed, 19 Aug 2020 00:08:31 +0000 (17:08 -0700)]
Flatten btm_set_inq_event_filter
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I3a5c970d973b821f015a922b7152dcee29c5994c
Zach Johnson [Wed, 19 Aug 2020 00:00:25 +0000 (17:00 -0700)]
pending_filt_complete_event is always zero
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5f54b858c761f11b06c57e2bc36ed62104cd31b5
Zach Johnson [Tue, 18 Aug 2020 23:48:38 +0000 (16:48 -0700)]
inqfilt_active is always false
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6a885f21b0d86aac83c9a113cead49f661e0a173
Zach Johnson [Tue, 18 Aug 2020 23:44:59 +0000 (16:44 -0700)]
Setting inqfilt_active to true has no effect
nothing meaningful happens between when it's set
and when it's set to false.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7379b1183f5c477cf092541b149247fe1f21ccd7
Zach Johnson [Tue, 18 Aug 2020 23:43:15 +0000 (16:43 -0700)]
p_inq->state is always BTM_INQ_SET_FILT_STATE when calling
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7b26fc89c7e46d229a991bd008b75ee7c08382b1
Zach Johnson [Tue, 18 Aug 2020 23:41:17 +0000 (16:41 -0700)]
inqfilt_active is always true inside btm_set_inq_event_filter
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I21b9d69407bf6261fac03f00139fa32958d4a1fa
Zach Johnson [Tue, 18 Aug 2020 23:39:01 +0000 (16:39 -0700)]
Status is always success
thank you for coming to my ted talk
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I665ad521ab2a42cf0e22ce8324d8c82d0c88d148
Zach Johnson [Tue, 18 Aug 2020 23:37:39 +0000 (16:37 -0700)]
p_inqfilter_cmpl_cb is never set
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib415c4bb82163b7b0f1ac2b59c8f30fdfbb8ed82
Zach Johnson [Tue, 18 Aug 2020 21:30:18 +0000 (14:30 -0700)]
hci_status is always success
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ibb1a0a50a0f9267ca8e5c47e85dc6cc1787e0bcf
Zach Johnson [Tue, 18 Aug 2020 21:26:57 +0000 (14:26 -0700)]
We never set the inquiry filter
skip going to HCI, and merge the callback function into the call
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1a1995c50dd7bab5b70f7f55ff82376f231ae2af
Zach Johnson [Tue, 18 Aug 2020 21:12:57 +0000 (14:12 -0700)]
btm_set_inq_event_filter always returns CMD_STARTED
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5f64552efe087a98d349f04408774eb9caec26bf
Hansong Zhang [Tue, 18 Aug 2020 23:46:44 +0000 (16:46 -0700)]
GD Hack: Start service discovery on bonded
We haven't unified the callback path from BTM or GD shim to BTA/BTIF
yet. We have to start service discovery specifically for GD at the
moment.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Test: connect to a speaker
Change-Id: I958c99b6943be36469096e8039ff95fda0026a0b
Zach Johnson [Tue, 18 Aug 2020 23:16:56 +0000 (23:16 +0000)]
Merge changes I7d5090ac,I74507676,I14148e2b,I2ca84a80
* changes:
Simplify btm_set_inq_event_filter
filter_cond_type is always BTM_CLR_INQUIRY_FILTER
Don't use redefinition - BTM_FILTER_COND_BD_ADDR
don't use the redefinition - BTM_FILTER_COND_DEVICE_CLASS
Jack He [Tue, 18 Aug 2020 22:28:40 +0000 (15:28 -0700)]
GD-HCI: Write empty value to storage instead of nullptr
* GD storage layer forbids writing nullptr
* Fix the instance in legacy stack that writes a nullptr when it
wants to write an empty value
Bug:
164979578
Tag: #gd-refactor
Test: pair with hearing aid devices
Change-Id: I8280c66f6862f92a9fbcb87b1a1216d59ad2983d
Treehugger Robot [Tue, 18 Aug 2020 22:04:52 +0000 (22:04 +0000)]
Merge changes I42c7ccd3,I4982180d
* changes:
GD Security: Improve link encryption storage
GD L2cap: Pass some security callback to Security Module
Treehugger Robot [Tue, 18 Aug 2020 21:19:23 +0000 (21:19 +0000)]
Merge changes I672c778a,I8fd857d8,I214e42ab,I4be78209
* changes:
Remove declarations stack/acl/btm_acl
Use btif_acl and bta_dm_acl in btm_acl
Add btif/include/btif_acl.h
Add bta/include/bta_dm_acl.h
Zach Johnson [Tue, 18 Aug 2020 18:00:59 +0000 (11:00 -0700)]
Simplify btm_set_inq_event_filter
it only has one mode now
next step will be to see if we can remove entirely
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7d5090ac6e10e1e8249fdfb72c64d458a334ef7c
Martin Brabham [Tue, 11 Aug 2020 23:20:01 +0000 (16:20 -0700)]
Remove unused API
Bug:
162984360
Tag: #refactor
Test: compiles and devices pair and work
Change-Id: Ibd24d354acfc5590dd67bed596d8b79b4b5c5b39
Treehugger Robot [Tue, 18 Aug 2020 20:09:08 +0000 (20:09 +0000)]
Merge "Add Disconnect Complete Matcher"
Hansong Zhang [Mon, 17 Aug 2020 22:05:38 +0000 (15:05 -0700)]
GD Security: Improve link encryption storage
Encryption is a property of link. We update it when we receive
encryption change event, and then continue L2cap security Enforce()
workflow.
For RFCOMM and OPP, we just need encryption (remote device is paired),
without authenticated link key or MITM.
Tag: #gd-refactor
Bug:
141555841
Test: cert/run --host
Change-Id: I42c7ccd3b8abac1acdef10833da574e4f798ef20
Jack He [Tue, 18 Aug 2020 07:41:15 +0000 (00:41 -0700)]
GD-HCI Shim: Add missing cmds that do not generate cmd complete
* When sending those events over GD HCI shim, we should not expect
command complete events
Bug:
164980031
Tag: #gd-refactor
Test: manually pair with LE devices after enabling HCI shim
Change-Id: I0b9aac7a038d64197795db5b03098d8587a6ef6f
Chris Manton [Sun, 16 Aug 2020 16:59:13 +0000 (09:59 -0700)]
Remove declarations stack/acl/btm_acl
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I672c778a3f4be6cba3b92e33ab00457e2930457d
Chris Manton [Sun, 16 Aug 2020 06:14:09 +0000 (23:14 -0700)]
Use btif_acl and bta_dm_acl in btm_acl
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8fd857d837b229f9fdbf5624b8ed35bbbb4d9ffd
Chris Manton [Sun, 16 Aug 2020 06:10:43 +0000 (23:10 -0700)]
Add btif/include/btif_acl.h
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I214e42abc1b5334f0f744b6fbe5e2600bdde35b2
Chris Manton [Sun, 16 Aug 2020 06:09:33 +0000 (23:09 -0700)]
Add bta/include/bta_dm_acl.h
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4be78209ce674ba493685db47d3ef11d3351fbe6
Mehdi Alizadeh [Tue, 18 Aug 2020 19:35:06 +0000 (19:35 +0000)]
Merge changes from topic "revert-
1402170-LQAXZAXPCC"
* changes:
Revert "Unused def include/hardware/bt_gatt_types::btgatt_transp..."
Revert "Removed unused file include/hardware/bt_gatt_types.h"
Hansong Zhang [Mon, 17 Aug 2020 19:45:31 +0000 (12:45 -0700)]
GD L2cap: Pass some security callback to Security Module
L2cap shouldn't need to know which security callback corresponds to
which security requirement fulfilled.
Tag: #gd-refactor
Bug:
141555841
Test: cert/run --host
Change-Id: I4982180d79ba30d193c019d11e7c33bce5385294
Mehdi Alizadeh [Tue, 18 Aug 2020 19:16:59 +0000 (19:16 +0000)]
Revert "Unused def include/hardware/bt_gatt_types::btgatt_transp..."
Revert submission
1402170
Bug:
165329887
Reason for revert: Breaking target docs on branch git_qt-qpr1-dev-plus-aosp
Reverted Changes:
Ifc81bd221:Unused def include/hardware/bt_gatt_types::btgatt_...
I59785ec5a:Removed unused file include/hardware/bt_gatt_types...
Change-Id: Ie89181741bad772b14d722ff0cb6823fc9c71860
Mehdi Alizadeh [Tue, 18 Aug 2020 19:16:59 +0000 (19:16 +0000)]
Revert "Removed unused file include/hardware/bt_gatt_types.h"
Revert submission
1402170
Bug:
165329887
Reason for revert: Breaking target docs on branch git_qt-qpr1-dev-plus-aosp
Reverted Changes:
Ifc81bd221:Unused def include/hardware/bt_gatt_types::btgatt_...
I59785ec5a:Removed unused file include/hardware/bt_gatt_types...
Change-Id: I41b9ac4ffae51adb0b62599320a5a568eaf81b36
Treehugger Robot [Tue, 18 Aug 2020 19:08:32 +0000 (19:08 +0000)]
Merge changes I8bff5eab,If1c63ebf,Ie62cae6a
* changes:
Wire up test to disconnect callback
Wire up callback in facade
Facade Configuration: Set disconnect callback.
Treehugger Robot [Tue, 18 Aug 2020 18:46:07 +0000 (18:46 +0000)]
Merge changes I5dc3b8e8,Ic31092da,I6c011ae8,I5c5fb8de,Ia1c04358, ...
* changes:
Remove cancel_pending flag
Nothing interesting happens with ble_raw_size or ble_raw_used
Nothing interesting happens with bta_dm_search_cb.p_ble_rawdata
Remove unused raw data concepts from discovery results
bta_dm_disc_result only happens in the discovery active state
no need to set layer specific for discovery
bta_dm_search_cancel can only happen in the active state
bta_dm_search_cmpl always transitions to idle
bta_dm_inq_cmpl can only happen in the active state
Remove unused parameter from bta_dm_free_sdp_db
Remove unused parameter from bta_dm_search_cmpl
Treehugger Robot [Tue, 18 Aug 2020 18:31:51 +0000 (18:31 +0000)]
Merge "hci: Support reading peer SCA"
Martin Brabham [Tue, 18 Aug 2020 18:17:00 +0000 (11:17 -0700)]
Add Disconnect Complete Matcher
Listen for DISCONNECT COMPLETE on Cert side
Bug:
164495896
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I86720d75b72ddebb7a30430c74859792f6467807
Łukasz Rymanowski [Tue, 11 Aug 2020 13:18:20 +0000 (15:18 +0200)]
hci: Support reading peer SCA
Bug:
150670922
Tag: #feature
Sponsor: jpawlowski@
Test: compilation
Change-Id: I11b4e63c527870ac6dfc8448de21efb433a68e12
Zach Johnson [Tue, 18 Aug 2020 17:55:34 +0000 (10:55 -0700)]
filter_cond_type is always BTM_CLR_INQUIRY_FILTER
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7450767649722c4a980bceee2b2282133066f991
Zach Johnson [Tue, 18 Aug 2020 17:27:27 +0000 (10:27 -0700)]
Don't use redefinition - BTM_FILTER_COND_BD_ADDR
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I14148e2bd2dc86c89ddc761e5990f1a4c3225ca9
Zach Johnson [Tue, 18 Aug 2020 17:24:28 +0000 (10:24 -0700)]
don't use the redefinition - BTM_FILTER_COND_DEVICE_CLASS
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I2ca84a80781bb0ad9ecd53cfed5b68991ee7130f
Zach Johnson [Tue, 18 Aug 2020 16:58:32 +0000 (09:58 -0700)]
Remove cancel_pending flag
it's not set anymore
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5dc3b8e8c6b7625b8ef43b1d9074ab7cc6eedc0e
Zach Johnson [Tue, 18 Aug 2020 09:10:34 +0000 (02:10 -0700)]
Nothing interesting happens with ble_raw_size or ble_raw_used
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic31092da6df5b9f203e5a45ccbfdcbd651c4ad71
Zach Johnson [Tue, 18 Aug 2020 09:08:13 +0000 (02:08 -0700)]
Nothing interesting happens with bta_dm_search_cb.p_ble_rawdata
data goes in, nothing comes out - can't explain that
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6c011ae81ed944fb670fefd7dba89510cd8338cc
Zach Johnson [Tue, 18 Aug 2020 09:03:36 +0000 (02:03 -0700)]
Remove unused raw data concepts from discovery results
They were set but never read.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5c5fb8de8925d97d24d18da73c1c33c563215624
Zach Johnson [Tue, 18 Aug 2020 08:51:44 +0000 (01:51 -0700)]
bta_dm_disc_result only happens in the discovery active state
instead of sending message, call directly
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia1c0435876a06279fae3328f14313677016ac44e
Zach Johnson [Tue, 18 Aug 2020 08:38:49 +0000 (01:38 -0700)]
no need to set layer specific for discovery
it was used to distinguish DI discovery from normal
DI wasn't used and is now gone
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I812d20a1e1d310ce09420d4f7f282bff0d352c26
Zach Johnson [Tue, 18 Aug 2020 02:23:33 +0000 (19:23 -0700)]
bta_dm_search_cancel can only happen in the active state
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id94ae72f838a754a39dbd5339a6892c8438e7897
Zach Johnson [Tue, 18 Aug 2020 02:22:22 +0000 (19:22 -0700)]
bta_dm_search_cmpl always transitions to idle
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I79bbb8243e207ed37efb92d308d68b53ad50963b
Zach Johnson [Tue, 18 Aug 2020 02:20:42 +0000 (19:20 -0700)]
bta_dm_inq_cmpl can only happen in the active state
no need to send a message, just do the thing
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I3aa56e4c7a8824f0d10aff6fcde51ca3420ae73e
Zach Johnson [Tue, 18 Aug 2020 02:16:37 +0000 (19:16 -0700)]
Remove unused parameter from bta_dm_free_sdp_db
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I38520e4a0f5825111d185e0cd48a56bb390c6632
Zach Johnson [Tue, 18 Aug 2020 02:14:43 +0000 (19:14 -0700)]
Remove unused parameter from bta_dm_search_cmpl
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I580786db99a33ad21b950ddc49bb90344117b5b6
Chris Manton [Sun, 16 Aug 2020 04:06:04 +0000 (21:06 -0700)]
Removed unused file include/hardware/bt_gatt_types.h
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I59785ec5ac43deb591c08248d912bf1c94d2c45e
Chris Manton [Sun, 16 Aug 2020 02:59:30 +0000 (19:59 -0700)]
Unused def include/hardware/bt_gatt_types::btgatt_transport_t
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ifc81bd221b3f59e09bac02f7b08b972583399213
HsingYuan Lo [Tue, 18 Aug 2020 07:30:32 +0000 (09:30 +0200)]
Robust Caching - client hash calculation
This code was extracted from a bigger patch in order to make review
easier.
Bug:
154056389
Test: atest net_test_stack_gatt_db_native
Tag: #feature
Change-Id: I7d1a90d656db3e58b9386c008c0aacdeae6c854a
Zach Johnson [Tue, 18 Aug 2020 07:41:20 +0000 (00:41 -0700)]
Fix error introduced in Ica18fd19ecf6718c88b9f24ba99a290a7abdaf99
Before:
if (bta_dm_search_cb.uuid_to_search == 0 ||
bta_dm_search_cb.service_index != BTA_BLE_SERVICE_ID)
After:
if (bta_dm_search_cb.service_index != BTA_BLE_SERVICE_ID)
bta_dm_search_cb.uuid_to_search was always 0, so it should the old code
was effectively
if (true || ...)
so it should have not had a conditional at all
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iddbd0b51b26711e2bc576e3d5499932fab434363
Treehugger Robot [Tue, 18 Aug 2020 06:05:48 +0000 (06:05 +0000)]
Merge "Remove stack/include/gatt_api::GATT_TRANSPORT_"
Chris Manton [Sun, 16 Aug 2020 02:52:50 +0000 (19:52 -0700)]
Remove stack/include/gatt_api::GATT_TRANSPORT_
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I3482cea0eda881b250644ef03c385889a7d70c2f
Zach Johnson [Tue, 18 Aug 2020 02:00:22 +0000 (19:00 -0700)]
🚨 memory leak 🚨 memory leak 🚨
bta_dm_search_cb.cancel_pending is only false
p_msg is only deallocated if it is sent, it is only
sent if cancel_pending is true
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I693ed9b377c5cb9f4109ed6d93071b238bcde8cd
Zach Johnson [Tue, 18 Aug 2020 01:58:23 +0000 (18:58 -0700)]
BTM_CancelInquiry always returns success
It's only called if inquiry is in progress
and inquiry can only happen if the device is up
so the single failure mode cannot happen.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id4d6fca5f8195ef344aa4115c068f0d195287efc
Zach Johnson [Tue, 18 Aug 2020 01:41:05 +0000 (18:41 -0700)]
Push BTA_ALL_SERVICE_MASK further into DmDiscover
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I3d5c6d1b91b2d105ae21bbd8091bbb5d756ee8ac
Zach Johnson [Tue, 18 Aug 2020 01:33:10 +0000 (18:33 -0700)]
Flatten the transport variants of service discovery
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie0b926e6ecbb11c1a24a9ec3b1eb6e25d5e9e246
Zach Johnson [Tue, 18 Aug 2020 01:25:16 +0000 (18:25 -0700)]
the service mask is always the same for BTA_DmDiscover
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I95ca0baa189308f3696fb9979487720258eb3505
Zach Johnson [Tue, 18 Aug 2020 01:08:19 +0000 (18:08 -0700)]
who doesn't like chicken parm?
They're always the same, no need to pass them around.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ied6c7493dfd25dc8dbec7ebe5ad7293310d9bb70
Zach Johnson [Tue, 18 Aug 2020 00:54:05 +0000 (17:54 -0700)]
Stop the redefinition madness
why, just why
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0c4494729871fe8f5455b504d09ee1a1b8d73a95
Zach Johnson [Tue, 18 Aug 2020 00:37:49 +0000 (17:37 -0700)]
Fold services into BTA_DmSearch, it's always 0
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia8a1605141ce49da3080bd3fda940fa3986972bd
Zach Johnson [Mon, 17 Aug 2020 23:54:45 +0000 (16:54 -0700)]
Split pending queue for search and discovery
Prep for consolidating state machine
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic35791e91d0e78a039661f1518f50ae8910f9261
Martin Brabham [Tue, 18 Aug 2020 00:18:13 +0000 (17:18 -0700)]
Wire up test to disconnect callback
Bug:
164495896
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I8bff5eab60ce5d24ed83c271b04a294c67fafc62
Martin Brabham [Mon, 17 Aug 2020 21:00:48 +0000 (14:00 -0700)]
Wire up callback in facade
Bug:
164495896
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: If1c63ebf80ad69b66d56bdd1fd2c0fcdfe880877
Martin Brabham [Mon, 17 Aug 2020 19:55:32 +0000 (12:55 -0700)]
Facade Configuration: Set disconnect callback.
Tests need to know when the ACL disconnects in order to continue
otherwise race conditions are triggered.
Bug:
164495896
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: Ie62cae6a8e639ddab1027138e5dfb03a6694e669
Zach Johnson [Mon, 17 Aug 2020 22:42:19 +0000 (15:42 -0700)]
Remove some unused DI fields/structs/messages
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I81de691d31ac3dda0ee80fb7612e95f60db08db9
Zach Johnson [Mon, 17 Aug 2020 22:38:46 +0000 (15:38 -0700)]
BTA_DM_DI_DISC_CMPL_EVT is never sent
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6f9f392b460b4d2c7a1df602cb2f830f2c98ec4e
Zach Johnson [Mon, 17 Aug 2020 22:26:18 +0000 (15:26 -0700)]
bta_dm_di_cb.p_di_db is never non-null
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iaf28113061e189eb2e20b2b40e471e82daaff01c
Zach Johnson [Mon, 17 Aug 2020 22:24:23 +0000 (15:24 -0700)]
layer specific is never BTA_DM_API_DI_DISCOVER_EVT
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie957ae3931a3d07da1c94bd261ea9cc752fccb9a
Zach Johnson [Mon, 17 Aug 2020 22:21:29 +0000 (15:21 -0700)]
Remove bta_dm_di_disc & callback
never called
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia47546e14cff5655f4afbba2a77f6a3a14c92bfc
Zach Johnson [Mon, 17 Aug 2020 22:18:16 +0000 (15:18 -0700)]
BTA_DM_API_DI_DISCOVER_EVT is never sent as an event
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Icda94de17095b72191e71a3cd1ac72e534697b78
Zach Johnson [Mon, 17 Aug 2020 22:03:45 +0000 (15:03 -0700)]
Flatten bte_dm_search_services_evt
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I31573725c590d840a1e4a3a6a310b903d475332a
Zach Johnson [Mon, 17 Aug 2020 21:52:02 +0000 (14:52 -0700)]
Flatten btm_dm_start_disc_gatt_services
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0182858361d38360213e2ab0e726c7efa97c745e
Zach Johnson [Mon, 17 Aug 2020 21:42:05 +0000 (14:42 -0700)]
Remove useless condition
If something is true || false it is always true
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib320e542f325bcca532ee9ee28d4ffe2eafef9a5
Zach Johnson [Mon, 17 Aug 2020 21:29:01 +0000 (14:29 -0700)]
bta_dm_search_cb.uuid is always empty
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I77b8e97b0b466fdd9201168e9f1bf1dd630ad76d
Zach Johnson [Mon, 17 Aug 2020 21:27:16 +0000 (14:27 -0700)]
bta_dm_search_cb.p_srvc_uuid is always null
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1bee87a4a70715d9be7431235ecdba091d24a438
Zach Johnson [Mon, 17 Aug 2020 21:21:56 +0000 (14:21 -0700)]
bta_dm_search_cb.uuid_to_search is always 0
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ica18fd19ecf6718c88b9f24ba99a290a7abdaf99
Zach Johnson [Mon, 17 Aug 2020 21:19:07 +0000 (14:19 -0700)]
bta_dm_search_cb.num_uuid is always 0
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I78c1f4b4eb7b55739416fcae634ba4ed58d04b35
Zach Johnson [Mon, 17 Aug 2020 21:16:55 +0000 (14:16 -0700)]
Remove variables never set for search
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I08c1b4dc8fdbc517074e691fb56f639472c21ab5
Zach Johnson [Mon, 17 Aug 2020 20:11:28 +0000 (13:11 -0700)]
Remove variables never set for discovery
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic10a53f160d86737da4ef7ef29f584331edca9f8
Zach Johnson [Mon, 17 Aug 2020 20:04:44 +0000 (13:04 -0700)]
Remove BTA_DmDiscoverUUID
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I92ff702991461f74e4cb3041f44d6f2b2755bfee
Zach Johnson [Mon, 17 Aug 2020 20:02:43 +0000 (13:02 -0700)]
Remove btif_dm_get_remote_service_record & friends from BTIF
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib032729f185d5a5dea560a8dfad6b35b02083ca7
Zach Johnson [Mon, 17 Aug 2020 22:33:51 +0000 (22:33 +0000)]
Merge "get_remote_service_record is never called from JNI"