OSDN Git Service
Treehugger Robot [Thu, 20 Aug 2020 17:16:37 +0000 (17:16 +0000)]
Merge "Ensure IO Cap Response received before processing UserConfirmationRequest" am:
a63b1eef93
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405674
Change-Id: I95e24d14e9ecf6fe1f2e869dcb685335cffdac2c
Treehugger Robot [Thu, 20 Aug 2020 17:09:36 +0000 (17:09 +0000)]
Merge "Ensure IO Cap Response received before processing UserConfirmationRequest"
Treehugger Robot [Thu, 20 Aug 2020 17:03:37 +0000 (17:03 +0000)]
Merge changes I83637165,I4af96edd,I8e0ef282,I6bd6f659,I25e6810c, ... am:
7b5c5cba7d
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405671
Change-Id: Icf865fd9bff51b9a20c358624c1190664a2ae951
Treehugger Robot [Thu, 20 Aug 2020 16:40:08 +0000 (16:40 +0000)]
Merge changes I83637165,I4af96edd,I8e0ef282,I6bd6f659,I25e6810c, ...
* changes:
Wrap l2c::IsBonding in API
Streamline includes stack/l2cap/l2c_link
Move l2cu_get_next_buffer_to_send
Move stack/l2cap/::l2cu_get_next_channel_in_rr
Remove def L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
Remove def L2CAP_NUM_FIXED_CHNLS Optimization
Jakub Tyszkowski [Thu, 20 Aug 2020 15:54:31 +0000 (15:54 +0000)]
stack/btm: Support Reading Peer SCA am:
b59379b6ca
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1353772
Change-Id: I006399ccfb41410ecd7af32502ee2fa230894c2e
Chris Manton [Thu, 20 Aug 2020 06:04:53 +0000 (23:04 -0700)]
Wrap l2c::IsBonding in API
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8363716501145101ea025bd44aa35fa7f870b2eb
Chris Manton [Thu, 20 Aug 2020 00:50:06 +0000 (17:50 -0700)]
Streamline includes stack/l2cap/l2c_link
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4af96eddeb1dd30d10b766df1f617b4381a4e2f3
Chris Manton [Thu, 20 Aug 2020 00:23:45 +0000 (17:23 -0700)]
Move l2cu_get_next_buffer_to_send
From: stack/l2cap/l2c_utils
Into: stack/l2cap/l2c_link
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8e0ef282d5bae9a0deb0e465b326d7889d67d5e8
Chris Manton [Thu, 20 Aug 2020 00:27:41 +0000 (17:27 -0700)]
Move stack/l2cap/::l2cu_get_next_channel_in_rr
From: stack/l2cap/l2c_utils
Into: stack/l2cap/l2c_link
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6bd6f659d312c893564de7d3c07d429d38da76a8
Chris Manton [Wed, 19 Aug 2020 23:40:24 +0000 (16:40 -0700)]
Remove def L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I25e6810c157914ebca1d5d135394f70c4f3ffdaf
Chris Manton [Wed, 19 Aug 2020 23:10:27 +0000 (16:10 -0700)]
Remove def L2CAP_NUM_FIXED_CHNLS Optimization
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Idbfc3b0dd32cdb6161b38f8436e4b5d3a89b6d0a
Jakub Pawlowski [Thu, 20 Aug 2020 12:42:35 +0000 (12:42 +0000)]
Merge "btm: Initial Iso Manager implementation" am:
c55a0e8f0e
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1353770
Change-Id: I0976ea5973aedda82619ee3bdd942e052322f069
Jakub Tyszkowski [Tue, 18 Aug 2020 11:15:55 +0000 (13:15 +0200)]
stack/btm: Support Reading Peer SCA
Bug:
150670922
Tag: #feature
Sponsor: jpawlowski@
Test: compilation
Change-Id: Ia65d8aea66850a780909c240291934ea668cb6ea
Jakub Pawlowski [Thu, 20 Aug 2020 12:33:38 +0000 (12:33 +0000)]
Merge "btm: Initial Iso Manager implementation"
Treehugger Robot [Thu, 20 Aug 2020 11:49:21 +0000 (11:49 +0000)]
Merge "GD-HCI: Flush snoop log to kernel buffer on every write" am:
e3a5239a92
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405316
Change-Id: Ib24868326ffa039734944a90f91d212f1501d3e2
Zach Johnson [Thu, 20 Aug 2020 11:49:15 +0000 (11:49 +0000)]
Merge changes Ic895dce8,I80b661d6,I108d89b0,Ia0963f5e,I63d2703c, ... am:
b5c8af6af8
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405597
Change-Id: I9c464a042061bb0813bb3fcfea6775b9699472d7
Treehugger Robot [Thu, 20 Aug 2020 11:36:19 +0000 (11:36 +0000)]
Merge "GD-HCI: Flush snoop log to kernel buffer on every write"
Zach Johnson [Thu, 20 Aug 2020 11:34:35 +0000 (11:34 +0000)]
Merge changes Ic895dce8,I80b661d6,I108d89b0,Ia0963f5e,I63d2703c, ...
* changes:
More security flag hidings
More security flag hiding
More security flag hiding
Flatten BTA_JvIsEncrypted
Simplify BTA_JvIsEncrypted
Start hiding security flags
We don't do AMP
Remove p_authorize_callback, it's never used
btm_sec_are_all_trusted is never called
trusted_mask is self refrential and always 0
Remove trusted_mask from BTM_SecBond
Remove trusted mask from BTM_SecAddDevice
BTM_SEC_IS_SERVICE_TRUSTED is never used
BTM_SecClrTempAuthService does nothing
last_author_service_id is never meaningfully set
Remove BTM_SEC_AUTHORIZED, it's only removed or checked
Jakub Tyszkowski [Thu, 20 Aug 2020 10:58:19 +0000 (10:58 +0000)]
btm: Initial Iso Manager implementation
This adds the ISO Manager used to manage the CIG/CIS and
in future patches also BIG/BIS channels. It defines an API
for the user to call and callback interfaces that the user
has to implement and register in the ISO Manager to use it.
Bug:
150670922
Tag: #feature
Test: atest --host net_test_btm_iso
Sponsor: jpawlowski@
Change-Id: I0f4719b6efb74a7350cf3d6d9263bf855d60ce6f
Zach Johnson [Thu, 20 Aug 2020 10:28:58 +0000 (10:28 +0000)]
Merge changes Ifad48ac1,Iec6e7550,I68ff2112,Ibb875781,Iae859fcc, ... am:
7a729122b1
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405314
Change-Id: I6b43faab0f5cf67e6f60e14dc9047eed1fd4a273
Zach Johnson [Thu, 20 Aug 2020 10:20:38 +0000 (10:20 +0000)]
Merge changes Ifad48ac1,Iec6e7550,I68ff2112,Ibb875781,Iae859fcc, ...
* changes:
BTM_SEC_OUT_FLAGS used to include authorized
this used to check for authorized
Remove always false expressions
This expression is also never true
This condition is never true
Simpify boolean expression
Remove useless redefinition BTM_SEC_FLAG_AUTHORIZED
BTM_SEC_OUT_AUTHENTICATE is never set, only checked or removed
BTM_SEC_IN_AUTHORIZE is never set, only checked or removed
Remove BTA_AV_WITH_AVCTP_AUTHORIZATION
BTA_SEC_AUTHENTICATE does not include authorization
Flatten bta_av_cb.sec_mask
The security mask is always BTA_SEC_AUTHENTICATE
Internalize BTA_AvEnable's security mask
Flatten BTA_SEC_AUTHORIZE
Treehugger Robot [Thu, 20 Aug 2020 09:47:02 +0000 (09:47 +0000)]
Merge "Add boolean flag for indicating IO Cap Response received" am:
5dd4773ef3
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405673
Change-Id: I8b5e1174683b88084c7e1887d003df5af54d1c9f
Treehugger Robot [Thu, 20 Aug 2020 09:27:23 +0000 (09:27 +0000)]
Merge "Add boolean flag for indicating IO Cap Response received"
Treehugger Robot [Thu, 20 Aug 2020 08:59:18 +0000 (08:59 +0000)]
Merge "Ensure we delete the link key from the controller." am:
3523729335
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405672
Change-Id: I2c22c6b2017088e5e5903204de6d944b50ec2a0d
Treehugger Robot [Thu, 20 Aug 2020 08:44:21 +0000 (08:44 +0000)]
Merge "Ensure we delete the link key from the controller."
Jack He [Thu, 20 Aug 2020 08:29:24 +0000 (01:29 -0700)]
GD-HCI: Flush snoop log to kernel buffer on every write
* std::ofstream::flush() pushes user data into kernel memory. The data
will be written even if this process crashes. However, data will be lost
if there is a kernel panic, which is out of scope of BT snoop log.
* std::ofstream::write() followed by std::ofstream::flush() has similar
effect as UNIX write(fd, data, len) as write() syscall dumps data into
kernel memory directly
* Before this change, btsnoop log data might be partially stored in
memory when bluetooth stack crashes, causing broken log entries
or missing packets
Bug:
164973960
Test: make, flash phone, and test pairing
Tag: #gd-refactor
Change-Id: I611e0b9480511b569dadbb023775b0db8159f39d
Chris Manton [Thu, 20 Aug 2020 08:27:27 +0000 (08:27 +0000)]
Simplify stack/l2cap/::l2c_link_check_send_pkts am:
1f098dd15b
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405097
Change-Id: I21c8e9b76584acc45ce85111a910277c0f78e155
Martin Brabham [Thu, 20 Aug 2020 06:03:03 +0000 (23:03 -0700)]
Ensure IO Cap Response received before processing UserConfirmationRequest
Bug:
162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: Iab245ff61b9a747b6a93336f7a75e2f3e4727054
Zach Johnson [Thu, 20 Aug 2020 01:34:16 +0000 (18:34 -0700)]
More security flag hidings
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic895dce8b28a9a1dffca1800580dfd08b2c55941
Zach Johnson [Thu, 20 Aug 2020 01:13:55 +0000 (18:13 -0700)]
More security flag hiding
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I80b661d6a6e438368428927e8f1e803b0638696b
Zach Johnson [Thu, 20 Aug 2020 01:08:34 +0000 (18:08 -0700)]
More security flag hiding
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I108d89b0c340e5114a129f5af639a8a8fc5e2678
Zach Johnson [Thu, 20 Aug 2020 00:56:27 +0000 (17:56 -0700)]
Flatten BTA_JvIsEncrypted
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia0963f5e1ef783eb48b29e61ac5cbc96d62b5614
Zach Johnson [Thu, 20 Aug 2020 00:54:21 +0000 (17:54 -0700)]
Simplify BTA_JvIsEncrypted
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I63d2703c50fdaa67db035ce954b68ff681022d51
Zach Johnson [Thu, 20 Aug 2020 00:50:41 +0000 (17:50 -0700)]
Start hiding security flags
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia88a7e71b4a2b4b8347a6f12a2f6d362232d090d
Zach Johnson [Thu, 20 Aug 2020 00:14:58 +0000 (17:14 -0700)]
We don't do AMP
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I87ab869e151465995728bd84ee9fa4b5b068bb4c
Zach Johnson [Thu, 20 Aug 2020 00:10:35 +0000 (17:10 -0700)]
Remove p_authorize_callback, it's never used
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I781796e16a5170aa69c344e54a6bcdcfc69fb7ee
Zach Johnson [Wed, 19 Aug 2020 23:16:16 +0000 (16:16 -0700)]
btm_sec_are_all_trusted is never called
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6dfd7e4e16091ac55a4b30a4eb4bf4783a0efba2
Zach Johnson [Wed, 19 Aug 2020 23:08:43 +0000 (16:08 -0700)]
trusted_mask is self refrential and always 0
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4659415431ce835b2c8082a3c0f3fc65bf71cf82
Zach Johnson [Wed, 19 Aug 2020 22:33:32 +0000 (15:33 -0700)]
Remove trusted_mask from BTM_SecBond
it's always zero, does nothing, is useless
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4a4f7141fbd7d06e2e7d281416424c87da3033eb
Zach Johnson [Wed, 19 Aug 2020 22:08:31 +0000 (15:08 -0700)]
Remove trusted mask from BTM_SecAddDevice
It's just zeroed out, internalize it
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib840fad787ee1dc73fdbbf79bdae3f37742f38fa
Zach Johnson [Wed, 19 Aug 2020 22:00:21 +0000 (15:00 -0700)]
BTM_SEC_IS_SERVICE_TRUSTED is never used
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If4f892e78e9e95f6e426e4e4af883b14705fc9a2
Zach Johnson [Wed, 19 Aug 2020 21:57:56 +0000 (14:57 -0700)]
BTM_SecClrTempAuthService does nothing
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7a402fa6c9db09557f080ed65401e8e2549ed762
Zach Johnson [Wed, 19 Aug 2020 21:56:47 +0000 (14:56 -0700)]
last_author_service_id is never meaningfully set
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ieaa9e6865e4ffcefd9bf55c1e3ded7d6302aa599
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: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: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
Martin Brabham [Thu, 20 Aug 2020 05:58:58 +0000 (22:58 -0700)]
Add boolean flag for indicating IO Cap Response received
Bug:
162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I293c8caf0a4728daf87b4b6789c2ea92a931ca30
Martin Brabham [Thu, 20 Aug 2020 05:55:40 +0000 (22:55 -0700)]
Ensure we delete the link key from the controller.
Bug:
162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I883bf501d7a1f95e3c4665ffdf0fdee6af67453c
Chris Manton [Wed, 19 Aug 2020 22:08:50 +0000 (15:08 -0700)]
Simplify stack/l2cap/::l2c_link_check_send_pkts
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id83e752e56388283e87f8869017e435359cb0597
Treehugger Robot [Wed, 19 Aug 2020 22:40:44 +0000 (22:40 +0000)]
Merge changes I283667e2,Ibc685b5d,I54537140,Ic11c5809 am:
789939514f
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405233
Change-Id: Ic1db1158c0194e44c7bd4e9fe38d3cdb3d71442b
Treehugger Robot [Wed, 19 Aug 2020 22:40:15 +0000 (22:40 +0000)]
Merge changes I14a0dc1d,If34b5018,Icdba6206 am:
af886e8cbe
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405271
Change-Id: Ie306002144c20e1608636881c527726a60c9fb70
Treehugger Robot [Wed, 19 Aug 2020 22:15:02 +0000 (22:15 +0000)]
Merge changes I283667e2,Ibc685b5d,I54537140,Ic11c5809
* changes:
Move create_classic_conn from l2c to acl
Add API stack/acl/btm_acl::acl_create_classic_connection
Simplify stack/l2cap/l2c_utils::l2cu_create_conn_after_switch
Move stack/l2cap/l2c_link::btm_acl_connected
Treehugger Robot [Wed, 19 Aug 2020 21:55:06 +0000 (21:55 +0000)]
Merge changes I14a0dc1d,If34b5018,Icdba6206
* changes:
This if is always true
Remove useless line
Remove unused parameter in btif_dm_proc_io_req
Treehugger Robot [Wed, 19 Aug 2020 21:16:06 +0000 (21:16 +0000)]
Merge changes I1f6a908f,I96781ecd,I4de2d029,Ib3e5580a,I5b615bb3 am:
17f018f516
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405220
Change-Id: I15b5a2ad2e14b70ec5833ce1b3856a65c5836247
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 21:10:38 +0000 (21:10 +0000)]
Merge changes I8fd02d8f,Ia21eeb73 am:
c5fc120586
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405268
Change-Id: I0e2a635e39b1a68ba3561685a5bfdc3164f438bc
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:49:00 +0000 (20:49 +0000)]
Merge changes I51c3b864,I2af0f2c2,Ifaec802b,I9ea573cb,I87154d64, ... am:
6bc1dc3c14
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405212
Change-Id: Ibcd8d7a51931af14a8d966747a45c60b300c2af7
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:25:28 +0000 (20:25 +0000)]
Merge changes I5f284c8c,I5f1afa5e,I5e7478e9,I9c717be1,Ie8d7e20a, ... am:
5bf7cae01b
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405119
Change-Id: I8ab7f9ad1466cb28625dd94fd711a2ff26a96947
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:54:11 +0000 (12:54 -0700)]
This if is always true
In previous line, if p_dev_rec->sm4 & BTM_SM4_UPGRADE is true, then we
still have BTM_SUCCESS; if we invoke btm_cb.api.p_sp_callback, then OOB
data status is set in btif_dm_set_oob_for_io_req, unless the stack is
not running.
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I14a0dc1d1c6ef62d0bbd4095073bd02c3aa08fdb
Chris Manton [Wed, 19 Aug 2020 19:23:40 +0000 (12:23 -0700)]
Move create_classic_conn from l2c to acl
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I283667e29187c9476c5867c392efd455de3bf30d
Chris Manton [Wed, 19 Aug 2020 19:22:23 +0000 (12:22 -0700)]
Add API stack/acl/btm_acl::acl_create_classic_connection
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ibc685b5d4b456dcd6690501606a205420b2e6b40
Chris Manton [Tue, 18 Aug 2020 05:03:41 +0000 (22:03 -0700)]
Simplify stack/l2cap/l2c_utils::l2cu_create_conn_after_switch
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I545371401f091c2676af3d99ca995bc2a7dc58a9
Hansong Zhang [Wed, 19 Aug 2020 19:42:53 +0000 (12:42 -0700)]
Remove useless line
auth_req is either BTM_AUTH_AP_NO (2) or BTM_AUTH_AP_YES (3).
BTM_AUTH_DD_BOND is 2. Useless or.
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If34b501892d3bb2b4186710c5a64f4193cb939c8
Chris Manton [Wed, 19 Aug 2020 19:30:04 +0000 (12:30 -0700)]
Move stack/l2cap/l2c_link::btm_acl_connected
Into: stack/acl/btm_acl
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic11c5809669eb7e663ebd32e17377c25e052ab95
Hansong Zhang [Wed, 19 Aug 2020 19:34:00 +0000 (12:34 -0700)]
Remove unused parameter in btif_dm_proc_io_req
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Icdba620694968148b8f6766fc0ed47ee4d102472
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:17 +0000 (18:41 +0000)]
Merge changes If3136d44,I7a3ee025,I734ece7f am:
8d2ef4fc0f
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1403924
Change-Id: I0cd1034d58d7b9345834726c636a8f261a076c78
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
Treehugger Robot [Wed, 19 Aug 2020 18:38:34 +0000 (18:38 +0000)]
Merge "SecurityManagerChannel: AuthenticationRequest not always needed" am:
df04b10811
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1404412
Change-Id: I8aecab6a86e8afd43e4158e33ca96c1ad77cb2e3
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
Łukasz Rymanowski [Wed, 19 Aug 2020 17:51:53 +0000 (17:51 +0000)]
gatt: Allow services to indicate eatt support am:
24a42d12d5
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1371418
Change-Id: Ied1845b8bfc3309c07e5f85b9dc55aa69b45a438
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