OSDN Git Service

android-x86/system-bt.git
2 years agoDisable sniff in link policy before a2dp streaming
Treehugger Robot [Thu, 26 Aug 2021 03:11:18 +0000 (03:11 +0000)]
Disable sniff in link policy before a2dp streaming

Bug: 205672705
Ignore-AOSP-First: It is in the AOSP.
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1788388

Change-Id: I8390acacfb25fddcbd475144e399b3b0c4408a07
(cherry picked from commit f74c025302d034f70f14d9dd85aee44b64a04f57)

2 years agoMerge "Clear identity bit when passing address to filter" into sc-v2-dev
TreeHugger Robot [Mon, 22 Nov 2021 19:02:28 +0000 (19:02 +0000)]
Merge "Clear identity bit when passing address to filter" into sc-v2-dev

2 years agoMerge "Disable sniff mode for Phonak device" into sc-qpr1-dev am: d01fe3818c
Johnson Yang [Fri, 19 Nov 2021 15:35:45 +0000 (15:35 +0000)]
Merge "Disable sniff mode for Phonak device" into sc-qpr1-dev am: d01fe3818c

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

Change-Id: Ieebb7d690e9d690d757c80bff4e86b2fd2052b1c

2 years agoHearingAid: set playback_started to true when the start audio command finishes. am...
weichinweng [Fri, 19 Nov 2021 15:35:30 +0000 (15:35 +0000)]
HearingAid: set playback_started to true when the start audio command finishes. am: 07476e5570

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

Change-Id: I6da23d551ae65fbdf21f1143ee45c77de49c4b7b

2 years agoMerge "Disable sniff mode for Phonak device" into sc-qpr1-dev
Johnson Yang [Fri, 19 Nov 2021 15:24:34 +0000 (15:24 +0000)]
Merge "Disable sniff mode for Phonak device" into sc-qpr1-dev

2 years agoClear identity bit when passing address to filter
Jakub Pawlowski [Fri, 19 Nov 2021 11:10:52 +0000 (12:10 +0100)]
Clear identity bit when passing address to filter

Legacy stack kept Identity Address Type without the identity bit set.
It is later passed without any masking to "Add to accept list", "add to
resolving list", and VSC filter command. All these commands specify that
the identity bit should not be set in related specifications.

Test: manual test with DCK application
Bug: 201255908
Change-Id: Id68e81a6706ac40d7394e2803ec3339a7bc44a0a

2 years agoDisable sniff mode for Phonak device
Ted Wang [Thu, 18 Nov 2021 06:38:14 +0000 (14:38 +0800)]
Disable sniff mode for Phonak device

Phonak device does not handling well after entering sniff subrating
mode. Disable sniff mode to avoid this problem.

Tag: #compatibility
Bug: 16240099
Test: manual
Change-Id: I909d1bfe3106749bfa261b3977a207d1880dded0
Merged-In: I909d1bfe3106749bfa261b3977a207d1880dded0

2 years agoMerge "Keep the IRK when the scan is finished" into sc-v2-dev
Jakub Pawlowski [Tue, 16 Nov 2021 19:50:10 +0000 (19:50 +0000)]
Merge "Keep the IRK when the scan is finished" into sc-v2-dev

2 years agoHearingAid: set playback_started to true when the start audio command finishes.
weichinweng [Mon, 15 Nov 2021 02:42:18 +0000 (10:42 +0800)]
HearingAid: set playback_started to true when the start audio command finishes.

Bug: 205679750
Tag: #compatibility
Test: 1. Paring from setting and and streaming play
      2. HA battery remove and back reconnect
      3. out of range reconnect
      4. Paired from APP

Change-Id: I0a3e58b792bb12aa86f8ca9e1fe7a9d7bca58ec7
Merged-In: I0a3e58b792bb12aa86f8ca9e1fe7a9d7bca58ec7

2 years agoKeep the IRK when the scan is finished
Jakub Pawlowski [Mon, 8 Nov 2021 12:09:38 +0000 (13:09 +0100)]
Keep the IRK when the scan is finished

Bug: 201255908
Test: manually tested against phone with sample IRK scanning app
Change-Id: I58f8caf2c29bf2b12db2e595d42295b65dc4fa13

2 years agoMerge "Disable absolute volume control for Phonak" into sc-qpr1-dev am: ff6a7e61c7
TreeHugger Robot [Fri, 12 Nov 2021 05:48:45 +0000 (05:48 +0000)]
Merge "Disable absolute volume control for Phonak" into sc-qpr1-dev am: ff6a7e61c7

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

Change-Id: Idcb9f50f6af66e003ec23ea727364aae23e81f96

2 years agoMerge "Disable absolute volume control for Phonak" into sc-qpr1-dev
TreeHugger Robot [Fri, 12 Nov 2021 05:35:02 +0000 (05:35 +0000)]
Merge "Disable absolute volume control for Phonak" into sc-qpr1-dev

2 years agoDisable absolute volume control for Phonak
Ted Wang [Thu, 11 Nov 2021 02:24:44 +0000 (10:24 +0800)]
Disable absolute volume control for Phonak

Phonak does not adjust volume with the level included in set absolute
volume command. Disable absolute volume control for Phonak to avoid
volume keep at max.

Tag: #compatibility
Bug: 204939205
Test: manual
Change-Id: I35d4d4e5231d67c46c2f5ea85f7e4364552892c4
Merged-In: I35d4d4e5231d67c46c2f5ea85f7e4364552892c4

2 years agoMerge "Move offload start related flags from BTA_AV_SCB to BTA_AV_CB" into sc-v2-dev
Ted Wang [Thu, 11 Nov 2021 02:59:36 +0000 (02:59 +0000)]
Merge "Move offload start related flags from BTA_AV_SCB to BTA_AV_CB" into sc-v2-dev

2 years agoMerge "Reset the IRK after all devices are unpaired" into sc-v2-dev
TreeHugger Robot [Wed, 10 Nov 2021 02:08:06 +0000 (02:08 +0000)]
Merge "Reset the IRK after all devices are unpaired" into sc-v2-dev

2 years agoFix null pointer dereference in HACK_acl_check_sm4 am: 47ed17e0ab
Dowon Park [Tue, 9 Nov 2021 07:15:42 +0000 (07:15 +0000)]
Fix null pointer dereference in HACK_acl_check_sm4 am: 47ed17e0ab

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

Change-Id: Id0f1adb3202376ed74863f51a1ef4cf751da59cf

2 years agoFix null pointer dereference in HACK_acl_check_sm4
Dowon Park [Tue, 31 Aug 2021 08:17:32 +0000 (17:17 +0900)]
Fix null pointer dereference in HACK_acl_check_sm4

fix to return when p_acl is null to avoid null pointer dereference
problem.

Sponsor: cmanton@gmail.com
Bug: 198338740
Tag: #refactor
Test: gd/cert/run
Ignore-AOSP-First: Reliability

Change-Id: I45408a2b024dc424442bf3c2f92293b8942b54bb
Signed-off-by: Dowon Park <dowon.park@samsung.com>
2 years ago[automerger skipped] [DO NOT MERGE]Move offload start related flags from BTA_AV_SCB...
Ted Wang [Fri, 5 Nov 2021 09:46:26 +0000 (09:46 +0000)]
[automerger skipped] [DO NOT MERGE]Move offload start related flags from BTA_AV_SCB to am: 48e95ea24c -s ours

am skip reason: subject contains skip directive

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

Change-Id: I52e6390cd641e9538ead45a53dd86786bd647e35

2 years agoMove offload start related flags from BTA_AV_SCB to BTA_AV_CB
Ted Wang [Mon, 25 Oct 2021 07:56:42 +0000 (15:56 +0800)]
Move offload start related flags from BTA_AV_SCB to BTA_AV_CB

Ignore a2dp offload start request when offloading already in progress.

Tag: #stability
Bug: 203127797
Test: Force to start offload duplicated
Change-Id: I99858852866e71d60200a798dd31d61a20b2669c
Merged-In: Id9fc670a79cf4a674ef104de8e7ad0a7676964ef

2 years ago[DO NOT MERGE]Move offload start related flags from BTA_AV_SCB to
Ted Wang [Mon, 25 Oct 2021 07:56:42 +0000 (15:56 +0800)]
[DO NOT MERGE]Move offload start related flags from BTA_AV_SCB to
BTA_AV_CB

Ignore a2dp offload start request when offloading already in progress.

Tag: #stability
Bug: 203127797
Test: Force to start offload duplicated
Change-Id: I99858852866e71d60200a798dd31d61a20b2669c
Merged-In: I99858852866e71d60200a798dd31d61a20b2669c

2 years agoReset the IRK after all devices are unpaired
Martin Brabham [Fri, 29 Oct 2021 21:27:27 +0000 (21:27 +0000)]
Reset the IRK after all devices are unpaired

Bug: 204355134
Bug: 195410559
Test: Check IRK, pair devices, unpair all devices, Check IRK
Tag: #security
Change-Id: I8e44f010a72dcdec595d81293a05f49ccc054065
Merged-In: I8e44f010a72dcdec595d81293a05f49ccc054065

2 years agoMerge "DO NOT MERGE: Enable Qualcomm 3804 log in snoop log with base 64 format" into...
More Kuo [Mon, 25 Oct 2021 02:36:27 +0000 (02:36 +0000)]
Merge "DO NOT MERGE: Enable Qualcomm 3804 log in snoop log with base 64 format" into sc-v2-dev

2 years agoDO NOT MERGE: Enable Qualcomm 3804 log in snoop log with base 64 format
More Kuo [Fri, 15 Oct 2021 08:56:01 +0000 (16:56 +0800)]
DO NOT MERGE: Enable Qualcomm 3804 log in snoop log with base 64 format

Bug: 203015591
Tag: #feature
Test: manually checked content of partial btsnoop log
Ignore-AOSP-First: Enhanced log
Change-Id: I8e0e85b1493332405147f572cceaa24c56771a3d

2 years agoFix possible NPE for UNKNOWN code path
Martin Brabham [Thu, 14 Oct 2021 20:02:59 +0000 (20:02 +0000)]
Fix possible NPE for UNKNOWN code path

Bug: 200595320
Test: Manual
Tag: #feature
Change-Id: I89b52553990bf58b8af304bab0bdd4cd8e8cb017
Merged-In: I89b52553990bf58b8af304bab0bdd4cd8e8cb017

2 years agoSMP API check for cached OOB data
Martin Brabham [Wed, 13 Oct 2021 18:27:43 +0000 (18:27 +0000)]
SMP API check for cached OOB data

If OOB data was generated before the pairing was attempted then use the
cached OOB data information for the pairing.  We don't know if it is the
data for the particular device we are attempting to pair with, but it'll
either work or it won't.  And if it doesn't, then it is likely not the
device we intended to pair with.

This will mean that Pixel will only perform double sided
OOB pairing IF it has previously created OOB data.

Data is removed on successful pairing or advertisement timeout.

When the device is the connector, it doesn't need to ask the
app for the OOB data since the OOB data is provided at the time
of create_bond_out_of_band being called.

This should fix the issue with double OOB data pairing scenarios where
this device is the device that initiates the bond.

Bug: 200595320
Test: Manual, test app.
Tag: #feature
Change-Id: Idd94a4ebe9ebeed57026fd915f499d509873e4f0
Merged-In: Idd94a4ebe9ebeed57026fd915f499d509873e4f0

2 years agoMerge "osi: Prevent memory allocations with MSB set" into rvc-qpr-dev am: 3034c96552...
Chris Manton [Wed, 6 Oct 2021 19:54:40 +0000 (19:54 +0000)]
Merge "osi: Prevent memory allocations with MSB set" into rvc-qpr-dev am: 3034c96552 am: 1f5dd6bdba am: d4a884c71a

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

Change-Id: I2259d50c80bbc76216aa8e65e5cddf9a830275ef

2 years agoMerge "osi: Prevent memory allocations with MSB set" into rvc-qpr-dev am: 3034c96552...
Chris Manton [Wed, 6 Oct 2021 19:39:11 +0000 (19:39 +0000)]
Merge "osi: Prevent memory allocations with MSB set" into rvc-qpr-dev am: 3034c96552 am: 1f5dd6bdba

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

Change-Id: Id564bb1c778e2230ea48d76d203e47479216788b

2 years agoosi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a351...
Chris Manton [Wed, 6 Oct 2021 19:30:51 +0000 (19:30 +0000)]
osi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a3510912 am: 7300b01716 am: 2cadbc6377 am: 2a995ed2ee am: 9cbaca4043

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

Change-Id: I781c1232894090c5fcdfe1d97155fc04c884ffe1

2 years agoosi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173...
Chris Manton [Wed, 6 Oct 2021 19:30:44 +0000 (19:30 +0000)]
osi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173898e am: 477c78d5e3 am: 418ede631f am: 80f269c513

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

Change-Id: Ife3582671e89604ab828e434b19fc48babe15e7b

2 years agoosi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a351...
Chris Manton [Wed, 6 Oct 2021 19:30:38 +0000 (19:30 +0000)]
osi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a3510912 am: 7300b01716 am: d2596b6520 am: e430264ba2 am: 04d1214cdd

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

Change-Id: I1c1a82579b2fc8eed34e62577ba59367ff7e9e21

2 years agoosi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173...
Chris Manton [Wed, 6 Oct 2021 19:30:30 +0000 (19:30 +0000)]
osi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173898e am: e8c11e248e am: ba7b1b8dc5 am: bb7c9a0574

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

Change-Id: I680a11bad2593e9be5143c0b3ff9477dde0b1d18

2 years agoMerge "osi: Prevent memory allocations with MSB set" into rvc-qpr-dev am: 3034c96552
Chris Manton [Wed, 6 Oct 2021 19:29:36 +0000 (19:29 +0000)]
Merge "osi: Prevent memory allocations with MSB set" into rvc-qpr-dev am: 3034c96552

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

Change-Id: If6a8459b1f86d41c2b7913e5e45ed808884fb553

2 years agoosi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a351...
Chris Manton [Wed, 6 Oct 2021 19:21:12 +0000 (19:21 +0000)]
osi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a3510912 am: 7300b01716 am: 2cadbc6377 am: 2a995ed2ee

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

Change-Id: I263be25fe5d31705f8b4fd0d907c7c5edda57f3a

2 years agoosi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173...
Chris Manton [Wed, 6 Oct 2021 19:21:07 +0000 (19:21 +0000)]
osi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173898e am: 477c78d5e3 am: 418ede631f

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

Change-Id: I496fe0a0941ba593e2148e19005326b81f00e09c

2 years agoosi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a351...
Chris Manton [Wed, 6 Oct 2021 19:21:03 +0000 (19:21 +0000)]
osi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a3510912 am: 7300b01716 am: d2596b6520 am: e430264ba2

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

Change-Id: I0f4d512c6d527005d8a194c1da0a1841583317f6

2 years agoosi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173...
Chris Manton [Wed, 6 Oct 2021 19:20:58 +0000 (19:20 +0000)]
osi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173898e am: e8c11e248e am: ba7b1b8dc5

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

Change-Id: I6aa57d04dd4c85c781853d1c8ccec84a042a1d49

2 years agoMerge "osi: Prevent memory allocations with MSB set" into rvc-qpr-dev
Chris Manton [Wed, 6 Oct 2021 19:17:56 +0000 (19:17 +0000)]
Merge "osi: Prevent memory allocations with MSB set" into rvc-qpr-dev

2 years agoosi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a351...
Chris Manton [Wed, 6 Oct 2021 19:06:03 +0000 (19:06 +0000)]
osi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a3510912 am: 7300b01716 am: 2cadbc6377

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

Change-Id: I893e25ea34771c4f650ad22f647c03638df77e8d

2 years agoosi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173...
Chris Manton [Wed, 6 Oct 2021 19:05:16 +0000 (19:05 +0000)]
osi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173898e am: 477c78d5e3

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

Change-Id: I5acb4c7ebd3a994218023aeab327252ed2353484

2 years agoosi: Prevent memory allocations with MSB set am: e435404a7d am: 865d4f4214 am: eacac9...
Chris Manton [Wed, 6 Oct 2021 18:54:35 +0000 (18:54 +0000)]
osi: Prevent memory allocations with MSB set am: e435404a7d am: 865d4f4214 am: eacac971c2 am: 17512ac743

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

Change-Id: Ie9829ae9f032a0d2c6464028db24186c6b9f86c3

2 years agoosi: Prevent memory allocations with MSB set am: e435404a7d am: ec15c0798b am: b40605...
Chris Manton [Wed, 6 Oct 2021 18:54:31 +0000 (18:54 +0000)]
osi: Prevent memory allocations with MSB set am: e435404a7d am: ec15c0798b am: b4060577b1 am: e77476438c

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

Change-Id: I62e317a9a980b73531c89639bffefc9336bd1be3

2 years agoosi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a351...
Chris Manton [Wed, 6 Oct 2021 18:53:45 +0000 (18:53 +0000)]
osi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a3510912 am: 7300b01716 am: d2596b6520

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

Change-Id: I954eaa7530d6c9f9aa9652cfbcc48cdbbc0a306f

2 years agoosi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173...
Chris Manton [Wed, 6 Oct 2021 18:53:38 +0000 (18:53 +0000)]
osi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173898e am: e8c11e248e

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

Change-Id: I5c6e608a88165a6b8e72ecf42717b90212eb0165

2 years agoosi: Prevent memory allocations with MSB set am: e435404a7d am: 865d4f4214 am: eacac971c2
Chris Manton [Wed, 6 Oct 2021 18:39:28 +0000 (18:39 +0000)]
osi: Prevent memory allocations with MSB set am: e435404a7d am: 865d4f4214 am: eacac971c2

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

Change-Id: I96ba920ef13a419749253ac136b917e140bfeca7

2 years agoosi: Prevent memory allocations with MSB set am: e435404a7d am: ec15c0798b am: b4060577b1
Chris Manton [Wed, 6 Oct 2021 18:39:26 +0000 (18:39 +0000)]
osi: Prevent memory allocations with MSB set am: e435404a7d am: ec15c0798b am: b4060577b1

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

Change-Id: I6525cdadaa71c2a970d307ff7a37ed8941ab11ca

2 years agoosi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a351...
Chris Manton [Wed, 6 Oct 2021 18:39:24 +0000 (18:39 +0000)]
osi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a3510912 am: 7300b01716

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

Change-Id: Ifc1b529263fd24774cef4ffab422bc4bcd334901

2 years agoosi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a351...
Chris Manton [Wed, 6 Oct 2021 18:39:24 +0000 (18:39 +0000)]
osi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a3510912 am: 7300b01716

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

Change-Id: I60ce82f68eb256b8a786f8127fe21c38d0ee1833

2 years agoosi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173898e
Chris Manton [Wed, 6 Oct 2021 18:39:20 +0000 (18:39 +0000)]
osi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173898e

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

Change-Id: I7c21d6dfe0efe6812259cea7b839120a3cd58ac1

2 years agoosi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173898e
Chris Manton [Wed, 6 Oct 2021 18:39:20 +0000 (18:39 +0000)]
osi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602 am: d65173898e

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

Change-Id: I03b2dbdb3dd187880383a26fedf10cb4f06ff670

2 years agoosi: Prevent memory allocations with MSB set am: e435404a7d am: 865d4f4214
Chris Manton [Wed, 6 Oct 2021 18:24:18 +0000 (18:24 +0000)]
osi: Prevent memory allocations with MSB set am: e435404a7d am: 865d4f4214

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

Change-Id: Ia474ae0cada1cf3966d31851059dfe6bc87f45f2

2 years agoosi: Prevent memory allocations with MSB set am: a1184057b2 am: c4935a845a
Chris Manton [Wed, 6 Oct 2021 18:24:04 +0000 (18:24 +0000)]
osi: Prevent memory allocations with MSB set am: a1184057b2 am: c4935a845a

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

Change-Id: I0593ec83e6fe321b88c4200ba548923fa7e6a021

2 years agoosi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a3510912
Chris Manton [Wed, 6 Oct 2021 18:23:49 +0000 (18:23 +0000)]
osi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793 am: 85a3510912

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

Change-Id: Ice95438b8dbce78342490c360887246f7c5a1cb6

2 years agoosi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602
Chris Manton [Wed, 6 Oct 2021 18:23:45 +0000 (18:23 +0000)]
osi: Prevent memory allocations with MSB set am: 1e76ec66d8 am: 32249b0602

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

Change-Id: I169567991117522a820ee5140e8bad2b1444e2e7

2 years agoosi: Prevent memory allocations with MSB set am: e435404a7d am: ec15c0798b
Chris Manton [Wed, 6 Oct 2021 18:23:11 +0000 (18:23 +0000)]
osi: Prevent memory allocations with MSB set am: e435404a7d am: ec15c0798b

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

Change-Id: I109fadf5b18e8796dc683a57897149fff96660ca

2 years agoosi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793
Chris Manton [Wed, 6 Oct 2021 18:13:10 +0000 (18:13 +0000)]
osi: Prevent memory allocations with MSB set am: cee4d086c9 am: 1812f99793

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

Change-Id: Ie5cfe615061877d55b80ca411aba92629eb81583

2 years agoosi: Prevent memory allocations with MSB set am: cee4d086c9
Chris Manton [Wed, 6 Oct 2021 18:09:25 +0000 (18:09 +0000)]
osi: Prevent memory allocations with MSB set am: cee4d086c9

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

Change-Id: I29728cd50670ba60bf42f4142aa302f79d6ed9e3

2 years agoosi: Prevent memory allocations with MSB set am: a1184057b2
Chris Manton [Wed, 6 Oct 2021 18:09:21 +0000 (18:09 +0000)]
osi: Prevent memory allocations with MSB set am: a1184057b2

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

Change-Id: If7002b1f305358ff40aa174d81442d3b998b5514

2 years agoosi: Prevent memory allocations with MSB set am: e435404a7d
Chris Manton [Wed, 6 Oct 2021 18:09:15 +0000 (18:09 +0000)]
osi: Prevent memory allocations with MSB set am: e435404a7d

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

Change-Id: Id94265b102135a390aa798b3b682530bc8c33625

2 years agoosi: Prevent memory allocations with MSB set am: e435404a7d
Chris Manton [Wed, 6 Oct 2021 18:09:13 +0000 (18:09 +0000)]
osi: Prevent memory allocations with MSB set am: e435404a7d

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

Change-Id: I977f1225ea250ef304b79efd475440f248bd557d

2 years agoosi: Prevent memory allocations with MSB set am: 1e76ec66d8
Chris Manton [Wed, 6 Oct 2021 18:08:26 +0000 (18:08 +0000)]
osi: Prevent memory allocations with MSB set am: 1e76ec66d8

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

Change-Id: I3f033ec55080fbb2d924662b20d5e09a89a00c51

2 years agoosi: Prevent memory allocations with MSB set am: fa98e7e869
Chris Manton [Wed, 6 Oct 2021 15:49:18 +0000 (15:49 +0000)]
osi: Prevent memory allocations with MSB set am: fa98e7e869

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

Change-Id: I5ec8e46e22290bfbfb8c87e2cf7c37c61f1eca9b

2 years agoosi: Prevent memory allocations with MSB set
Chris Manton [Thu, 30 Sep 2021 00:49:25 +0000 (17:49 -0700)]
osi: Prevent memory allocations with MSB set

Limit allocations on 32bit to 2 GB
Limit allocations on 64bit to 8 Exabyte

Bug: 197868577
Tag: #refactor
Test: gd/cert/run
Ignore-AOSP-First: Security
Change-Id: I1c347084d7617b1e364a3241f1b37b398a2a6c6a

2 years agoosi: Prevent memory allocations with MSB set
Chris Manton [Thu, 30 Sep 2021 00:49:25 +0000 (17:49 -0700)]
osi: Prevent memory allocations with MSB set

Limit allocations on 32bit to 2 GB
Limit allocations on 64bit to 8 Exabyte

Bug: 197868577
Tag: #refactor
Test: gd/cert/run
Ignore-AOSP-First: Security
Change-Id: I1c347084d7617b1e364a3241f1b37b398a2a6c6a

2 years agoFix GATT data loss due to segmentation error
IHLHO KIM [Thu, 30 Sep 2021 08:46:37 +0000 (08:46 +0000)]
Fix GATT data loss due to segmentation error

Wrong segmentation of HCI ACL data packet makes data loss.
HCI ACL Data packet header(preamble) has to be removed for the calculation.
BR_EDR will have same issue. This fix it also.

This issue came from the following patch.
https://android-review.googlesource.com/c/platform/system/bt/+/1407393

Bug: 201372527
Change-Id: I9d6b813b173512638680bdf301379851a2e34180
Tag: #refactor
Test: compile & verify basic functions working
Ignore-AOSP-First: Backport

2 years agoAdd BMW Carkit into IOP table to only use AVRCP 1.4 am: b474562c53
Patty [Fri, 1 Oct 2021 16:24:16 +0000 (16:24 +0000)]
Add BMW Carkit into IOP table to only use AVRCP 1.4 am: b474562c53

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

Change-Id: I60956ea246acbf6f0c3d8a7984fcc412561df971

2 years agoosi: Prevent memory allocations with MSB set
Chris Manton [Thu, 30 Sep 2021 00:49:25 +0000 (17:49 -0700)]
osi: Prevent memory allocations with MSB set

Limit allocations on 32bit to 2 GB
Limit allocations on 64bit to 8 Exabyte

Bug: 197868577
Tag: #refactor
Test: gd/cert/run
Ignore-AOSP-First: Security
Change-Id: I1c347084d7617b1e364a3241f1b37b398a2a6c6a

2 years agoosi: Prevent memory allocations with MSB set
Chris Manton [Thu, 30 Sep 2021 00:49:25 +0000 (17:49 -0700)]
osi: Prevent memory allocations with MSB set

Limit allocations on 32bit to 2 GB
Limit allocations on 64bit to 8 Exabyte

Bug: 197868577
Tag: #refactor
Test: gd/cert/run
Ignore-AOSP-First: Security
Change-Id: I1c347084d7617b1e364a3241f1b37b398a2a6c6a

2 years agoosi: Prevent memory allocations with MSB set
Chris Manton [Thu, 30 Sep 2021 00:49:25 +0000 (17:49 -0700)]
osi: Prevent memory allocations with MSB set

Limit allocations on 32bit to 2 GB
Limit allocations on 64bit to 8 Exabyte

Bug: 197868577
Tag: #refactor
Test: gd/cert/run
Ignore-AOSP-First: Security
Change-Id: I1c347084d7617b1e364a3241f1b37b398a2a6c6a

2 years agoosi: Prevent memory allocations with MSB set
Chris Manton [Thu, 30 Sep 2021 00:49:25 +0000 (17:49 -0700)]
osi: Prevent memory allocations with MSB set

Limit allocations on 32bit to 2 GB
Limit allocations on 64bit to 8 Exabyte

Bug: 197868577
Tag: #refactor
Test: gd/cert/run
Ignore-AOSP-First: Security
Change-Id: I1c347084d7617b1e364a3241f1b37b398a2a6c6a

2 years agoosi: Prevent memory allocations with MSB set
Chris Manton [Thu, 30 Sep 2021 00:49:25 +0000 (17:49 -0700)]
osi: Prevent memory allocations with MSB set

Limit allocations on 32bit to 2 GB
Limit allocations on 64bit to 8 Exabyte

Bug: 197868577
Tag: #refactor
Test: gd/cert/run
Ignore-AOSP-First: Security
Change-Id: I1c347084d7617b1e364a3241f1b37b398a2a6c6a

2 years agoAdd BMW Carkit into IOP table to only use AVRCP 1.4
Patty [Fri, 1 Oct 2021 06:52:08 +0000 (14:52 +0800)]
Add BMW Carkit into IOP table to only use AVRCP 1.4

Tag: #compatibility
Bug: 197454708
Test: Manual
Merged-In: Ib9ed8ee8cd9f94fdad206eaba29fad3160ee0c88
Change-Id: Ib9ed8ee8cd9f94fdad206eaba29fad3160ee0c88

2 years agoImmediately execute instead of queueing request for LE service discovery am: 6788b04e25
Rahul Sabnis [Thu, 30 Sep 2021 21:59:23 +0000 (21:59 +0000)]
Immediately execute instead of queueing request for LE service discovery am: 6788b04e25

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

Change-Id: Ide2ddf10e0d87f336c60b87b7250abd6b05d30b8

2 years agoImmediately execute instead of queueing request for LE service discovery
Rahul Sabnis [Mon, 27 Sep 2021 23:36:10 +0000 (16:36 -0700)]
Immediately execute instead of queueing request for LE service discovery
if the static address matches that of the actively pairing device

Tag: #feature
Bug: 187157597
Test: Manual
Merged-In: I7a014341bec69f1ef97878e90a11558be5ef70d8
Change-Id: I7a014341bec69f1ef97878e90a11558be5ef70d8

2 years agoMerge "Make SDP and inquiry request dequeue and execute more comprehensive and cancel...
TreeHugger Robot [Fri, 24 Sep 2021 19:55:04 +0000 (19:55 +0000)]
Merge "Make SDP and inquiry request dequeue and execute more comprehensive and cancelDiscovery now removes all queued inquiry requests." into sc-qpr1-dev am: b59afca466

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

Change-Id: Ib968d93a142e069c376a089143998e3ccd735833

2 years agoMerge "Make SDP and inquiry request dequeue and execute more comprehensive and cancel...
TreeHugger Robot [Fri, 24 Sep 2021 19:43:50 +0000 (19:43 +0000)]
Merge "Make SDP and inquiry request dequeue and execute more comprehensive and cancelDiscovery now removes all queued inquiry requests." into sc-qpr1-dev

2 years agoMake SDP and inquiry request dequeue and execute more comprehensive and
Rahul Sabnis [Thu, 16 Sep 2021 21:43:40 +0000 (14:43 -0700)]
Make SDP and inquiry request dequeue and execute more comprehensive and
cancelDiscovery now removes all queued inquiry requests.

Ignore-AOSP-First: Submitting for QPR1 & fix needs to be reworked for AOSP
Tag: #feature
Bug: 198178836
Test: Manual
Merged-In: I7b9fc60f090e507c9905ed98c8d2c82d0a9a1fd2
Change-Id: I7b9fc60f090e507c9905ed98c8d2c82d0a9a1fd2

2 years agoMerge "Ensure proper hci le meta event length size" into sc-qpr1-dev am: ffece973f3
Chris Manton [Fri, 24 Sep 2021 00:27:09 +0000 (00:27 +0000)]
Merge "Ensure proper hci le meta event length size" into sc-qpr1-dev am: ffece973f3

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

Change-Id: I38e95f9e6e22079d2350c0e2d00a9d18402896cd

2 years agoMerge "Ensure proper hci le meta event length size" into sc-qpr1-dev
Chris Manton [Fri, 24 Sep 2021 00:12:29 +0000 (00:12 +0000)]
Merge "Ensure proper hci le meta event length size" into sc-qpr1-dev

2 years agoEnsure proper hci le meta event length size
Chris Manton [Tue, 21 Sep 2021 21:55:36 +0000 (14:55 -0700)]
Ensure proper hci le meta event length size

Bug: 167759047
Test: gd/cert/run
Tag: #security
Ignore-AOSP-First: Security
Change-Id: I753b12ec123e28d94c6f362c28ff9f2774ec4445

2 years agoAdd missing return and test for volume check am: 58d268fedb
Ted Wang [Thu, 23 Sep 2021 02:47:19 +0000 (02:47 +0000)]
Add missing return and test for volume check am: 58d268fedb

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

Change-Id: Ifd4380523879804d6f0c679effaf8e893ef9bf0c

2 years agoAdd missing return and test for volume check
Ted Wang [Wed, 22 Sep 2021 07:53:22 +0000 (15:53 +0800)]
Add missing return and test for volume check

feature: #stability
Bug: 167648114
Test: atest net_test_avrcp
Change-Id: I6dce4c7afb78a93dca8ba7fcbd02aa5350f18c1a
Merged-In: I6dce4c7afb78a93dca8ba7fcbd02aa5350f18c1a

2 years agoEnsure proper hci le meta event length size
Chris Manton [Tue, 21 Sep 2021 21:55:36 +0000 (14:55 -0700)]
Ensure proper hci le meta event length size

Bug: 167759047
Test: gd/cert/run
Tag: #security
Ignore-AOSP-First: Security
Change-Id: I753b12ec123e28d94c6f362c28ff9f2774ec4445

2 years agoMerge "Update AVRCP default version to 1.5" into sc-qpr1-dev am: aa5cc0d58f
TreeHugger Robot [Tue, 21 Sep 2021 18:15:38 +0000 (18:15 +0000)]
Merge "Update AVRCP default version to 1.5" into sc-qpr1-dev am: aa5cc0d58f

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

Change-Id: I0e905a2e07d613d3accbab6dc86e5c41158fb513

2 years agoAvoiding sending set volume to volume level same as current volume level am: f1fb497a85
Ted Wang [Tue, 21 Sep 2021 18:14:59 +0000 (18:14 +0000)]
Avoiding sending set volume to volume level same as current volume level am: f1fb497a85

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

Change-Id: I2e4563510db9ea98582d7406b567314c172685f1

2 years agoMerge "Update AVRCP default version to 1.5" into sc-qpr1-dev
TreeHugger Robot [Tue, 21 Sep 2021 18:04:22 +0000 (18:04 +0000)]
Merge "Update AVRCP default version to 1.5" into sc-qpr1-dev

2 years agoAvoiding sending set volume to volume level same as current volume level
Ted Wang [Tue, 14 Sep 2021 03:39:28 +0000 (11:39 +0800)]
Avoiding sending set volume to volume level same as current volume level

feature: #stability
Bug: 167648114
Test: Manul
Change-Id: Ifc5e4bfff5c1d1749037fb19f74e2f9c4172bc42
Merged-In: Ifc5e4bfff5c1d1749037fb19f74e2f9c4172bc42

2 years agoUpdate AVRCP default version to 1.5
Ted Wang [Thu, 16 Sep 2021 02:34:20 +0000 (10:34 +0800)]
Update AVRCP default version to 1.5

Bug: 190553009
Bug: 190462248
Test: make; Check sdp record
Change-Id: I079edc35f7733f8dd63c4577b72be1320a3de499
Merged-In: I079edc35f7733f8dd63c4577b72be1320a3de499

2 years agoDeclare h4_packetizer_lib
Jeongik Cha [Tue, 31 Aug 2021 08:00:42 +0000 (17:00 +0900)]
Declare h4_packetizer_lib

Using include_dir in the other path causes modularity to weaken.
So declare the module instead of filegroup for h4 h4_packetizer_lib.

Bug: 195692688
Test: check bt feature in cf, and log
Change-Id: I71dfd93abefae88a5a0439e7204d7583e282aeba
Merged-In: I71dfd93abefae88a5a0439e7204d7583e282aeba

2 years agoAdd H4PacketizerSources filegroup
Jeongik Cha [Tue, 10 Aug 2021 15:12:33 +0000 (00:12 +0900)]
Add H4PacketizerSources filegroup

bt_vhci_forwarder in cuttlefish doesn't need to full implementation of
rootcanal, it needs only h4 packetizer implementation.

Bug: 195692688
Test: launch_cvd and then check bluetooth feature in cf.
Change-Id: I25aa5f1a2e815703de3beb59ffebf148309baec6
Merged-In: I25aa5f1a2e815703de3beb59ffebf148309baec6

2 years agoSeparate H4 packet parsing from data retrieval.
Erwin Jansen [Thu, 1 Jul 2021 08:13:15 +0000 (10:13 +0200)]
Separate H4 packet parsing from data retrieval.

We are in the process of migrating Rootcanal to support various
architectures as well as different data channels.

For this reason we separate the H4 packetizer into a packet parser and
a packetizer that reads/writes packets from a file descriptor.

This will make it possible to use the H4 protcol with different data
channels that are not based on file descriptors (Qemu/gRPC/Windows)

Bug: 180759795
Test: Run unit tests to validate the parser.
Change-Id: I3a8f24197fed953b86d228f0bc2e793249323a62
Merged-In: I3a8f24197fed953b86d228f0bc2e793249323a62

2 years agoMerge "GATT: Fix data length parameter" into sc-qpr1-dev am: 43cf5f2749
TreeHugger Robot [Thu, 9 Sep 2021 18:08:49 +0000 (18:08 +0000)]
Merge "GATT: Fix data length parameter" into sc-qpr1-dev am: 43cf5f2749

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

Change-Id: I2c592a2619f33bef3d317e1e7d4c7c13caf2cf89

2 years agoMerge "GATT: Fix data length parameter" into sc-qpr1-dev
TreeHugger Robot [Thu, 9 Sep 2021 17:50:22 +0000 (17:50 +0000)]
Merge "GATT: Fix data length parameter" into sc-qpr1-dev

2 years agoGATT: Fix data length parameter
Hansong Zhang [Wed, 8 Sep 2021 17:15:34 +0000 (10:15 -0700)]
GATT: Fix data length parameter

Should also account for L2CAP header size (4)

Bug: 199009840
Tag: #feature
Test: NRF connect
Change-Id: I6b51a8ef046d81836a4ca4850d052b68e0f4dd46

2 years agoSecurity Fix: Crafted GATT request causes BT stack crash am: 1da56d1c81 am: 372e753179
Martin Brabham [Fri, 3 Sep 2021 19:03:12 +0000 (19:03 +0000)]
Security Fix: Crafted GATT request causes BT stack crash am: 1da56d1c81 am: 372e753179

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

Change-Id: I4577f2518fa2e2ad18d5dc3e1041991c4e27f3d5

2 years agoSecurity Fix: Crafted GATT request causes BT stack crash am: 1da56d1c81
Martin Brabham [Fri, 3 Sep 2021 18:50:35 +0000 (18:50 +0000)]
Security Fix: Crafted GATT request causes BT stack crash am: 1da56d1c81

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

Change-Id: Ifacad9537f67f1d6525203d8799479bf868db6de

2 years agoMerge "Fix nullptr in btif_hf_client" into sc-qpr1-dev am: da1eb4647c
TreeHugger Robot [Wed, 1 Sep 2021 17:20:06 +0000 (17:20 +0000)]
Merge "Fix nullptr in btif_hf_client" into sc-qpr1-dev am: da1eb4647c

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

Change-Id: I7ccfd37a0d2a7e6e6731796df1241223bca31d09

2 years agoMerge "Fix nullptr in btif_hf_client" into sc-qpr1-dev
TreeHugger Robot [Wed, 1 Sep 2021 17:06:32 +0000 (17:06 +0000)]
Merge "Fix nullptr in btif_hf_client" into sc-qpr1-dev

2 years agoSecurity Fix: Crafted GATT request causes BT stack crash
Martin Brabham [Mon, 30 Aug 2021 22:23:04 +0000 (15:23 -0700)]
Security Fix: Crafted GATT request causes BT stack crash

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

2 years agohci_metrics_logging: check command before ASSERT(complete_view.IsValid()) am: 9a2a42e4e6
Chen Chen [Thu, 26 Aug 2021 21:00:06 +0000 (21:00 +0000)]
hci_metrics_logging: check command before ASSERT(complete_view.IsValid()) am: 9a2a42e4e6

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

Change-Id: Ia57354655934bc0f7bb221f8d0514d8f2f1a7d6b

2 years agohci_metrics_logging: check command before ASSERT(complete_view.IsValid())
Chen Chen [Thu, 29 Jul 2021 23:02:37 +0000 (16:02 -0700)]
hci_metrics_logging: check command before ASSERT(complete_view.IsValid())

Bug: 193220499
Test: build
aosp/1780738
Change-Id: I1ef1ac1582d8d1c2800eb2c3e5e79763e0403714
Merged-In: I1ef1ac1582d8d1c2800eb2c3e5e79763e0403714
(cherry picked from commit fe82cc9434862623599b439855fb907641357f87)