OSDN Git Service
Zach Johnson [Wed, 19 Aug 2020 21:51:27 +0000 (14:51 -0700)]
Remove BTM_SEC_AUTHORIZED, it's only removed or checked
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0c200fd53f0ac1a932ab5b4c2ffd303481eef425
Zach Johnson [Wed, 19 Aug 2020 21:47:06 +0000 (14:47 -0700)]
BTM_SEC_OUT_FLAGS used to include authorized
but now it doesn't so we only need the condition
above this one
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ifad48ac18f92e9922eaa9fe04fe66ca04bbd80b2
Zach Johnson [Wed, 19 Aug 2020 21:43:35 +0000 (14:43 -0700)]
this used to check for authorized
BTM_SEC_IN_FLAGS was BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT |
BTM_SEC_IN_AUTHORIZE
authorized is gone now, so we only need the condition just above this
one
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iec6e7550b29a72627a8f52d8b49ae918c3adadce
Zach Johnson [Wed, 19 Aug 2020 21:39:18 +0000 (14:39 -0700)]
Remove always false expressions
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I68ff2112c0fc395e82a0b2ab6ed0cc1f3829915f
Zach Johnson [Wed, 19 Aug 2020 21:33:14 +0000 (14:33 -0700)]
This expression is also never true
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ibb8757817e59a0b4db26c9cf78b12f6ddf25633b
Zach Johnson [Wed, 19 Aug 2020 21:23:00 +0000 (14:23 -0700)]
This condition is never true
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iae859fcc90f6f297bb28c9528f3e2dafdbfd1d0e
Zach Johnson [Wed, 19 Aug 2020 21:22:07 +0000 (14:22 -0700)]
Simpify boolean expression
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic8717d02f73c5fc0ca2f6f7be4173b1574613490
Zach Johnson [Wed, 19 Aug 2020 21:19:31 +0000 (14:19 -0700)]
Remove useless redefinition BTM_SEC_FLAG_AUTHORIZED
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I93b35b22801192ce68a7472f729a1b5eb54fe4f1
Zach Johnson [Wed, 19 Aug 2020 21:15:50 +0000 (14:15 -0700)]
BTM_SEC_OUT_AUTHENTICATE is never set, only checked or removed
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I3d97507cba7aafefb6d49a2ab60b0132d4ff1cde
Zach Johnson [Wed, 19 Aug 2020 21:09:43 +0000 (14:09 -0700)]
BTM_SEC_IN_AUTHORIZE is never set, only checked or removed
For clarity, falsed out these expressions in these
super complicated conditionals.
A future patch set will remove them.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib7e9fcbc0c3018c38ea243974e22a3aa39c7f2f7
Zach Johnson [Wed, 19 Aug 2020 20:49:36 +0000 (13:49 -0700)]
Remove BTA_AV_WITH_AVCTP_AUTHORIZATION
It's always false.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I55953edf1676d347873262603ac207b6a1119512
Zach Johnson [Wed, 19 Aug 2020 20:45:08 +0000 (13:45 -0700)]
BTA_SEC_AUTHENTICATE does not include authorization
this expression can be simplified
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I51f7e771fd636910b9c0315020309005fded122f
Zach Johnson [Wed, 19 Aug 2020 20:14:25 +0000 (13:14 -0700)]
Flatten bta_av_cb.sec_mask
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iabde7f44b7e4fa3392f44e4316ef61c2dd51ff49
Zach Johnson [Wed, 19 Aug 2020 19:50:31 +0000 (12:50 -0700)]
The security mask is always BTA_SEC_AUTHENTICATE
don't pass in the message
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ibfd208530a89116eaff1e1e12484b00cd3b90283
Zach Johnson [Wed, 19 Aug 2020 19:46:47 +0000 (12:46 -0700)]
Internalize BTA_AvEnable's security mask
it's always BTA_SEC_AUTHENTICATE
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I95e60d014a4173b33a032873bc7ca39c629e2fa2
Zach Johnson [Wed, 19 Aug 2020 19:41:20 +0000 (12:41 -0700)]
Flatten BTA_SEC_AUTHORIZE
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic8167a794f880a416ad5c7cac87ed9abb1a63b7f
Treehugger Robot [Wed, 19 Aug 2020 21:10:46 +0000 (21:10 +0000)]
Merge changes I1f6a908f,I96781ecd,I4de2d029,Ib3e5580a,I5b615bb3
* changes:
BTM_ReadConnectability is never used now
BTM_ReadDiscoverability is never used now
Simplify BTM_SetDiscoverability
Simplify BTM_SetConnectability
Inline always 0 parameters
Treehugger Robot [Wed, 19 Aug 2020 20:57:37 +0000 (20:57 +0000)]
Merge changes I8fd02d8f,Ia21eeb73
* changes:
Remove unnecessary definition
GD SecurityRecord: Explicitly set IsEncrypted to false upon loading
Zach Johnson [Wed, 19 Aug 2020 20:30:34 +0000 (20:30 +0000)]
Merge changes I51c3b864,I2af0f2c2,Ifaec802b,I9ea573cb,I87154d64, ...
* changes:
what on earth
if you pass 0, these are the values used
These were never set
The params are never ignore, they're set in this function
Fold bt_scan_mode_t into BTA_DmSetVisibility
Flatten BTA_DmSetVisibility
Zach Johnson [Wed, 19 Aug 2020 20:10:47 +0000 (20:10 +0000)]
Merge changes I5f284c8c,I5f1afa5e,I5e7478e9,I9c717be1,Ie8d7e20a, ...
* changes:
read_inq_tx_power_timer is never used
p_inq_tx_power_cmpl_cb is always null
Remove dead code
btm_process_remote_name does nothing interesting if remote name not active
btm_inq_vars.scan_type is not useful
Remove useless variable
Status is set but not used
Replace with equivalent expression
Remove unnecessary variable
state is already set to this value higher in this function
Flatten btm_initiate_inquiry
BTM_BLE_LIMITED_INQUIRY is never used
BTM_LIMITED_INQUIRY is never set
Delete BTM_CancelPeriodicInquiry, it's unused and does nothing
BTM_PERIODIC_INQUIRY_ACTIVE is never set
This condition will never be met
Replace equivalent expression
Don't report illegal value for something uncontrollable
reduce duplicate mask setting
p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK is always true
Hansong Zhang [Wed, 19 Aug 2020 19:13:02 +0000 (12:13 -0700)]
Remove unnecessary definition
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8fd02d8f60207a2da8d4921694bcfa2628bc2fec
Hansong Zhang [Wed, 19 Aug 2020 19:04:48 +0000 (12:04 -0700)]
GD SecurityRecord: Explicitly set IsEncrypted to false upon loading
IsEncrypted is set to true only after Encryption Change event.
Test: cert/run --host
Tag: #gd-refactor
Bug:
141555841
Change-Id: Ia21eeb7321146480536a8cd98f854709fef2bc9c
Zach Johnson [Wed, 19 Aug 2020 18:53:25 +0000 (11:53 -0700)]
BTM_ReadConnectability is never used now
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1f6a908f0730b38b310992c5dc2b12d6397ee4f2
Zach Johnson [Wed, 19 Aug 2020 18:51:57 +0000 (11:51 -0700)]
BTM_ReadDiscoverability is never used now
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I96781ecd6ebd149b2a6e5d91b803f49cc675db9c
Zach Johnson [Wed, 19 Aug 2020 18:45:11 +0000 (11:45 -0700)]
Simplify BTM_SetDiscoverability
window & interval are fixed, and need no validation
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4de2d029cdd7192be34d7f87da0ad47c0b8f05fc
Zach Johnson [Wed, 19 Aug 2020 18:43:39 +0000 (11:43 -0700)]
Simplify BTM_SetConnectability
The windows are fixed defaults, and need no validation.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib3e5580af6d742333f2946d393d7bdcded7d9737
Zach Johnson [Wed, 19 Aug 2020 18:41:15 +0000 (11:41 -0700)]
Inline always 0 parameters
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5b615bb3f05bba1c461d3c8c3edcff2bc0dc658d
Zach Johnson [Wed, 19 Aug 2020 18:40:27 +0000 (18:40 +0000)]
Merge changes If3136d44,I7a3ee025,I734ece7f
* changes:
Remove inquiry filtering from shim
Remove unused filter_cond
max_resps is always 0: unlimited
Zach Johnson [Wed, 19 Aug 2020 18:25:04 +0000 (11:25 -0700)]
what on earth
this has been here since this code was put into AOSP
"oh hey, PAN_Register changes discoverable and connectable, let's work
around it by saving the initial values and then restoring them after."
anyways, I checked PAN_Register only sets initial state & registers with
l2cap.
this looks like a vestige of early PAN, probably from BTA days when this
was on feature phones they needed a way to make your phone discoverable
so you could use PAN.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I51c3b864b5c7c4847bcc2dfb84e55b6191146778
Treehugger Robot [Wed, 19 Aug 2020 18:25:38 +0000 (18:25 +0000)]
Merge "SecurityManagerChannel: AuthenticationRequest not always needed"
Zach Johnson [Wed, 19 Aug 2020 18:16:07 +0000 (11:16 -0700)]
if you pass 0, these are the values used
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I2af0f2c20275f4f521805fc43c2afb61c0a11545
Zach Johnson [Wed, 19 Aug 2020 18:10:01 +0000 (11:10 -0700)]
These were never set
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ifaec802bff1fa8e1cc497e86a7d22d458f18fae8
Zach Johnson [Wed, 19 Aug 2020 18:00:11 +0000 (11:00 -0700)]
The params are never ignore, they're set in this function
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I9ea573cbf85a16a0de641db8da7e274fe0ab1f06
Zach Johnson [Wed, 19 Aug 2020 17:53:29 +0000 (10:53 -0700)]
Fold bt_scan_mode_t into BTA_DmSetVisibility
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I87154d64544455296ddc5096b4540b6cd16df2d7
Zach Johnson [Wed, 19 Aug 2020 17:42:07 +0000 (10:42 -0700)]
Flatten BTA_DmSetVisibility
is called from main thread
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ied9f74092a83ec2e1f6b7912f40ba3295488626f
Łukasz Rymanowski [Wed, 19 Aug 2020 12:29:37 +0000 (14:29 +0200)]
gatt: Allow services to indicate eatt support
With this patch eatch client/server can decide if EATT support
should be enabled or not.
If eatt_support is set to true, and EATT is available, it will be used for services added.
If eatt_support is set to false, that means only ATT (CID 4) is used for services added.
Tag: #feature
Bug:
159786353
Sponsor: jpawlowski@
Test: compilation
Change-Id: I584172800ce32a4a11df465841d2bc49ab224939
Zach Johnson [Wed, 19 Aug 2020 17:27:25 +0000 (10:27 -0700)]
read_inq_tx_power_timer is never used
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5f284c8c0c3f0f9a7de57a417bce6d7e4bfb844c
Zach Johnson [Wed, 19 Aug 2020 17:25:48 +0000 (10:25 -0700)]
p_inq_tx_power_cmpl_cb is always null
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5f1afa5e3deaa03d36d5632e75eaae9d0474f470
Zach Johnson [Wed, 19 Aug 2020 17:02:19 +0000 (10:02 -0700)]
Remove dead code
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5e7478e92fc37ad395d9ce3b0dd79ea8961eb5f2
Zach Johnson [Wed, 19 Aug 2020 16:59:12 +0000 (09:59 -0700)]
btm_process_remote_name does nothing interesting if remote name not
active
this function call does nothing
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I9c717be170860977d53436ee22757f2bc3c4d64b
Zach Johnson [Wed, 19 Aug 2020 16:47:34 +0000 (09:47 -0700)]
btm_inq_vars.scan_type is not useful
was never checked to do anything interesting, was always general or none
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie8d7e20a11a5d256cc19504abdfdb893f18459f6
Zach Johnson [Wed, 19 Aug 2020 16:28:59 +0000 (09:28 -0700)]
Remove useless variable
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iba849f932fa1c5f06cf48b6d4ae79f02900420b0
Zach Johnson [Wed, 19 Aug 2020 16:27:38 +0000 (09:27 -0700)]
Status is set but not used
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I2601860b9c51c5127eb36016e0535006f4df4445
Zach Johnson [Wed, 19 Aug 2020 16:24:23 +0000 (09:24 -0700)]
Replace with equivalent expression
mode is always general
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia9df1ec83e14d84096bf140fe3033d346f35d518
Zach Johnson [Wed, 19 Aug 2020 16:23:17 +0000 (09:23 -0700)]
Remove unnecessary variable
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5ad18fbe67e6eac13261999937c8fc7400339d4d
Zach Johnson [Wed, 19 Aug 2020 16:22:27 +0000 (09:22 -0700)]
state is already set to this value higher in this function
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic7942d4a8fc2806497bc027ea3599d3fc961a44b
Zach Johnson [Wed, 19 Aug 2020 16:20:04 +0000 (09:20 -0700)]
Flatten btm_initiate_inquiry
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie57f63e5e3e598ab6d2caf0aae365831c95bb3b3
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 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 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 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 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 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
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
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:09:23 +0000 (00:09 -0700)]
SecurityManagerChannel: AuthenticationRequest not always needed
Just needed when we initiate pairing
Test: cert/run --host
Tag: #gd-refactor
Bug:
141555841
Change-Id: I00b163159a272ca859ac41cd3e661045afff8815
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