aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-20Merge cherrypicks of [15873636, 15873851, 15873852, 15873654, 15873655, ↵android-12.0.0_r15android-12.0.0_r14android-12.0.0_r13android-12.0.0_r12android12-d1-s6-releaseandroid12-d1-s5-releaseandroid12-d1-releaseAndroid Build Coastguard Worker
15873656, 15873657, 15873637, 15873638, 15873639, 15873339, 15873340, 15873341, 15873342, 15873343, 15873344, 15873345, 15873346, 15873947, 15873948, 15873949, 15873950, 15873951, 15873952, 15873953, 15873954, 15873955, 15873956, 15873957, 15873958, 15873959, 15873960, 15873961, 15873642, 15873122, 15873323, 15873123, 15873324, 15872698, 15872700, 15873987, 15873962, 15873963, 15873964, 15873965, 15873557, 15873558, 15873816, 15873643, 15873817, 15873660, 15873559, 15873988, 15873644, 15873645, 15873646, 15873325, 15873661, 15873662, 15873663, 15874027, 15874028, 15874029, 15874030, 15874031, 15874032, 15874033, 15874034, 15874035, 15874036, 15874037, 15874038, 15874039, 15874040, 15874041, 15874042, 15873560, 15873561, 15873854, 15873855, 15873562, 15873563, 15873564, 15873565, 15873566, 15874047, 15874048, 15873326, 15873124, 15874043, 15872622, 15872623, 15873857, 15872701, 15872702] into sc-d1-release Change-Id: I3b67239b99a1795980fbe1dacce2899f77aff01c
2021-09-20Security Fix: Crafted GATT request causes BT stack crashMartin Brabham
A while loop and condition check for the value of a type to be 0 when in fact since the value.len is arbitrary it could make the remaining length "less than 0" and since the type is unsigned it'll never be "less than 0." Use signed type for loop and conditional checking. Additionally, make sure the value.len when used to read an array is not more than the remaining length of the data. Bug: 197536150 Test: poc application Tag: #security Change-Id: I20d66ddd1055577d7d39aba447233c19081bb789 (cherry picked from commit 1da56d1c815aa4854aa42f721732070333e5e924)
2021-08-14Snap for 7641964 from adf74bc9156c3108f3a670fc37415f28e6121262 to sc-d1-releaseandroid-12.0.0_r7android-12.0.0_r6android-12.0.0_r5android-12.0.0_r4android12-d1-s4-releaseandroid12-d1-s3-releaseandroid12-d1-s2-releaseandroid12-d1-s1-releaseAndroid Build Coastguard Worker
Change-Id: If14606a8e064c8cc2d36d5270c785c23c18c22a1
2021-08-13Merge "Stop inquiry when inquiry cancelled" into sc-devTreeHugger Robot
2021-08-13Snap for 7637344 from 7f79977fcf102eb2e42ff0ebfb98d62b0f7995ef to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: I7997b286e7272226365bdeafe762d0124faca5df
2021-08-11BluetoothAudioHAL: reset A2DP pending command while ending the sessionCheney Ni
Bug: 175425864 Tag: #compatibility Test: Switch A2DP active device manually Ignore-AOSP-First: cherry-pick from aosp to upstream branch Change-Id: Icf29d8e5c557c927bffe9d49188bd0cf98b07120
2021-08-11Stop inquiry when inquiry cancelledIHLHO KIM
Inquiry is not stopped cause of clearing of BTM_BLE_INQUIRY_MASK. This issue came from the follwing patch. https://android-review.googlesource.com/c/platform/system/bt/+/1402183 Bug: 195908804 Change-Id: I3361c924c9445d6aae2856f41b732fca22951f76 Tag: #refactor Ignore-AOSP-First: cherry-pick from aosp to upstream branch Test: compile & verify basic functions working
2021-08-07Snap for 7620055 from 940c57287883b766c4e7ce5b6407feb91dede008 to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: I9790c61aa4aa4ca5a661759599c65dbcedb8a703
2021-08-06Merge "Disable sniff for KDDI carkit" into sc-devandroid12-devTreeHugger Robot
2021-08-06Disable sniff for KDDI carkitPatty
When sniff is enabled, KDDI car kit may disconnect the ACL connection when SCO connection disconnect. Tag: #compatibility Bug: 194029299 Test: 1) Connect with KDDI car kit 2) Check Write Link Policy Command, enable sniff mode should be false Change-Id: I597684cc2dc709167a789e2a1de3866bf9aab872
2021-08-06Snap for 7616100 from d50116d3068eec67cb2164d9d638c34ef60f8156 to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: Ie56a9db7594289057fb748d9a15edd7eb822d45b
2021-08-05Disable sniff mode when AVDTP startTed Wang
To avoid ACL link go into sniff mode during a2dp streaming by remote request, disable sniff mode by link policy when AVDTP start, and enable when AVDTP suspend, stop or disconnect. Tag: #compatibility Bug: 193206591 Test: audio resume after MO/MT call Change-Id: I0af3223e0722b0343e8d091985e3e23606104268 Merged-In: I0af3223e0722b0343e8d091985e3e23606104268
2021-07-31Snap for 7599941 from b66647c837314923c3c8c86e82cd83098b04b594 to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: I6af93e85a83a7855d0dd05a10a128392fd93e1e6
2021-07-30Merge "Also remove entry during delete in addition to clear" into sc-devMartin Brabham
2021-07-30Merge "Reduce shutdown BTA_DM_DISABLE_TIMER_MS from 5000ms to 2000ms" into ↵TreeHugger Robot
sc-dev
2021-07-29Snap for 7592383 from abff1a39e9433a7cd8e294b01ff1d9a0dcf94290 to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: I62d8d9eb2ce09bcc16502e9f01c1847dc0107934
2021-07-28Also remove entry during delete in addition to clearMartin Brabham
Bug: 194432570 Test: Manual test app; nRF connect Tag: #feature Change-Id: I17a1a8b1ba2b305527ae74bb8ad5f6e1258e870e Merged-In: I17a1a8b1ba2b305527ae74bb8ad5f6e1258e870e
2021-07-28Reduce shutdown BTA_DM_DISABLE_TIMER_MS from 5000ms to 2000msChris Manton
Bug: 192154257 Test: gd/cert/run Tag: #refactor Ignore-AOSP-First: Possible CP candidate Change-Id: Ia916e427cb00e029ecb13a56255219fb2aba8500
2021-07-28L2CA_RegisterLECoc fixHansong Zhang
We should register security record when we are server, so the condition should be the same as "vpsm == psm", as in line 412 below. So we should use "pL2CA_ConnectInd_Cb != nullptr" (server has to have an incoming connection handler), OR "psm < LE_DYNAMIC_PSM_START" (Fixed PSM service, as it's treated like this for vpsm). Tag: #stability Bug: 193142224 Test: CtsVerifier LE COC client and server Change-Id: I627e4dcd0aca4c113966952b53fad2be0f9d7104
2021-07-28Merge "Fix L2cap LE COC security record leaks" into sc-devTreeHugger Robot
2021-07-28Fix L2cap LE COC security record leaksHansong Zhang
- When we are client, we don't need to register security during L2cap registration. - When we are done, we clean up security record by PSM; Service ID might be invalid. - Once the btif topshim facade initial commit is done, we can repro this and verify the fix with test automation. Tag: #stability Bug: 193142224 Test: CtsVerifier LE COC Client for many times; later we will have an automated test for this Change-Id: I90fd23ce26c65ca3314e0754a2630d3f63c5d5d8 Merged-In: I90fd23ce26c65ca3314e0754a2630d3f63c5d5d8
2021-07-27Snap for 7584485 from 5de15fd5c5b63a6fd0b27e12a2185ae0454f407b to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: I0fd7ca9309b5669c67f71766f2aa871610975faa
2021-07-26BTM_PM: Try other pending changes when current one failedHansong Zhang
When we receive a non-SUCCESS command status for pm change, we should not stop here; there might be some other pending pm changes in the queue. We need to try the remaining ones. Test: Disconnect a device when there is a pending PM change Tag: #stability Bug: 180842489 Bug: 184095368 Change-Id: I31a6f96cd3b47e671141c29801f4d7397787fc51 Merged-In: I31a6f96cd3b47e671141c29801f4d7397787fc51
2021-07-23Snap for 7574892 from ab4c8a15b628d125ec78c77b78c1123a108331d5 to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: Ic68e813b824c613d759d494b47ca068bb0f799a8
2021-07-21Fix net_test_osi am: c757c89b20 am: 5ea1923be7 am: 137884f281 am: d3363286c5Chris Manton
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1740854 Bug: 191431228 Tag: #refactor Test: gd/cert/run --device Ignore-AOSP-First: Cherry-pick to release branch (cherry picked from commit b9eb2c51c7a7af64da6f622efbc2f822c3c000c8) Merged-In: I25e3a8aa16dce375fed79133b1e1561d914c6a8d Change-Id: I25e3a8aa16dce375fed79133b1e1561d914c6a8d
2021-07-16Snap for 7553867 from 7d54fb0563a9b299a7fa834a54c65ccf6578323a to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: If1a890f3296a9f6989de8e5729585d0850f6eb35
2021-07-06eatt: Improve handling incoming EATT connectionŁukasz Rymanowski
With this patch we make sure that eatt_dev is created always when EATT is supported on the peer side, no matter what is the connection role. It will allow to accept ecoc channels when Android device is peripheral device Bug: 159786353 Bug: 191313013 Tag: #feature Test: atest --host net_test_eatt Sponsor: jpawlowski@ Merged-In: I4d735bc4a2d74f637e9c7f7819e10659af9b0fbb Change-Id: I4d735bc4a2d74f637e9c7f7819e10659af9b0fbb
2021-07-06eatt: Fix for the crash on incoming channel creationŁukasz Rymanowski
It fixes: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- Abort message: '[FATAL:eatt_impl.h(142)] Check failed: eatt_dev->eatt_tcb_. Crash could happen when Android is connects at first as a central device connection to peer which supports EATT and after reconnection it is peer initiating ecoc (e.g. Android is peripheral or peer is faster with ecoc connection request). At that point eatt_dev is there but eatt_tcb_ is not. Bug: 159786353 Bug: 191313013 Tag: #feature Test: atest --host net_test_eatt Sponsor: jpawlowski@ Merged-In: Ic5e8c027dc45eec942457f09c987ec64cfafb761 Change-Id: Ic5e8c027dc45eec942457f09c987ec64cfafb761
2021-07-06stack/gatt: Store GATT server supported featuresŁukasz Rymanowski
Tag: #feature Bug: 159786353 Sponsor: jpawlowski@ Test: compile & manual testing Bug: 191313013 Merged-In: Ic16d962949e3aa51ed1ab5ce06cf9aa1acebc726 Change-Id: Ic16d962949e3aa51ed1ab5ce06cf9aa1acebc726
2021-07-06btif_storage: Add way to store GATT server supported featuresŁukasz Rymanowski
This is needed for storing Enhanced ATT support. Tag: #feature Bug: 159786353 Sponsor: jpawlowski@ Test: compile & manual testing Bug: 191313013 Merged-In: Ic37b668b91ab6c830d780f70db703a5d9be11677 Change-Id: Ic37b668b91ab6c830d780f70db703a5d9be11677
2021-07-06eatt: Fix crash on double disconnectŁukasz Rymanowski
Bug: 159786353 Tag: #feature Test: atest --host net_test_eatt Sponsor: jpawlowski@ Bug: 191313013 Merged-In: Ie4872f1c51445df59f2f68b127454d5f4d4e9ad0 Change-Id: Ie4872f1c51445df59f2f68b127454d5f4d4e9ad0
2021-07-06eatt: Fix loggingŁukasz Rymanowski
Bug: 159786353 Tag: #feature Test: compile Sponsor: jpawlowski@ Bug: 191313013 Merged-In: Ia07b894a37a648d2a8aec0539e6fb75000a2c999 Change-Id: Ia07b894a37a648d2a8aec0539e6fb75000a2c999
2021-07-03Snap for 7519874 from 95230e61c1f859936d721ce868bd0ea5dab4fe98 to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: Ic319a14d79ad357ae680d414ce3257e4772da9bc
2021-07-02Merge "Queue discovery and device inquiry while bonding" into sc-devTreeHugger Robot
2021-07-02Snap for 7514518 from 9af605ec524c67f16f56e4d198519a0ce3af2615 to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: I7bca1a1865a806f62d8b04b040406adcaf3ebc7c
2021-07-01Queue discovery and device inquiry while bondingRahul Sabnis
Tag: #feature Bug: 187165224 Test: Manual Merged-In: I260c967de0f4656ee852a098a98c9ceb0e6dfbde Change-Id: I260c967de0f4656ee852a098a98c9ceb0e6dfbde
2021-07-01Snap for 7510676 from 1d8c9654119d3ce4a4845cd48896bd506110675d to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: I17bfcc834241660d34b9bbf113f417ce02d98b67
2021-06-30OOB: Return local adapter name in generated OOB DataMartin Brabham
Bug: 192475074 Test: Manual, test app. Tag: #feature Change-Id: I5086cbe6c0d2ab3346a956e22df36725a9e93530 Merged-In: I5086cbe6c0d2ab3346a956e22df36725a9e93530
2021-06-30Merge "Configure newavrcp target to be "passive" when setting up AVCTP" into ↵Sal Savage
sc-dev
2021-06-30Snap for 7506386 from 69dab967bc056ff3bb7207933bc6f71c357f3a72 to sc-d1-releaseAndroid Build Coastguard Worker
Change-Id: I5299f6d13823a8a7612fc47a27d3dd55c7d0d1e3
2021-06-29Merge changes from topic "bluetooth_oob_api" into sc-devTreeHugger Robot
* changes: OOB: Replace 'memcpy' with assignments OOB: Cancel advertiser and replace OOB: Start advertising when OOB data is generated. OOB: Connector; Set name of remote from OOB data OOB: Store keys and data generated for local OOB use. OOB: Utilize SMP state machine to generate the OOB data. OOB: Rework create bond out of band flow to not use btif_dm_cb_create_bond
2021-06-29OOB: Replace 'memcpy' with assignmentsMartin Brabham
Fixes a lint warning Bug: 178007935 Test: Compiles Tag: #feature Change-Id: Id5e0d41085f9415daadb261a01f99200cb8f90e0 Merged-In: Id5e0d41085f9415daadb261a01f99200cb8f90e0
2021-06-29OOB: Cancel advertiser and replaceMartin Brabham
Bug: 192298941 Test: Manual, test app and nRF connect. Tag: #feature Change-Id: Ia9a538fea6ac58e1487523447b22396c0caead8b Merged-In: Ia9a538fea6ac58e1487523447b22396c0caead8b
2021-06-29OOB: Start advertising when OOB data is generated.Martin Brabham
This affords the stack the capability to provide the proper random address and address type to the user via the OobDataCallback. Previous to this commit, the data defaults to the public address. This advertisement will time out, and will clear OOB data upon timeout. Bug: 192084169 Test: Manual, test app. Test: m bt_host_test_bta Test: m net_test_btif_stack Tag: #feature Change-Id: Ia24c10e7209027b8b070b9196caba7e394ee6dcb Merged-In: Ia24c10e7209027b8b070b9196caba7e394ee6dcb
2021-06-29OOB: Connector; Set name of remote from OOB dataMartin Brabham
There are 4 total "devices" listed in Settings. Each shows a mac address, if a name doesn't exist it won't show in things like the share a file dialog. This names 1/4 of those addresses. The LE Device (Advertiser) displayed on the Connector's Settings->Connected devices list. Bug: 192093473 Test: Manual, test app Tag: #feature Change-Id: I94024413e962f4742f6fa71c495d042aaede5ffb Merged-In: I94024413e962f4742f6fa71c495d042aaede5ffb
2021-06-29OOB: Store keys and data generated for local OOB use.Martin Brabham
Bug: 190395922 Test: Manual, test app Tag: #feature Change-Id: Ib88abb866ce08b99c7fbf17ac9cfb85ee0f3441e Merged-In: Ib88abb866ce08b99c7fbf17ac9cfb85ee0f3441e
2021-06-29OOB: Utilize SMP state machine to generate the OOB data.Martin Brabham
Finish the SMP implemention for OOB in the legacy stack and connect callback pipeline to return data to the caller. Bug: 178007935 Test: Manual; test app Tag: #feature Change-Id: Id4fe6b29a1db3ec50d37b042ea67cebfa9eba4e1 Merged-In: Id4fe6b29a1db3ec50d37b042ea67cebfa9eba4e1
2021-06-29OOB: Rework create bond out of band flow to not use btif_dm_cb_create_bondMartin Brabham
Instead we just call BTA_DmBond directly since this is an OOB pairing scenario Bug: 178007935 Test: Compiles, Manually with test app Tag: #feature Change-Id: Ie9d7cf20c18b2ccac322dabad141135e8a18bf93 Merged-In: Ie9d7cf20c18b2ccac322dabad141135e8a18bf93
2021-06-29Configure newavrcp target to be "passive" when setting up AVCTPSal Savage
As it stands, both newavrcp target and avrcp controller devices are configured as not "passive." This is an Android BT stack convention that AVCTP uses as a policy for handling unlikely connection collisions. When passive, a device will allow an incoming connection to take the place of it's outgoing connection, assuming the connection. Non-passive devices are strict in only allowing their outgoing connection to stay up. When two non-passive devices connect with each other, there's a 10-15% chance that the timing of events will cause each device to disconnect each other's connection, resulting in no connection being set up. AVCTP Section 5.1 says the target should allow the controller's connection to succeed. Configuring newavrcp target to be passive puts us more in line with that requirement. Note this is a temporary work-around for a larger effort around the AVCTP connection collision handling that will probably need to take place. Tag: #stability Bug: 179292409 Test: atest BluetoothInstrumentationTests; -- Also connect phone to an AVRCP controller device and wait for an unlikely connection collision. Ensure the phone allows the CT to connect over its own connection. Change-Id: I6861c78ba594d4e4ccfcf8ce9adec109f1b2d270 Merged-In: I6861c78ba594d4e4ccfcf8ce9adec109f1b2d270
2021-06-29RESTRICT AUTOMERGE Security fix OOB read vuln stack/avrc/avrc_pars_tgChris Manton
Bug: 168712382 Tag: #security Test: gd/cert/run Ignore-AOSP-First: Security Change-Id: Iae823e45675d46d8ca037157e516cc2f94fadfab