OSDN Git Service

android-x86/system-bt.git
3 years agoL2cap CoC callback use Confirm not Ind on server am: 5ba9d7c05d am: 8bb2a9a2c7
Chris Manton [Wed, 30 Sep 2020 18:41:15 +0000 (18:41 +0000)]
L2cap CoC callback use Confirm not Ind on server am: 5ba9d7c05d am: 8bb2a9a2c7

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1442318

Change-Id: I889f4ab688d32d87f134cac96dde5b46a6e5639d

3 years agoL2cap CoC callback use Confirm not Ind on server am: 5ba9d7c05d
Chris Manton [Wed, 30 Sep 2020 18:29:20 +0000 (18:29 +0000)]
L2cap CoC callback use Confirm not Ind on server am: 5ba9d7c05d

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1442318

Change-Id: I5329aca4e6c6068815f9669ddea4ce92038b38ef

3 years agoL2cap CoC callback use Confirm not Ind on server
Chris Manton [Wed, 30 Sep 2020 04:26:24 +0000 (21:26 -0700)]
L2cap CoC callback use Confirm not Ind on server

Confirm is nullptr on  L2cap connect-only-services

Bug: 169725013
Test: act.py -tc BleCocTest
Tag: #refactor
Change-Id: I5c87923a2b721c3d5b87d52969552382a5b1d633

3 years agoRemove net_test_bta from TEST_MAPPING file am: 00bb094b4e am: 56f4bd0c5d
Dan Shi [Wed, 30 Sep 2020 00:49:51 +0000 (00:49 +0000)]
Remove net_test_bta from TEST_MAPPING file am: 00bb094b4e am: 56f4bd0c5d

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1442244

Change-Id: I82cefc91f9cf1f01d011e7860232f86579e542be

3 years agoRemove net_test_bta from TEST_MAPPING file am: 00bb094b4e
Dan Shi [Wed, 30 Sep 2020 00:30:27 +0000 (00:30 +0000)]
Remove net_test_bta from TEST_MAPPING file am: 00bb094b4e

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1442244

Change-Id: I0c582d20c422a26ed78feb1d57cc3dd9b61bdf3b

3 years agoRemove net_test_bta from TEST_MAPPING file
Dan Shi [Tue, 29 Sep 2020 23:31:48 +0000 (16:31 -0700)]
Remove net_test_bta from TEST_MAPPING file

The test is device only test.

Bug: 169705178
Test: none
Change-Id: I19b6fdf5ff5e197380f5406563903f685e7a3d78

3 years agoMerge changes Iefb88b7e,Ia8fd678c,Ieefd35fa,Ib474f0be,I16606384, ... am: a560910b82...
Treehugger Robot [Tue, 29 Sep 2020 19:43:49 +0000 (19:43 +0000)]
Merge changes Iefb88b7e,Ia8fd678c,Ieefd35fa,Ib474f0be,I16606384, ... am: a560910b82 am: d10f56e4f9

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440280

Change-Id: I12961461ebc4829a74dcefc2f12aa0dd60ae8704

3 years agoMerge changes Iefb88b7e,Ia8fd678c,Ieefd35fa,Ib474f0be,I16606384, ... am: a560910b82
Treehugger Robot [Tue, 29 Sep 2020 19:16:31 +0000 (19:16 +0000)]
Merge changes Iefb88b7e,Ia8fd678c,Ieefd35fa,Ib474f0be,I16606384, ... am: a560910b82

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440280

Change-Id: Ibc2228c57c300aecf3b6cb478af3641cb484202c

3 years agoMerge changes Iefb88b7e,Ia8fd678c,Ieefd35fa,Ib474f0be,I16606384, ...
Treehugger Robot [Tue, 29 Sep 2020 18:46:09 +0000 (18:46 +0000)]
Merge changes Iefb88b7e,Ia8fd678c,Ieefd35fa,Ib474f0be,I16606384, ...

* changes:
  Re-log btif/src/btif_dm::btif_dm_cancel_discovery
  Re-log btif/src/btif_dm::btif_dm_search_services_evt
  Re-log btif/src/btif_dm::btif_update_remote_properties
  Re-log btif/src/btif_dm::bond_state_changed
  Re-log btif/src/btif_core::btif_enable_bluetooth_evt
  Re-log btif_get____type
  Log proper btif/src/btif_bqr::ConfigureBqr
  Re-log btif/src/btif_av::btif_av_get_peer_sep
  Re-log btif/src/btif_a2dp::btif_a2dp_on_idle
  Restore Le transport for SetPhy function

3 years agoMerge "Reject SetBrowsedPlayer if there is not browsable player" am: e5004b17be am...
Treehugger Robot [Tue, 29 Sep 2020 18:33:05 +0000 (18:33 +0000)]
Merge "Reject SetBrowsedPlayer if there is not browsable player" am: e5004b17be am: edc817f5ed

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440735

Change-Id: Id1bf2448f3ab3d48d5e273f06b961d44796b5a04

3 years agoMerge "Reject SetBrowsedPlayer if there is not browsable player" am: e5004b17be
Treehugger Robot [Tue, 29 Sep 2020 17:57:46 +0000 (17:57 +0000)]
Merge "Reject SetBrowsedPlayer if there is not browsable player" am: e5004b17be

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440735

Change-Id: I72c072a63ce1e554053016e39a7596bb40cfcccc

3 years agoL2cap shim: Add mtu requirement to config option am: e7a8457e3c am: 9594400deb
Hansong Zhang [Tue, 29 Sep 2020 17:40:45 +0000 (17:40 +0000)]
L2cap shim: Add mtu requirement to config option am: e7a8457e3c am: 9594400deb

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1441616

Change-Id: I9834af0b2c82e4c14fe9693ae6b2347525c88049

3 years agoMerge "GAP: Support 128-bit custom UUID in EIR record" am: 431af678ec am: 1d23739390
Alain Vongsouvanh [Tue, 29 Sep 2020 17:40:16 +0000 (17:40 +0000)]
Merge "GAP: Support 128-bit custom UUID in EIR record" am: 431af678ec am: 1d23739390

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1212758

Change-Id: I254f9e2102a1cf582dadfbd0893932d62dc00171

3 years agoMerge "Reject SetBrowsedPlayer if there is not browsable player"
Treehugger Robot [Tue, 29 Sep 2020 17:31:58 +0000 (17:31 +0000)]
Merge "Reject SetBrowsedPlayer if there is not browsable player"

3 years agoL2cap shim: Add mtu requirement to config option am: e7a8457e3c
Hansong Zhang [Tue, 29 Sep 2020 17:19:46 +0000 (17:19 +0000)]
L2cap shim: Add mtu requirement to config option am: e7a8457e3c

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1441616

Change-Id: Id75d31be9b610a1cd0f10de0be3f08339889b151

3 years agoMerge "GAP: Support 128-bit custom UUID in EIR record" am: 431af678ec
Alain Vongsouvanh [Tue, 29 Sep 2020 17:18:42 +0000 (17:18 +0000)]
Merge "GAP: Support 128-bit custom UUID in EIR record" am: 431af678ec

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1212758

Change-Id: Iba63cca19d976d004b2a46e4f4e2d1e450219373

3 years agoL2cap shim: Add mtu requirement to config option
Hansong Zhang [Tue, 29 Sep 2020 04:56:13 +0000 (21:56 -0700)]
L2cap shim: Add mtu requirement to config option

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib0da747b905df5edfc1f03518a565f1ed914a148

3 years agoMerge "GAP: Support 128-bit custom UUID in EIR record"
Alain Vongsouvanh [Tue, 29 Sep 2020 17:00:02 +0000 (17:00 +0000)]
Merge "GAP: Support 128-bit custom UUID in EIR record"

3 years agoRe-log btif/src/btif_dm::btif_dm_cancel_discovery
Chris Manton [Thu, 24 Sep 2020 18:11:17 +0000 (11:11 -0700)]
Re-log btif/src/btif_dm::btif_dm_cancel_discovery

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: Iefb88b7ec327e34ab37efa95b85c348b237928a3

3 years agoRe-log btif/src/btif_dm::btif_dm_search_services_evt
Chris Manton [Thu, 24 Sep 2020 18:10:07 +0000 (11:10 -0700)]
Re-log btif/src/btif_dm::btif_dm_search_services_evt

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: Ia8fd678c45b26606b913bfcea632fc570f56d127

3 years agoRe-log btif/src/btif_dm::btif_update_remote_properties
Chris Manton [Thu, 24 Sep 2020 18:06:29 +0000 (11:06 -0700)]
Re-log btif/src/btif_dm::btif_update_remote_properties

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: Ieefd35faee11881a178000e755d2d7fa575f8632

3 years agoRe-log btif/src/btif_dm::bond_state_changed
Chris Manton [Thu, 24 Sep 2020 18:03:05 +0000 (11:03 -0700)]
Re-log btif/src/btif_dm::bond_state_changed

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: Ib474f0be03be451c3a5c14242c1fb9c4c8e97d3c

3 years agoRe-log btif/src/btif_core::btif_enable_bluetooth_evt
Chris Manton [Thu, 24 Sep 2020 18:01:59 +0000 (11:01 -0700)]
Re-log btif/src/btif_core::btif_enable_bluetooth_evt

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: I16606384fa2580fe372aa852cc4b7f0f606cd484

3 years agoRe-log btif_get____type
Chris Manton [Thu, 24 Sep 2020 17:58:38 +0000 (10:58 -0700)]
Re-log btif_get____type

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: Ie3d53b527b0938dc76763d5106afe5deb02601cc

3 years agoLog proper btif/src/btif_bqr::ConfigureBqr
Chris Manton [Thu, 24 Sep 2020 17:57:39 +0000 (10:57 -0700)]
Log proper btif/src/btif_bqr::ConfigureBqr

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: I56d3b55cbf6eee6b55cfa66f718451dae3aee1db

3 years agoRe-log btif/src/btif_av::btif_av_get_peer_sep
Chris Manton [Thu, 24 Sep 2020 17:56:31 +0000 (10:56 -0700)]
Re-log btif/src/btif_av::btif_av_get_peer_sep

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: Ieac7e5a6c0545a9de9296b4b6081e86cf0c986a7

3 years agoRe-log btif/src/btif_a2dp::btif_a2dp_on_idle
Chris Manton [Thu, 24 Sep 2020 17:54:11 +0000 (10:54 -0700)]
Re-log btif/src/btif_a2dp::btif_a2dp_on_idle

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: I4e2ed9eb46823b70d0c7d066c1df555ef8483742

3 years agoRestore Le transport for SetPhy function
Chris Manton [Fri, 25 Sep 2020 19:53:32 +0000 (12:53 -0700)]
Restore Le transport for SetPhy function

Bug: 163134718
Tag: #refactor
Test: ble paired 2 phones
Test: act.py -tc BleCocTest
Change-Id: I5952932176fdd1392142eb3a3df9e2f4f0e94dab

3 years agoGD L2cap: Add a way to enforce required mtu am: 189816c3fe am: 693af8fda2
Hansong Zhang [Tue, 29 Sep 2020 03:37:26 +0000 (03:37 +0000)]
GD L2cap: Add a way to enforce required mtu am: 189816c3fe am: 693af8fda2

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1441612

Change-Id: I17fc64e31b6742ba982a1168fa0c4c18f21b2466

3 years agoGAP_ConnOpen code minor clean up am: 21632e0b62 am: ba209a3226
Hansong Zhang [Tue, 29 Sep 2020 03:37:23 +0000 (03:37 +0000)]
GAP_ConnOpen code minor clean up am: 21632e0b62 am: ba209a3226

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1441611

Change-Id: I8a48f4a37e859a14611daa3f6b43116d0b3b6704

3 years agoLE COC: Indicate channel open on ConnectRsp recv am: 6613113056 am: 3761a6e954
Hansong Zhang [Tue, 29 Sep 2020 03:37:19 +0000 (03:37 +0000)]
LE COC: Indicate channel open on ConnectRsp recv am: 6613113056 am: 3761a6e954

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440334

Change-Id: Ic815acb594d8b9ce89ed7ce42fa7ae4392bfaf74

3 years agoGD L2cap: Add a way to enforce required mtu am: 189816c3fe
Hansong Zhang [Tue, 29 Sep 2020 03:15:00 +0000 (03:15 +0000)]
GD L2cap: Add a way to enforce required mtu am: 189816c3fe

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1441612

Change-Id: I3363747b6e168478947a779af20cfd333fdb5e03

3 years agoGAP_ConnOpen code minor clean up am: 21632e0b62
Hansong Zhang [Tue, 29 Sep 2020 03:14:56 +0000 (03:14 +0000)]
GAP_ConnOpen code minor clean up am: 21632e0b62

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1441611

Change-Id: Ie66737d784407cb87c200c9786d00c0ccbf6730a

3 years agoLE COC: Indicate channel open on ConnectRsp recv am: 6613113056
Hansong Zhang [Tue, 29 Sep 2020 03:14:16 +0000 (03:14 +0000)]
LE COC: Indicate channel open on ConnectRsp recv am: 6613113056

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440334

Change-Id: I81c978939c6bf1bd34b1218db58140696a76b0d4

3 years agoMerge "Call EXPECT_CALL before the incoming event" am: e4bfe75a30 am: cd9aa2e6c3
Treehugger Robot [Tue, 29 Sep 2020 01:09:55 +0000 (01:09 +0000)]
Merge "Call EXPECT_CALL before the incoming event" am: e4bfe75a30 am: cd9aa2e6c3

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440335

Change-Id: I46934f3c297005b19a59e6a52097b6ec50e3379b

3 years agoMerge "SM: Implement name request during Classic pairing" am: d165f580d1 am: c89db9cc3f
Treehugger Robot [Tue, 29 Sep 2020 01:09:49 +0000 (01:09 +0000)]
Merge "SM: Implement name request during Classic pairing" am: d165f580d1 am: c89db9cc3f

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1427614

Change-Id: I365ccc65919fda56d7e2b2b4cc1464d0166d4b11

3 years agoGD L2cap: Add a way to enforce required mtu
Hansong Zhang [Mon, 28 Sep 2020 23:11:45 +0000 (16:11 -0700)]
GD L2cap: Add a way to enforce required mtu

Test: cert/run --host
Tag: #gd-refactor
Bug: 141555841
Change-Id: Iefe65f3105ced94a9e653d82a59e550687765df2

3 years agoGAP_ConnOpen code minor clean up
Hansong Zhang [Mon, 28 Sep 2020 22:38:47 +0000 (15:38 -0700)]
GAP_ConnOpen code minor clean up

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0ecb38538aae423a1232676004a3a7b85d628bcd

3 years agoLE COC: Indicate channel open on ConnectRsp recv
Hansong Zhang [Mon, 28 Sep 2020 20:15:10 +0000 (13:15 -0700)]
LE COC: Indicate channel open on ConnectRsp recv

Also don't auto send ConnectRsp for LE. Need to clean up config.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4e148d0d0d6597ef8d1d9115db8c8ba6f92a1b8e

3 years agoMerge "Call EXPECT_CALL before the incoming event" am: e4bfe75a30
Treehugger Robot [Tue, 29 Sep 2020 00:49:45 +0000 (00:49 +0000)]
Merge "Call EXPECT_CALL before the incoming event" am: e4bfe75a30

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440335

Change-Id: I02ee5fb7f129272f6d3b9679c080f26c0c1d776d

3 years agoMerge "Call EXPECT_CALL before the incoming event"
Treehugger Robot [Tue, 29 Sep 2020 00:49:15 +0000 (00:49 +0000)]
Merge "Call EXPECT_CALL before the incoming event"

3 years agoMerge "SM: Implement name request during Classic pairing" am: d165f580d1
Treehugger Robot [Tue, 29 Sep 2020 00:48:56 +0000 (00:48 +0000)]
Merge "SM: Implement name request during Classic pairing" am: d165f580d1

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1427614

Change-Id: Iabe7191aa6c49e713210d8b37fe181a41164b8e9

3 years agoMerge "SM: Implement name request during Classic pairing"
Treehugger Robot [Tue, 29 Sep 2020 00:00:20 +0000 (00:00 +0000)]
Merge "SM: Implement name request during Classic pairing"

3 years agoL2CAP: Remove unused ConnectRsp am: 3dbda905a5 am: a33066c188
Hansong Zhang [Mon, 28 Sep 2020 23:41:05 +0000 (23:41 +0000)]
L2CAP: Remove unused ConnectRsp am: 3dbda905a5 am: a33066c188

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440333

Change-Id: Ida07bf1545b2ce153908dcc30d39c54be5656467

3 years agoL2CAP: Remove unused ConnectRsp am: 3dbda905a5
Hansong Zhang [Mon, 28 Sep 2020 23:19:52 +0000 (23:19 +0000)]
L2CAP: Remove unused ConnectRsp am: 3dbda905a5

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440333

Change-Id: I1c1428f21cc3233903e686f9cae3b922e08c8518

3 years agoCall EXPECT_CALL before the incoming event
Martin Brabham [Mon, 28 Sep 2020 22:52:55 +0000 (15:52 -0700)]
Call EXPECT_CALL before the incoming event

Bug: 169598507
Tag: #stability
Test: atest --host bluetooth_test_gd
Change-Id: If58fa04c6c292c197959b14e29f52800fd14c03b

3 years agoRFCOMM, AVDT, HID: L2cap signal id is not used am: ade4d449cd am: 9f90030137
Hansong Zhang [Mon, 28 Sep 2020 21:47:59 +0000 (21:47 +0000)]
RFCOMM, AVDT, HID: L2cap signal id is not used am: ade4d449cd am: 9f90030137

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440416

Change-Id: If408df5c24ac53c76b73f7ef2001a17207b1ad58

3 years agoInclude initial remote config in pL2CA_ConfigCfm_Cb am: aec9dadc2e am: 0d9deed5c0
Hansong Zhang [Mon, 28 Sep 2020 21:42:30 +0000 (21:42 +0000)]
Include initial remote config in pL2CA_ConfigCfm_Cb am: aec9dadc2e am: 0d9deed5c0

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440332

Change-Id: I2cfbc071b90d2fd5d068b3a20afba7560b094df0

3 years agoSerialize L2CAP connect ind/cfm, config ind, cfm am: b737b6dcda am: 23615d56c8
Hansong Zhang [Mon, 28 Sep 2020 21:42:17 +0000 (21:42 +0000)]
Serialize L2CAP connect ind/cfm, config ind, cfm am: b737b6dcda am: 23615d56c8

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440691

Change-Id: I35a95dc88c823a66d01e1b4003bae26640ee2e07

3 years agoL2cap: Auto send ConnectRsp am: d8d7224c2e am: 1b00239503
Hansong Zhang [Mon, 28 Sep 2020 21:42:16 +0000 (21:42 +0000)]
L2cap: Auto send ConnectRsp am: d8d7224c2e am: 1b00239503

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440654

Change-Id: I60141e2d1aa5df7d608fccc6701cd754644c21b7

3 years agoCheck for control block nullptr on l2cap error am: d77658a680 am: 7a0ce3e74c
Hansong Zhang [Mon, 28 Sep 2020 21:42:15 +0000 (21:42 +0000)]
Check for control block nullptr on l2cap error am: d77658a680 am: 7a0ce3e74c

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440653

Change-Id: Ib226e9357eb13baa7c971261702856b9cf715c55

3 years agoL2cap channel cb: Store who initiated dynamic channel am: 7bfe49749a am: d1b11fe61f
Hansong Zhang [Mon, 28 Sep 2020 21:42:14 +0000 (21:42 +0000)]
L2cap channel cb: Store who initiated dynamic channel am: 7bfe49749a am: d1b11fe61f

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440652

Change-Id: I5c59b64189a4e929e474a7c6d13747d3cd527eb6

3 years agoWe always send pL2CA_ConfigCfm_Cb with status OK am: 40b23cc4ab am: 1bb6f231ce
Hansong Zhang [Mon, 28 Sep 2020 21:42:14 +0000 (21:42 +0000)]
We always send pL2CA_ConfigCfm_Cb with status OK am: 40b23cc4ab am: 1bb6f231ce

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440651

Change-Id: Ib027c448ea97732bec594a8bdd37c8845c9e1b68

3 years agoL2cap shim clean up am: ee79913590 am: 6ca4f683bd
Hansong Zhang [Mon, 28 Sep 2020 21:42:12 +0000 (21:42 +0000)]
L2cap shim clean up am: ee79913590 am: 6ca4f683bd

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440315

Change-Id: I4514eb872e52bde4326e7afc03877be8ae9cd944

3 years agoL2CAP_FLUSHABLE_PKT is never used am: 6b63057385 am: 6c7a566cd4
Hansong Zhang [Mon, 28 Sep 2020 21:42:08 +0000 (21:42 +0000)]
L2CAP_FLUSHABLE_PKT is never used am: 6b63057385 am: 6c7a566cd4

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440314

Change-Id: Ib3048441c7adeb7a4ff48cee5881b2359347167c

3 years agoMinor clean up in l2c_api am: 324f7e9cec am: adc9e08a37
Hansong Zhang [Mon, 28 Sep 2020 21:42:04 +0000 (21:42 +0000)]
Minor clean up in l2c_api am: 324f7e9cec am: adc9e08a37

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440313

Change-Id: I36cf6452ba6324ba18fffa2d26f63ecfa10a38e9

3 years agoL2cap: Simplify DisconnectRsp am: 014930dadc am: fe33b32020
Hansong Zhang [Mon, 28 Sep 2020 21:42:01 +0000 (21:42 +0000)]
L2cap: Simplify DisconnectRsp am: 014930dadc am: fe33b32020

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440312

Change-Id: Ib2672bb56d2793da4473f7b104f82605d7f7979f

3 years agoRFCOMM, AVDT, HID: L2cap signal id is not used am: ade4d449cd
Hansong Zhang [Mon, 28 Sep 2020 21:41:52 +0000 (21:41 +0000)]
RFCOMM, AVDT, HID: L2cap signal id is not used am: ade4d449cd

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440416

Change-Id: I4399b307c9f1bcc565319eba09b60a9a49133bf2

3 years agoRemove unused L2cap code am: 2d291bead0 am: f56c1b1e0a
Hansong Zhang [Mon, 28 Sep 2020 21:41:32 +0000 (21:41 +0000)]
Remove unused L2cap code am: 2d291bead0 am: f56c1b1e0a

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440311

Change-Id: I7c17ef1a11a3e0b6ac8f98bccfbba91b7f892648

3 years agoSimplify avdt_sec_check_complete_term am: 1d6fa5e136 am: 41cb6069c9
Hansong Zhang [Mon, 28 Sep 2020 21:41:30 +0000 (21:41 +0000)]
Simplify avdt_sec_check_complete_term am: 1d6fa5e136 am: 41cb6069c9

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1439087

Change-Id: I3a2c972f6d2103003156efef3df8035d9658451d

3 years agoSimplify bnep_sec_check_complete am: 86fbde4a5e am: e96b0443a4
Hansong Zhang [Mon, 28 Sep 2020 21:41:27 +0000 (21:41 +0000)]
Simplify bnep_sec_check_complete am: 86fbde4a5e am: e96b0443a4

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1439086

Change-Id: I87d9fd1e93064f2b4c0a9f2cd3387a38698c8146

3 years agoInclude initial remote config in pL2CA_ConfigCfm_Cb am: aec9dadc2e
Hansong Zhang [Mon, 28 Sep 2020 21:28:57 +0000 (21:28 +0000)]
Include initial remote config in pL2CA_ConfigCfm_Cb am: aec9dadc2e

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440332

Change-Id: I4d30931e1ce85e2593d04ef2fdae81bae5952cfd

3 years agoSM: Implement name request during Classic pairing
Martin Brabham [Fri, 4 Sep 2020 05:03:32 +0000 (22:03 -0700)]
SM: Implement name request during Classic pairing

Ensure we try to receive the name and wait for it before
we show the UserConfirmation Dialog.

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Test: atest --host bluetooth_test_gd
Change-Id: I6a4401873770f7f642e06da34002dba55e5f049e

3 years agoSerialize L2CAP connect ind/cfm, config ind, cfm am: b737b6dcda
Hansong Zhang [Mon, 28 Sep 2020 20:55:14 +0000 (20:55 +0000)]
Serialize L2CAP connect ind/cfm, config ind, cfm am: b737b6dcda

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440691

Change-Id: I20205d2b00a0576eb2413dce747356262db40bf2

3 years agoL2cap: Auto send ConnectRsp am: d8d7224c2e
Hansong Zhang [Mon, 28 Sep 2020 20:55:12 +0000 (20:55 +0000)]
L2cap: Auto send ConnectRsp am: d8d7224c2e

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440654

Change-Id: I260ba6995b80b8f1ffc8bfee879c9b27d3320b04

3 years agoCheck for control block nullptr on l2cap error am: d77658a680
Hansong Zhang [Mon, 28 Sep 2020 20:55:08 +0000 (20:55 +0000)]
Check for control block nullptr on l2cap error am: d77658a680

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440653

Change-Id: I3c574634a60a0a4f376b8670330a848045689efb

3 years agoL2cap channel cb: Store who initiated dynamic channel am: 7bfe49749a
Hansong Zhang [Mon, 28 Sep 2020 20:55:05 +0000 (20:55 +0000)]
L2cap channel cb: Store who initiated dynamic channel am: 7bfe49749a

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440652

Change-Id: I3c642a89b7ca5c38fad8ed3905f224a32c67a738

3 years agoWe always send pL2CA_ConfigCfm_Cb with status OK am: 40b23cc4ab
Hansong Zhang [Mon, 28 Sep 2020 20:55:02 +0000 (20:55 +0000)]
We always send pL2CA_ConfigCfm_Cb with status OK am: 40b23cc4ab

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440651

Change-Id: I21c840a6db17549af0a378cf5af3f57c91facd93

3 years agoL2cap shim clean up am: ee79913590
Hansong Zhang [Mon, 28 Sep 2020 20:54:58 +0000 (20:54 +0000)]
L2cap shim clean up am: ee79913590

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440315

Change-Id: I4158575f6fc937f5c061aad1e9bf14b72381c274

3 years agoL2CAP_FLUSHABLE_PKT is never used am: 6b63057385
Hansong Zhang [Mon, 28 Sep 2020 20:54:55 +0000 (20:54 +0000)]
L2CAP_FLUSHABLE_PKT is never used am: 6b63057385

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440314

Change-Id: Ie5273670372d83b30ff1f6cf3406843496d917d7

3 years agoMinor clean up in l2c_api am: 324f7e9cec
Hansong Zhang [Mon, 28 Sep 2020 20:54:51 +0000 (20:54 +0000)]
Minor clean up in l2c_api am: 324f7e9cec

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440313

Change-Id: I436a7ffeabe9c926062f05831aea7056396b1158

3 years agoL2cap: Simplify DisconnectRsp am: 014930dadc
Hansong Zhang [Mon, 28 Sep 2020 20:54:48 +0000 (20:54 +0000)]
L2cap: Simplify DisconnectRsp am: 014930dadc

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440312

Change-Id: Iefab338e11f2815cce8e352d679f2e410cae93a0

3 years agoRemove unused L2cap code am: 2d291bead0
Hansong Zhang [Mon, 28 Sep 2020 20:54:29 +0000 (20:54 +0000)]
Remove unused L2cap code am: 2d291bead0

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1440311

Change-Id: Ie3beca412e99a47bfe4d2d07452ed1d98388d0ef

3 years agoSimplify avdt_sec_check_complete_term am: 1d6fa5e136
Hansong Zhang [Mon, 28 Sep 2020 20:54:24 +0000 (20:54 +0000)]
Simplify avdt_sec_check_complete_term am: 1d6fa5e136

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1439087

Change-Id: Ie361553e46e0bf5c56503b0a1153d9791bba476f

3 years agoSimplify bnep_sec_check_complete am: 86fbde4a5e
Hansong Zhang [Mon, 28 Sep 2020 20:53:44 +0000 (20:53 +0000)]
Simplify bnep_sec_check_complete am: 86fbde4a5e

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1439086

Change-Id: Idb4a0b924b656e23556d6161da055fe6a8de2398

3 years agoL2CAP: Remove unused ConnectRsp
Hansong Zhang [Mon, 28 Sep 2020 20:00:18 +0000 (13:00 -0700)]
L2CAP: Remove unused ConnectRsp

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ifa6fc5470aeda670eb51482ed91a2b7ab665a813

3 years agol2c_csm: Use pL2CA_Error_Cb on error am: 30a07c56e1 am: 7f4a3dac18
Hansong Zhang [Mon, 28 Sep 2020 19:55:17 +0000 (19:55 +0000)]
l2c_csm: Use pL2CA_Error_Cb on error am: 30a07c56e1 am: 7f4a3dac18

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1439085

Change-Id: Ib1984734eda6f9ce33fcbefce71d59ffc68d34b0

3 years agoRegard L2CAP_CFG_PENDING as failure am: 5b85860bd5 am: eb9cc47787
Hansong Zhang [Mon, 28 Sep 2020 19:55:15 +0000 (19:55 +0000)]
Regard L2CAP_CFG_PENDING as failure am: 5b85860bd5 am: eb9cc47787

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1439084

Change-Id: I9aca2ee3eaa75ae8e5b855cf1c4ccadc2e9202bb

3 years agoRFCOMM, AVDT, HID: L2cap signal id is not used
Hansong Zhang [Mon, 28 Sep 2020 19:40:00 +0000 (12:40 -0700)]
RFCOMM, AVDT, HID: L2cap signal id is not used

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I53b2236b8603b4d8a3c6a49f8ae1355020a657e5

3 years agoInclude initial remote config in pL2CA_ConfigCfm_Cb
Hansong Zhang [Mon, 28 Sep 2020 19:20:19 +0000 (12:20 -0700)]
Include initial remote config in pL2CA_ConfigCfm_Cb

So we don't need to send a separate pL2CA_ConfigInd_Cb.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I75dafa4bc38a1c5a7773db6be5665b30ad88b006

3 years agol2c_csm: Use pL2CA_Error_Cb on error am: 30a07c56e1
Hansong Zhang [Mon, 28 Sep 2020 19:03:43 +0000 (19:03 +0000)]
l2c_csm: Use pL2CA_Error_Cb on error am: 30a07c56e1

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1439085

Change-Id: I5d53012f81c0ee4358948654418600b897f1f34b

3 years agoRegard L2CAP_CFG_PENDING as failure am: 5b85860bd5
Hansong Zhang [Mon, 28 Sep 2020 19:02:50 +0000 (19:02 +0000)]
Regard L2CAP_CFG_PENDING as failure am: 5b85860bd5

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1439084

Change-Id: I9d42ccf85dc915acb2561a63d2718bbb1d5c08bf

3 years agoSerialize L2CAP connect ind/cfm, config ind, cfm
Hansong Zhang [Mon, 28 Sep 2020 06:59:00 +0000 (23:59 -0700)]
Serialize L2CAP connect ind/cfm, config ind, cfm

Make them happen at one place.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie6b073312f77d837009783dcdbbf6835dfe71985

3 years agoL2cap: Auto send ConnectRsp
Hansong Zhang [Sun, 27 Sep 2020 23:49:17 +0000 (16:49 -0700)]
L2cap: Auto send ConnectRsp

In the past, L2cap user can decide whether to accept or reject a
ConnectReq. If reject, the channel is closed.

Now let L2cap layer always auto accept the remote ConnectReq and start
config process. If the L2cap user wants to reject, they can send a
DisconnectReq. According to L2cap state machine, a DisconnectReq after
ConnectRsp terminates the channel, which is equivalent to sending a
negative ConnectRsp, as before.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ibed56206148922356e8d9cb10650e9d82ab61225

3 years agoCheck for control block nullptr on l2cap error
Hansong Zhang [Sun, 27 Sep 2020 23:30:03 +0000 (16:30 -0700)]
Check for control block nullptr on l2cap error

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie041822b2f51aa20e57fa35f90c432a6c96733d5

3 years agoL2cap channel cb: Store who initiated dynamic channel
Hansong Zhang [Sun, 27 Sep 2020 23:12:43 +0000 (16:12 -0700)]
L2cap channel cb: Store who initiated dynamic channel

Use pL2CA_ConfigCfm_Cb to let user know the direction.

Later the user can run check in ConnectInd or ConnectCfm callback.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iae663e6bea0fc9426c5dfbbfc52bd1ae848f2965

3 years agoWe always send pL2CA_ConfigCfm_Cb with status OK
Hansong Zhang [Sun, 27 Sep 2020 22:53:12 +0000 (15:53 -0700)]
We always send pL2CA_ConfigCfm_Cb with status OK

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4865330b4c48fe507bd6df72a5e362a616744ef4

3 years agoL2cap shim clean up
Hansong Zhang [Sun, 27 Sep 2020 22:18:57 +0000 (15:18 -0700)]
L2cap shim clean up

Now we send ConfigReq and ConfigRsp automatically, we need to send
callbacks automatically.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I34e9a8afef63fed21befeda5c3a66e425d6ffaf8

3 years agoL2CAP_FLUSHABLE_PKT is never used
Hansong Zhang [Sun, 27 Sep 2020 21:23:20 +0000 (14:23 -0700)]
L2CAP_FLUSHABLE_PKT is never used

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I21ef421c0fcc0f85ab4497fb4ff47bd83a242673

3 years agoIntroduce pL2CA_Error_Cb am: b6e5a07555 am: cc102a7286
Hansong Zhang [Mon, 28 Sep 2020 17:09:20 +0000 (17:09 +0000)]
Introduce pL2CA_Error_Cb am: b6e5a07555 am: cc102a7286

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1439083

Change-Id: Icae7a509d9d3cdd276e8911175c02408ce44dd58

3 years agol2c_csm: Remove unused variable am: 5020f1c00f am: 1e68d372f3
Hansong Zhang [Mon, 28 Sep 2020 17:09:17 +0000 (17:09 +0000)]
l2c_csm: Remove unused variable am: 5020f1c00f am: 1e68d372f3

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1439082

Change-Id: I471805d4fb858f14122a743102788ec7f19fcd24

3 years agoIntroduce pL2CA_Error_Cb am: b6e5a07555
Hansong Zhang [Mon, 28 Sep 2020 16:48:11 +0000 (16:48 +0000)]
Introduce pL2CA_Error_Cb am: b6e5a07555

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1439083

Change-Id: I4af7949c994761ee6b3a7b6c2808a8077fafdfc7

3 years agol2c_csm: Remove unused variable am: 5020f1c00f
Hansong Zhang [Mon, 28 Sep 2020 16:47:19 +0000 (16:47 +0000)]
l2c_csm: Remove unused variable am: 5020f1c00f

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1439082

Change-Id: I7a4ad9d2b31de4811798dcbb206702be137de7b2

3 years agoReject SetBrowsedPlayer if there is not browsable player
Ted Wang [Thu, 24 Sep 2020 11:24:24 +0000 (19:24 +0800)]
Reject SetBrowsedPlayer if there is not browsable player

Tag: #compatibility
Bug: 163109635
Test: atest net_test_avrcp
Change-Id: I587ca0d514b50c7a72269eef86a8b5ff38343d05

3 years agoMinor clean up in l2c_api
Hansong Zhang [Sun, 27 Sep 2020 07:24:48 +0000 (00:24 -0700)]
Minor clean up in l2c_api

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4e7f7d610dba175c9d0abc3d23038891acf31242

3 years agoL2cap: Simplify DisconnectRsp
Hansong Zhang [Sun, 27 Sep 2020 07:12:49 +0000 (00:12 -0700)]
L2cap: Simplify DisconnectRsp

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working & OPP
Change-Id: I3c4c18bc6d55fe3aa8acda4db8d72f97781729ec

3 years agoRemove unused L2cap code
Hansong Zhang [Sun, 27 Sep 2020 07:03:53 +0000 (00:03 -0700)]
Remove unused L2cap code

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working & OPP
Change-Id: I3fce28b929e0d8685656b64725d8d36e37a082b4

3 years agoSimplify avdt_sec_check_complete_term
Hansong Zhang [Sun, 27 Sep 2020 00:59:51 +0000 (17:59 -0700)]
Simplify avdt_sec_check_complete_term

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iabddefde41cc2f63b306efe0cd4eb7e59116141b

3 years agoSimplify bnep_sec_check_complete
Hansong Zhang [Sun, 27 Sep 2020 00:42:02 +0000 (17:42 -0700)]
Simplify bnep_sec_check_complete

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ifc0edea758f4d1e0847f5b00fc49b51b4ad00344

3 years agol2c_csm: Use pL2CA_Error_Cb on error
Hansong Zhang [Sat, 26 Sep 2020 23:58:47 +0000 (16:58 -0700)]
l2c_csm: Use pL2CA_Error_Cb on error

Note that we only have two result codes, because the user only needs to
know whether it's during ConnectRsp or ConfigRsp (except for HIDH
retry), which we need further research.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I24aa7bf8487c9b2b69fc455cfdb52a7ec758b90b