OSDN Git Service
Zach Johnson [Wed, 19 Aug 2020 16:03:42 +0000 (09:03 -0700)]
BTM_BLE_LIMITED_INQUIRY is never used
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I925a74fdfd9e91f0e19710fdb1a2212e425f6d7a
Zach Johnson [Wed, 19 Aug 2020 01:26:13 +0000 (18:26 -0700)]
BTM_LIMITED_INQUIRY is never set
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7d2593f1b89186fa5dc3352aea10d031a20f9913
Zach Johnson [Wed, 19 Aug 2020 01:19:38 +0000 (18:19 -0700)]
Delete BTM_CancelPeriodicInquiry, it's unused and does nothing
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I70128ef7190ada299a743c408ed2055d37c2f2cd
Zach Johnson [Wed, 19 Aug 2020 01:10:18 +0000 (18:10 -0700)]
BTM_PERIODIC_INQUIRY_ACTIVE is never set
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ice5231bdfadfc594cd47c2b7a14dc8bd70cbcafd
Zach Johnson [Wed, 19 Aug 2020 01:01:20 +0000 (18:01 -0700)]
This condition will never be met
It's always BTM_GENERAL_INQUIRY, so it will never be true.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1611a616f099cb5d802bb1c75d2ae6aeb1f95c38
Zach Johnson [Wed, 19 Aug 2020 00:59:19 +0000 (17:59 -0700)]
Replace equivalent expression
The function sets the mode to include BTM_BLE_GENERAL_INQUIRY, the mask
would only return this value.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I9a0cf06035c7eac2638dd86ac9b4ab73354f99e6
Zach Johnson [Wed, 19 Aug 2020 00:57:14 +0000 (17:57 -0700)]
Don't report illegal value for something uncontrollable
used to be in a param, but now it's not, just ignore
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7331be05a7da3735216f32f016d1717cc0daf919
Zach Johnson [Wed, 19 Aug 2020 00:55:53 +0000 (17:55 -0700)]
reduce duplicate mask setting
p_inq->inqparms.mode &= ~BTM_BLE_INQUIRY_MASK happens anyways at the end
of the function
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I31feb81556fc7cfbc643347e6a24ecb0d8b1c14d
Zach Johnson [Wed, 19 Aug 2020 00:54:57 +0000 (17:54 -0700)]
p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK is always true
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I378d43c6460108e2e72cee7973440d8e883274c1
Zach Johnson [Wed, 19 Aug 2020 00:51:36 +0000 (17:51 -0700)]
Remove inquiry filtering from shim
not used in the legacy after all
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If3136d4441c87763ed1df67f781b850ec02deb47
Zach Johnson [Wed, 19 Aug 2020 00:49:11 +0000 (17:49 -0700)]
Remove unused filter_cond
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7a3ee0254989798cd016f26cf09ad6ecf2f42673
Zach Johnson [Wed, 19 Aug 2020 00:30:24 +0000 (17:30 -0700)]
max_resps is always 0: unlimited
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I734ece7fed7426795ea7ccfd0b3c7121ffe08655
Treehugger Robot [Wed, 19 Aug 2020 17:12:55 +0000 (17:12 +0000)]
Merge changes Idcd959b1,I33b14207,I44e72828,I8a29a276,I5fe0f362
* changes:
Make stack/acl/acl.h more inclusive
Add proper inclusion ordering
Remove unused defs stack/include/btm_api
Use security interface stack/include/sec_hci_link_interface
Add security interface stack/include/sec_hci_link_interface
Treehugger Robot [Wed, 19 Aug 2020 16:39:48 +0000 (16:39 +0000)]
Merge "GD L2cap: Fix OnEncryptionChange"
Treehugger Robot [Wed, 19 Aug 2020 16:39:05 +0000 (16:39 +0000)]
Merge "btif: remove dead code"
Chris Manton [Tue, 18 Aug 2020 23:17:07 +0000 (16:17 -0700)]
Make stack/acl/acl.h more inclusive
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Idcd959b180ca040ff11c0f37fb6833181af1a8f2
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 07:00:18 +0000 (00:00 -0700)]
GD L2cap: Fix OnEncryptionChange
Tag: #gd-refactor
Bug:
141555841
Test: cert/run --host
Change-Id: If436aff838931dd413dad71d75ce28c3fb67cfd2
Hansong Zhang [Wed, 19 Aug 2020 05:43:04 +0000 (22:43 -0700)]
btif: remove dead code
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I90498300df0cd82cd824b307026ddb3894cbcf60
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