OSDN Git Service
Łukasz Rymanowski [Mon, 11 May 2020 14:30:33 +0000 (16:30 +0200)]
btif_storage: Add way to store GATT server supported features
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
Łukasz Rymanowski [Wed, 26 May 2021 09:02:38 +0000 (09:02 +0000)]
eatt: Fix crash on double disconnect
Bug:
159786353
Tag: #feature
Test: atest --host net_test_eatt
Sponsor: jpawlowski@
Bug:
191313013
Merged-In: Ie4872f1c51445df59f2f68b127454d5f4d4e9ad0
Change-Id: Ie4872f1c51445df59f2f68b127454d5f4d4e9ad0
Łukasz Rymanowski [Wed, 26 May 2021 09:01:21 +0000 (09:01 +0000)]
eatt: Fix logging
Bug:
159786353
Tag: #feature
Test: compile
Sponsor: jpawlowski@
Bug:
191313013
Merged-In: Ia07b894a37a648d2a8aec0539e6fb75000a2c999
Change-Id: Ia07b894a37a648d2a8aec0539e6fb75000a2c999
TreeHugger Robot [Fri, 2 Jul 2021 23:02:31 +0000 (23:02 +0000)]
Merge "Queue discovery and device inquiry while bonding" into sc-dev
Rahul Sabnis [Thu, 20 May 2021 04:08:18 +0000 (21:08 -0700)]
Queue discovery and device inquiry while bonding
Tag: #feature
Bug:
187165224
Test: Manual
Merged-In: I260c967de0f4656ee852a098a98c9ceb0e6dfbde
Change-Id: I260c967de0f4656ee852a098a98c9ceb0e6dfbde
Martin Brabham [Wed, 30 Jun 2021 19:08:02 +0000 (12:08 -0700)]
OOB: Return local adapter name in generated OOB Data
Bug:
192475074
Test: Manual, test app.
Tag: #feature
Change-Id: I5086cbe6c0d2ab3346a956e22df36725a9e93530
Merged-In: I5086cbe6c0d2ab3346a956e22df36725a9e93530
Sal Savage [Wed, 30 Jun 2021 15:34:03 +0000 (15:34 +0000)]
Merge "Configure newavrcp target to be "passive" when setting up AVCTP" into sc-dev
TreeHugger Robot [Tue, 29 Jun 2021 21:16:55 +0000 (21:16 +0000)]
Merge changes from topic "bluetooth_oob_api" into sc-dev
* 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
Martin Brabham [Tue, 29 Jun 2021 19:49:41 +0000 (12:49 -0700)]
OOB: Replace 'memcpy' with assignments
Fixes a lint warning
Bug:
178007935
Test: Compiles
Tag: #feature
Change-Id: Id5e0d41085f9415daadb261a01f99200cb8f90e0
Merged-In: Id5e0d41085f9415daadb261a01f99200cb8f90e0
Martin Brabham [Tue, 29 Jun 2021 00:07:10 +0000 (17:07 -0700)]
OOB: Cancel advertiser and replace
Bug:
192298941
Test: Manual, test app and nRF connect.
Tag: #feature
Change-Id: Ia9a538fea6ac58e1487523447b22396c0caead8b
Merged-In: Ia9a538fea6ac58e1487523447b22396c0caead8b
Martin Brabham [Thu, 20 May 2021 21:30:09 +0000 (14:30 -0700)]
OOB: Start advertising when OOB data is generated.
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
Martin Brabham [Fri, 25 Jun 2021 19:59:22 +0000 (12:59 -0700)]
OOB: Connector; Set name of remote from OOB data
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
Martin Brabham [Fri, 18 Jun 2021 00:06:12 +0000 (17:06 -0700)]
OOB: Store keys and data generated for local OOB use.
Bug:
190395922
Test: Manual, test app
Tag: #feature
Change-Id: Ib88abb866ce08b99c7fbf17ac9cfb85ee0f3441e
Merged-In: Ib88abb866ce08b99c7fbf17ac9cfb85ee0f3441e
Martin Brabham [Thu, 3 Jun 2021 19:07:27 +0000 (12:07 -0700)]
OOB: Utilize SMP state machine to generate the OOB data.
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
Martin Brabham [Thu, 13 May 2021 19:04:26 +0000 (12:04 -0700)]
OOB: Rework create bond out of band flow to not use btif_dm_cb_create_bond
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
Sal Savage [Tue, 29 Jun 2021 18:44:06 +0000 (11:44 -0700)]
Configure newavrcp target to be "passive" when setting up AVCTP
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
Chris Manton [Wed, 24 Mar 2021 16:11:26 +0000 (09:11 -0700)]
RESTRICT AUTOMERGE Security fix OOB read vuln stack/avrc/avrc_pars_tg
Bug:
168712382
Tag: #security
Test: gd/cert/run
Ignore-AOSP-First: Security
Change-Id: Iae823e45675d46d8ca037157e516cc2f94fadfab
Jakub Pawlowski [Thu, 10 Jun 2021 20:01:32 +0000 (22:01 +0200)]
Fix potential buffer overflow and uninitialized read in reassemble_and_dispatch_iso
Tag: #security
Test: compilation
Bug:
188673156
Change-Id: Id9f2acfde05da681c82adc25d602cc48a2bc5df9
Hansong Zhang [Fri, 25 Jun 2021 00:52:22 +0000 (00:52 +0000)]
SMP: Reject pairing if public_key.x match am:
9fbf77d1a8 am:
6dd3a7aa69 am:
351d594583 am:
cf11884e7c am:
fb9f699d79 am:
0398829473
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
15081352
Change-Id: Ica723c5c0020d152d386edc4a46f7602a90a512a
Hansong Zhang [Fri, 25 Jun 2021 00:51:55 +0000 (00:51 +0000)]
SMP: Reject pairing if public_key.x match am:
9fbf77d1a8 am:
6dd3a7aa69 am:
351d594583 am:
cf11884e7c am:
fb9f699d79 am:
03fbe41891
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
15081352
Change-Id: Ie04f037faaa325d91f288bcee0e43dd2286bc328
Hansong Zhang [Fri, 25 Jun 2021 00:39:20 +0000 (00:39 +0000)]
SMP: Reject pairing if public_key.x match am:
9fbf77d1a8 am:
6dd3a7aa69 am:
351d594583 am:
cf11884e7c am:
fb9f699d79
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
15081352
Change-Id: I722d373d4c77fd8094bfcd7abed678c89e8d226b
Hansong Zhang [Fri, 25 Jun 2021 00:39:18 +0000 (00:39 +0000)]
SMP: Reject pairing if public_key.x match am:
9fbf77d1a8 am:
6dd3a7aa69 am:
351d594583 am:
cf11884e7c am:
fb9f699d79
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
15081352
Change-Id: Ibfab96eaf95bdc3232777dd53a9f7ca7ac924f82
Hansong Zhang [Fri, 25 Jun 2021 00:26:04 +0000 (00:26 +0000)]
SMP: Reject pairing if public_key.x match am:
9fbf77d1a8 am:
6dd3a7aa69 am:
351d594583 am:
cf11884e7c
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
15081352
Change-Id: Ife13fd9bc5326d8ada38cb2f762a70ba79d35752
Hansong Zhang [Fri, 25 Jun 2021 00:03:34 +0000 (00:03 +0000)]
SMP: Reject pairing if public_key.x match am:
9fbf77d1a8 am:
6dd3a7aa69 am:
351d594583
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
15081352
Change-Id: I1905e2f230957e9d7423e0b3b03e5c008f9ca55c
Hansong Zhang [Thu, 24 Jun 2021 23:52:22 +0000 (23:52 +0000)]
SMP: Reject pairing if public_key.x match am:
9fbf77d1a8 am:
6dd3a7aa69
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
15081352
Change-Id: I10e4fd768a27480bc16939b99f631c574b3042a4
Hansong Zhang [Thu, 24 Jun 2021 23:39:06 +0000 (23:39 +0000)]
SMP: Reject pairing if public_key.x match am:
9fbf77d1a8
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
15081352
Change-Id: I72ba8e45859116cfbcde52cce89bebd7aeaf6289
TreeHugger Robot [Thu, 24 Jun 2021 22:20:25 +0000 (22:20 +0000)]
Merge "SMP: Reject pairing if public_key.x match" into sc-dev
Hansong Zhang [Mon, 7 Jun 2021 18:06:17 +0000 (11:06 -0700)]
SMP: Reject pairing if public_key.x match
Bug:
189329824
Test: POC
Test: pair an LE device
Change-Id: If6d8a72075f0cf657cadfab033cacffeb22868cb
Tag: #security
(cherry picked from commit
76e6abc3ba34443b7a8354f14b6daf872c380e75)
Hansong Zhang [Mon, 7 Jun 2021 18:06:17 +0000 (11:06 -0700)]
SMP: Reject pairing if public_key.x match
Bug:
189329824
Test: POC
Test: pair an LE device
Change-Id: If6d8a72075f0cf657cadfab033cacffeb22868cb
Tag: #security
Cheney Ni [Thu, 17 Jun 2021 10:17:40 +0000 (18:17 +0800)]
Remove UNUSED_ATTR from an used parameter
Bug:
185507179
Tag: #refactor
Test: TH
Change-Id: Ib09d6dd166160ec56d84d44ab9809e2c15c3fd71
Merged-In: Ib09d6dd166160ec56d84d44ab9809e2c15c3fd71
(cherry picked from commit
5d3158dbc851a3d3e694f12c5f99bd3a474c0f76)
Zyan Wu [Thu, 27 May 2021 06:36:36 +0000 (14:36 +0800)]
Fix: add DelayReport feature when enable AV api
We shall enable AV api with feature of DelayReport when the device
enables delay reporting in its properties.
We shall only send delay report when that feature is enabled for
AVDT
Bug:
189404280
Tag: #compatibility
Test: atest --host bluetooth_test_gd
Change-Id: I685eb2386514c98c2f27a8107cb01f5e2b178daf
Merged-In: I3b2a8dec4bb845e222e2efc239b1654da78f49cf
(cherry picked from commit
75f3ee8c35212225186c4dea05278e70492329d9)
Zyan Wu [Mon, 17 May 2021 09:20:52 +0000 (17:20 +0800)]
Feature: send delay report once configed
As accept device, sending delay report after setconfig rsp
is sent. Do it as a second action instead of in the
bta AV subsystem.
As init device, send delay report after setconfig rsp
is received and just before sending open req.
Add UT to test the state machine;
- As accept, it shall send delay report after it sends setconfig rsp
- As init, it shall send delay report after it receives setconfig rsp
and before it sends open req
Also, correct delay report confirm event shall be called back
To run the test, run atest [--host] net_test_stack_avdtp
Bug:
185507179
Bug:
188367563
Tag: #feature
Test: atest --host bluetooth_test_gd
Change-Id: I9c7e9203516a5f6780d0d1effd3e472cd29b996c
Merged-In: Id0cb5bfc62b3a9296564b0e9651b30027d677f85
(cherry picked from commit
4a18e2709c29a1f4d78570a7294d80fce7ec57a9)
Zyan Wu [Mon, 17 May 2021 07:04:16 +0000 (15:04 +0800)]
Fix: give an event for AVDT_DELAY_REPORT_CFM_EVT
AVDT_DELAY_REPORT_CFM_EVT is mistakenly mapped to 0 (BTA_AV)
event. This caused crash when delay report is supported and
delay report responses have been received.
Now creating a delay report confirm event so it can be handled
later in bta av system
Bug:
188367563
Tag: #feature
Test: atest --host bluetooth_test_gd
Change-Id: I41346787287f71152ed4f82b7185dd3795efd793
Merged-In: Icbe01569d90abd4a881489e013a111432cf53d01
(cherry picked from commit
bd3c49ed60e74672d6189971bb11505a3bda84e6)
TreeHugger Robot [Mon, 21 Jun 2021 22:49:39 +0000 (22:49 +0000)]
Merge "Fix HFP SLC failure due to devices not sending the AT+BIND command" into sc-dev
Sal Savage [Mon, 21 Jun 2021 22:14:21 +0000 (22:14 +0000)]
Merge changes If39d7f9c,I2c64c8b2 into sc-dev
* changes:
Make transaction labels per device
PlayItem should go out the control channel
Rahul Sabnis [Thu, 20 May 2021 22:10:11 +0000 (15:10 -0700)]
Fix HFP SLC failure due to devices not sending the AT+BIND command
Tag: #feature
Bug:
187174892
Test: Manual
Ignore-AOSP-First: Resolving merge conflict
Change-Id: I7bb95d30005ddd99a0b272df66f43097f45ab707
Sal Savage [Fri, 30 Apr 2021 20:26:27 +0000 (13:26 -0700)]
Make transaction labels per device
Prior to this change, transaction labels (used for AVCTP commands) were
managed in a central location and shared between all devices. Only 16
labels were ever available for us before we "ran out" and stopped
sending requests. While this barely works for one device, this doesn't
work with multi-AVRCP situations.
This change moves transaction label management to the device struct such
that each device has its own set of transaction labels separate from
others. All transaction label functions were changed to be a function of
the device. Initialization of devices and labels was consolidated too.
Tag: #stability
Bug:
186240222
Test: atest BluetoothInstrumentationTests
Change-Id: If39d7f9ceb27469b9248927fbf5c92ab897b1e9e
Merged-In: If39d7f9ceb27469b9248927fbf5c92ab897b1e9e
Sal Savage [Wed, 28 Apr 2021 22:17:29 +0000 (15:17 -0700)]
PlayItem should go out the control channel
According to the AVRCP specification, section 4.5, the PlayItem command
should go out the control channel and not the browse channel.
Tag: #stability
Bug:
184712907
Test: atest BluetoothInstrumentationTests
Change-Id: I2c64c8b2f4aa0ad3c0d0cd577969d27157b4af95
Merged-In: I2c64c8b2f4aa0ad3c0d0cd577969d27157b4af95
Chienyuan [Wed, 16 Jun 2021 08:32:08 +0000 (16:32 +0800)]
HFP: Open SLC depended on value returned by +BRSF
Tag: #refactor
Bug:
186076485
Bug:
187494941
Test: manual
Ignore-AOSP-First: Patch merged in AOSP
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I749f13691e7d53089d03d9e2aaa8d50f45d1f2ed
Merged-In: I749f13691e7d53089d03d9e2aaa8d50f45d1f2ed
weichinweng [Fri, 11 Jun 2021 06:10:54 +0000 (14:10 +0800)]
stopwatch: improve stopwatch problems
* For command timeout case, will print the stopwatch log.
* For startup_timer_expired case, will print the stopwatch log.
* Add record initializationComplete function into stopwatch log.
* For the stopwatch can't correctly dump log if the array is not full
case, fix it.
bug:
190786398
Test: atest BluetoothInstrumentationTests & Manually
Tag: #stability
Change-Id: I8a66897ca46f593e18e231c43e8873ff0db08288
Merged-In: Ie59dbc0bd2f574761eed7aac695cbff07948d8e2
TreeHugger Robot [Thu, 17 Jun 2021 08:03:23 +0000 (08:03 +0000)]
Merge "libunwindstack links libdexfile_support statically now." into sc-dev
Martin Brabham [Wed, 19 May 2021 04:29:53 +0000 (21:29 -0700)]
IRK: Set IRK to resolving list
Bug:
178234318
Test: Manual
Tag: #feature
Change-Id: Id0843471a009e6ed51874547b570929fd37e4705
TreeHugger Robot [Thu, 3 Jun 2021 16:22:09 +0000 (16:22 +0000)]
Merge "A2DP: Restrict MTU while using SBC middle quality" into sc-dev
Chris Manton [Wed, 2 Jun 2021 16:05:27 +0000 (16:05 +0000)]
Revert "Always unset def L2CAP_CBB_DEFAULT_DATA_RATE_BUFF_QUOTA"
This reverts commit
7289f638b11b396b243071ec27f58d54c9f1feae.
Reason for revert: Allow override
Bug:
189941410
Test: gd/cert/run
Tag: #refactor
Ignore-AOSP-First: cherry-pick
Change-Id: I86343313bf70057cb776b60fb2b5668045f83332
TreeHugger Robot [Wed, 2 Jun 2021 17:58:30 +0000 (17:58 +0000)]
Merge "BluetoothAudioHAL: Wait for A2DP not playing if receiving A2dpSuspended=true" into sc-dev
TreeHugger Robot [Wed, 2 Jun 2021 17:56:10 +0000 (17:56 +0000)]
Merge "Allow for multiple link and accept signalling timers to allow for multiple simultaneous incoming A2DP connections" into sc-dev
TreeHugger Robot [Wed, 2 Jun 2021 17:55:59 +0000 (17:55 +0000)]
Merge "Ensure we do not send A2DP data to non-active stream devices" into sc-dev
Rahul Sabnis [Tue, 11 May 2021 04:32:35 +0000 (21:32 -0700)]
Allow for multiple link and accept signalling timers to allow for
multiple simultaneous incoming A2DP connections
Tag: #feature
Bug:
187236067
Test: Manual
Merged-In: I7df47540ae13c0a33154b2aa65de8b0313d117bc
Change-Id: I7df47540ae13c0a33154b2aa65de8b0313d117bc
Rahul Sabnis [Tue, 18 May 2021 22:16:03 +0000 (15:16 -0700)]
Ensure we do not send A2DP data to non-active stream devices
Tag: #feature
Bug:
187157598
Test: Manual
Merged-In: I4a251f74439e1c74fe6178bafd306c75cd6847e0
Change-Id: I4a251f74439e1c74fe6178bafd306c75cd6847e0
Martin Stjernholm [Fri, 14 May 2021 17:24:31 +0000 (18:24 +0100)]
libunwindstack links libdexfile_support statically now.
Cherry-picked from https://r.android.com/
1707629.
Test: Boot
Test: mmm system/bt/gd
Test: gd/cert/run --rhost --clean
(some errors and hangs eventually, but no difference from before this
CL: http://go/paste/
5965220192190464)
Tag: #refactor
Bug:
143978909
Change-Id: Ib6558a0e9e35bfb4d33cb890d64693d6c80d85df
Merged-In: Ib6558a0e9e35bfb4d33cb890d64693d6c80d85df
Cheney Ni [Thu, 20 May 2021 10:58:48 +0000 (18:58 +0800)]
A2DP: Restrict MTU while using SBC middle quality
When SBC headsets report middle quality bitpool under a larger MTU, we
reduce the packet size to prevent the hardware encoder from putting too
many frames in one packet.
Bug:
188020925
Tag: #compatibility
Test: A2DP playback with SBC manually
Change-Id: I164c0c1fe37d6852718889e2946207471b26e5bd
Merged-In: I164c0c1fe37d6852718889e2946207471b26e5bd
(cherry picked from commit
805ca9ca336db6ac6df1ba74dbc74cb7868bf4d6)
TreeHugger Robot [Tue, 25 May 2021 22:16:51 +0000 (22:16 +0000)]
Merge "gd: Start vendor specific event manager when hci enable" into sc-dev
Chienyuan [Mon, 17 May 2021 08:17:40 +0000 (16:17 +0800)]
gd: Start vendor specific event manager when hci enable
Tag: #gd-refactor
Bug:
188118934
Test: gd/cert/run
Test: bluetooth_test_gd
Ignore-AOSP-First: Patch merged in AOSP
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I24d5e62344376ff63c8d17d58ced41762542c01b
Merged-In: I24d5e62344376ff63c8d17d58ced41762542c01b
Jack He [Fri, 21 May 2021 00:59:45 +0000 (17:59 -0700)]
Call wakelock callouts in JNI thread
Bug:
180790614
Fixes:
180790614
Test: start up Bluetooth
Tag: #refactor
Ignore-AOSP-First: cherry-pick
Change-Id: If1eee9532f20e264ff33a0e2adbf1b06dc3900e6
Merged-In: If1eee9532f20e264ff33a0e2adbf1b06dc3900e6
(cherry picked from commit
d773a9d418d2a8ee4fa983ca437efc6f368ac59a)
Jack He [Thu, 20 May 2021 05:41:14 +0000 (22:41 -0700)]
GD: Fix DeviceTest
* Do not assert on crash message
Bug:
188742121
Fixes:
188742121
Test: atest bluetooth_test_gd
Tag: #gd-refactor
Ignore-AOSP-First: Cherry-pick to release branch
Change-Id: I859edea07e083912ca09cc0303551fca35b9c097
(cherry picked from commit
72923eecd892570560c96223c504b5cfdf24fa79)
Jack He [Thu, 20 May 2021 05:14:19 +0000 (22:14 -0700)]
GD: Hold wakelock when starting and stopping the Bluetooth stack
* Hold wakelock when starting and stopping the Bluetooth stack so that it
can meet the timing requirement
* Rename GD wakelock to bluetooth_gd_timer for easier debugging
* Use native HAL based wakelock in GD
Bug:
184608842
Tag: #gd-refactor
Test: atest bluetooth_test_gd_unit
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Ignore-AOSP-First: Cherry-pick to release branch
Change-Id: Ib4679782061b82a70a240a2a614f7ee587e5c7c7
(cherry picked from commit
3ea82dbbb74beeb94a2ae15c6d9d1748a14c43ae)
Jack He [Wed, 19 May 2021 07:56:56 +0000 (00:56 -0700)]
GD: Implement Wakelock Manager and Native Wakelock
* Implement Wakelock Manager to support both OS callout-based wakelocks
and Android native wakelocks
* Use ISystemSuspend for Android native wakelocks
* Allow runtime override of wakelock callout to bypass the native
implementation
* Implement unit test for both native and OS callout wakelocks
Bug:
184608842
Bug:
188614066
Tag: #gd-refactor
Test: atest bluetooth_test_gd_unit
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Ignore-AOSP-First: Cherry-pick to release branch
Change-Id: I428e06e6a48a423bb6912e3449895e030e0dd073
(cherry picked from commit
0c31c590f50c37cfab45d629ddac91a51cdc523c)
TreeHugger Robot [Thu, 20 May 2021 15:24:31 +0000 (15:24 +0000)]
Merge "AOSP: Correct device type for dual mode peers" into sc-dev
Animesh Fatehpuria [Fri, 5 Mar 2021 11:32:10 +0000 (19:32 +0800)]
AOSP: Correct device type for dual mode peers
Currently, device type determination logic is fuzzy in the stack.
Dual mode devices are incorrectly classified as BR/EDR. We should
reference the remote capabilities and set the peer device type to
DUAL if BR/EDR and BLE transports are both supported.
Bug:
186097823
Tag: #stability
Test: cert/run, manual device type testing (with and without gd)
Merged-In: Ibe4e02eea2a715be01457f8e48abfb846f25c81a
Change-Id: Ibe4e02eea2a715be01457f8e48abfb846f25c81a
Cheney Ni [Thu, 29 Apr 2021 12:07:07 +0000 (20:07 +0800)]
BluetoothAudioHAL: Wait for A2DP not playing if receiving A2dpSuspended=true
The Upper-layer may use A2dpSuspended=true parameter to inform of
stopping the A2DP playback and dropping streaming data before
establishing the SCO connection, and we have to wait for AVDTP
non-started. This helps prevent a race condition between A2DP and SCO.
Bug:
186613660
Bug:
185191975
Tag: #compatibility
Test: Making a MO / MT call manually while A2DP playing
Change-Id: I17ab9ef97b06928d092ae4bdaa697d97a5732bb0
Merged-In: I17ab9ef97b06928d092ae4bdaa697d97a5732bb0
(cherry picked from commit
d93ce78e87d7e09c3410616765106f8a52262a64)
Rahul Sabnis [Wed, 19 May 2021 16:00:11 +0000 (16:00 +0000)]
Merge "IBluetooth#setRemoteAlias now returns an int to support error codes for failure cases" into sc-dev
Rahul Sabnis [Wed, 5 May 2021 21:13:36 +0000 (14:13 -0700)]
IBluetooth#setRemoteAlias now returns an int to support error codes for
failure cases
Tag: #feature
Bug:
184714087
Test: atest BluetoothDeviceTest#test_setAlias_getAlias
Ignore-AOSP-First: Depends on CDM changes not available in AOSP
Change-Id: Ife331c56fa6ed950027ef06038b943a5ec8bd447
Chienyuan [Fri, 14 May 2021 20:46:41 +0000 (20:46 +0000)]
gd: Start vendor specific event manager when acl enable am:
3e4a61a5b4 am:
013ee5ebf4 am:
860e1b9201
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1708129
Change-Id: I8254162c61f5ad349c298dde35e3a8b89f7ea4ad
Chienyuan [Fri, 14 May 2021 20:26:51 +0000 (20:26 +0000)]
gd: Start vendor specific event manager when acl enable am:
3e4a61a5b4 am:
013ee5ebf4
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1708129
Change-Id: I1f848866b4b283dced81e1c3cb5bc3c4a898bd51
Chienyuan [Fri, 14 May 2021 20:06:14 +0000 (20:06 +0000)]
gd: Start vendor specific event manager when acl enable am:
3e4a61a5b4
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1708129
Change-Id: I3163a83938ee35bc8c8364a44bea4716c0e4abd0
TreeHugger Robot [Fri, 14 May 2021 17:52:34 +0000 (17:52 +0000)]
[automerger skipped] Merge "RESTRICT AUTOMERGE Contain avrc_ctrl_pars_vendor_cmd OOB write" into qt-qpr1-dev am:
454fdc7be9 -s ours am:
ebe70e97c9 am:
29bfdb02cf am:
29a4f97794 -s ours
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
14452688
Change-Id: If8a62b3de3cc883a4e392ca0748c70170462f12f
TreeHugger Robot [Fri, 14 May 2021 17:51:52 +0000 (17:51 +0000)]
[automerger skipped] Merge "RESTRICT AUTOMERGE Contain avrc_ctrl_pars_vendor_cmd OOB write" into qt-qpr1-dev am:
454fdc7be9 -s ours am:
ebe70e97c9 am:
e79aa24081 -s ours
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
14452688
Change-Id: I7b4ad94cac72fba2a82e4ed6a6f862ed9c3b73c9
TreeHugger Robot [Fri, 14 May 2021 17:27:15 +0000 (17:27 +0000)]
[automerger skipped] Merge "RESTRICT AUTOMERGE Contain avrc_ctrl_pars_vendor_cmd OOB write" into qt-qpr1-dev am:
454fdc7be9 -s ours am:
ebe70e97c9 am:
29bfdb02cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
14452688
Change-Id: Ie93c3abd997a51e5185168e33a488fd30a708e7a
TreeHugger Robot [Fri, 14 May 2021 17:19:10 +0000 (17:19 +0000)]
[automerger skipped] Merge "RESTRICT AUTOMERGE Contain avrc_ctrl_pars_vendor_cmd OOB write" into qt-qpr1-dev am:
454fdc7be9 -s ours am:
ebe70e97c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
14452688
Change-Id: I42e6498e063827819f158e7c30ce8095274b6401
TreeHugger Robot [Fri, 14 May 2021 17:15:29 +0000 (17:15 +0000)]
[automerger skipped] Merge "RESTRICT AUTOMERGE Contain avrc_ctrl_pars_vendor_cmd OOB write" into qt-qpr1-dev am:
454fdc7be9 -s ours am:
ebe70e97c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
14452688
Change-Id: Id427688c7da708588ef9d886b121895289ef71b1
Richard Smith [Mon, 22 Feb 2021 13:44:16 +0000 (13:44 +0000)]
Fix out of bound read in read_reports_cb.
Bug:
180939433
Change-Id: Ibd713c08cb18deb7b56347a842749d9aa85fba32
Chienyuan [Fri, 14 May 2021 07:59:06 +0000 (15:59 +0800)]
gd: Start vendor specific event manager when acl enable
Tag: #gd-refactor
Bug:
188118934
Test: gd/cert/run
Test: bluetooth_test_gd
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I6ff766d231fa5258ff10ec8ee62722f0a733eb83
Treehugger Robot [Fri, 14 May 2021 06:26:57 +0000 (06:26 +0000)]
Merge "Format time when print stopwatch log." am:
46c41b02e5 am:
afea20d8ef am:
0659d7c2ac
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1704985
Change-Id: I279f89ca8559b6143ae7897e9b2e25f972a8809d
Treehugger Robot [Fri, 14 May 2021 06:10:37 +0000 (06:10 +0000)]
Merge "Format time when print stopwatch log." am:
46c41b02e5 am:
afea20d8ef
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1704985
Change-Id: Ie50672d1f6365f69089ad99587c0dfcb21133648
Treehugger Robot [Fri, 14 May 2021 05:55:16 +0000 (05:55 +0000)]
Merge "Format time when print stopwatch log." am:
46c41b02e5
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1704985
Change-Id: I13398f26b1958fd006b24445496f78106150d0be
Treehugger Robot [Fri, 14 May 2021 05:34:26 +0000 (05:34 +0000)]
Merge "Format time when print stopwatch log."
weichinweng [Wed, 12 May 2021 05:44:15 +0000 (13:44 +0800)]
Format time when print stopwatch log.
Bug:
187902405
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: I26f7a334218b303a46693c5dbfa309725b9e8d7b
Chris Manton [Fri, 14 May 2021 00:16:26 +0000 (00:16 +0000)]
gatt: Properly gatt register/deregister am:
7672851def am:
02848cc128 am:
81e9c91090
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1707207
Change-Id: Iaede50fe1df56f8af37d3108df696a16b014a9c6
Chris Manton [Thu, 13 May 2021 23:59:39 +0000 (23:59 +0000)]
gatt: Properly gatt register/deregister am:
7672851def am:
02848cc128
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1707207
Change-Id: Ib2d33f9cd877641d86945805bda17d35aa704961
Chris Manton [Thu, 13 May 2021 23:44:17 +0000 (23:44 +0000)]
gatt: Properly gatt register/deregister am:
7672851def
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1707207
Change-Id: I49d1eb7052f3c8f5b5ddf4a7d6c0febe6c010563
Chris Manton [Thu, 13 May 2021 23:23:53 +0000 (23:23 +0000)]
gatt: Properly init/free gatt layer am:
3d058ff5e3 am:
d0c7dcfe76 am:
327f969fa6
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1707206
Change-Id: Ia4ad93f88ab86207a4a8ba75c8bfbfc124f7878d
Chris Manton [Thu, 13 May 2021 23:23:51 +0000 (23:23 +0000)]
Streamline bta_gattc_op_cmpl am:
c2a4232547 am:
e22576be64 am:
e4bf83024b
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1700656
Change-Id: Ie365635c5ad02111e9e2c3d15bb91e8d2127ae83
Chris Manton [Thu, 13 May 2021 23:23:34 +0000 (23:23 +0000)]
Decl-def event bta/gatt/bta_gattc_act:bta_gattc_close am:
13a538260b am:
067fc4560d am:
cdb4c69a09
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1700655
Change-Id: Icd5b0cff9ba205bb4a1d79bc610de33331394d59
Chris Manton [Thu, 13 May 2021 23:05:25 +0000 (23:05 +0000)]
gatt: Properly init/free gatt layer am:
3d058ff5e3 am:
d0c7dcfe76
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1707206
Change-Id: I7a57629347466cf8b42e87231dbd452af3dc20f7
Chris Manton [Thu, 13 May 2021 23:05:24 +0000 (23:05 +0000)]
Streamline bta_gattc_op_cmpl am:
c2a4232547 am:
e22576be64
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1700656
Change-Id: I99f97cd74caf0e620116dc3ef8704def2fc7c63c
Chris Manton [Thu, 13 May 2021 23:05:07 +0000 (23:05 +0000)]
Decl-def event bta/gatt/bta_gattc_act:bta_gattc_close am:
13a538260b am:
067fc4560d
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1700655
Change-Id: I652bd509a2d373990d9ad6674a2d546f6a607e9f
Chris Manton [Thu, 13 May 2021 22:51:04 +0000 (22:51 +0000)]
gatt: Properly init/free gatt layer am:
3d058ff5e3
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1707206
Change-Id: If0e97d4de7563a0c4c7cd0dd1c98c1fbe4a606b0
Chris Manton [Thu, 13 May 2021 22:51:01 +0000 (22:51 +0000)]
Streamline bta_gattc_op_cmpl am:
c2a4232547
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1700656
Change-Id: Ie6e3a2205c8747232722a49302324bfdc76ed43f
Chris Manton [Thu, 13 May 2021 22:49:55 +0000 (22:49 +0000)]
Decl-def event bta/gatt/bta_gattc_act:bta_gattc_close am:
13a538260b
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1700655
Change-Id: I1ebfb0a6afc250ad1e7c1bbb52cc535ed255dae1
Chris Manton [Thu, 13 May 2021 19:08:29 +0000 (12:08 -0700)]
gatt: Properly gatt register/deregister
Bug:
187827452
Test: gd/cert/run
Tag: #refactor
Change-Id: I63eba9149c2695e42c69bfdb19fd5531305b5b8d
Chris Manton [Thu, 13 May 2021 19:07:34 +0000 (12:07 -0700)]
gatt: Properly init/free gatt layer
Bug:
188073123
Test: gd/cert/run
Tag: #refactor
Change-Id: Ieb7356322153588dbc1ce3d2030222c5bb2954d2
Chris Manton [Sat, 8 May 2021 23:56:09 +0000 (16:56 -0700)]
Streamline bta_gattc_op_cmpl
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I940c842ed23be01dc20cbfe7c05d194dc7df19c2
George Burgess IV [Thu, 13 May 2021 19:20:24 +0000 (12:20 -0700)]
avdt_scb: fix dereferences of NULL
A recent change to this code added `int` in this for loop's first clause
(good, since that's way more common than declaring `i` outside of the
loop). Unfortunately, this caused the `*p_err_code = 0` to be
interpreted as "create a new int* called p_err_code and set it to 0,"
rather than "set the value pointed to by p_err_code to 0."
Caught by clang's static analyzer:
> system/bt/stack/avdt/avdt_scb.cc:936:19: warning: Dereference of null
pointer (loaded from variable 'p_err_code')
[clang-analyzer-core.NullDereference]>
system/bt/stack/avdt/avdt_scb.cc:941:19: warning: Dereference of null
pointer (loaded from variable 'p_err_code')
[clang-analyzer-core.NullDereference] >
system/bt/stack/avdt/avdt_scb.cc:946:19: warning: Dereference of null
pointer (loaded from variable 'p_err_code')
[clang-analyzer-core.NullDereference] >
system/bt/stack/avdt/avdt_scb.cc:955:23: warning: Dereference of null
pointer (loaded from variable 'p_err_code')
[clang-analyzer-core.NullDereference] >
system/bt/stack/avdt/avdt_scb.cc:963:23: warning: Dereference of null
pointer (loaded from variable 'p_err_code')
[clang-analyzer-core.NullDereference]
Bug:
180421437
Test: TreeHugger
Change-Id: I834032e22da0ed558c25355c9d1cf20c11c8c530
Chris Manton [Sat, 8 May 2021 23:48:04 +0000 (16:48 -0700)]
Decl-def event bta/gatt/bta_gattc_act:bta_gattc_close
Bug:
163134718
Test: gd/cert/run
Tag: #refactor
Change-Id: I90abbd76e89d1d395859eaa19555c65112f31987
Jakub Pawlowski [Thu, 13 May 2021 18:04:58 +0000 (18:04 +0000)]
Merge "Fix potential null dereferences in btif_rc.cc" into sc-dev
Chris Manton [Thu, 13 May 2021 17:48:25 +0000 (17:48 +0000)]
Remove useless #def bta/hh/bta_hh_int::BTA_HH_MAX_RPT_CHARS am:
c8b751d164 am:
cae8c9c79a am:
e91aea7f06
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1700654
Change-Id: I5a524c181b07ecf05ab74faa75d8d8885b1bccca
Chris Manton [Thu, 13 May 2021 17:23:45 +0000 (17:23 +0000)]
Remove useless #def bta/hh/bta_hh_int::BTA_HH_MAX_RPT_CHARS am:
c8b751d164 am:
cae8c9c79a
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1700654
Change-Id: I8cb7e2a62184df48b3494ff88329b2cb2821a308
Chris Manton [Thu, 13 May 2021 17:00:36 +0000 (17:00 +0000)]
Remove useless #def bta/hh/bta_hh_int::BTA_HH_MAX_RPT_CHARS am:
c8b751d164
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1700654
Change-Id: I9e4ba18aa80bd0f0c1d112dcc91e33bfbf2a0657
Jakub Pawlowski [Thu, 13 May 2021 16:10:08 +0000 (18:10 +0200)]
Fix potential null dereferences in btif_rc.cc
Test: compilation
Bug:
182163258
Change-Id: I2450962736f067db28d4b1657ae632f77ada6afe
Treehugger Robot [Thu, 13 May 2021 16:01:10 +0000 (16:01 +0000)]
Merge "CTKD: Fix role change bug on legacy BT stack" am:
672131f257 am:
85fc6e6012 am:
dfb71cfc7e
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1697087
Change-Id: I106656f327b0cc1ae5b0c997f8096bf4cfd7c5e2