OSDN Git Service
Sunny Kapdi [Fri, 25 May 2018 16:29:16 +0000 (09:29 -0700)]
A2DP Offload: Avoid Offload_start/stop from remote
When DUT is A2DP Source, and remote initiates start
we suspend it immediately. There is no need to do
Offload_start/stop in this case. Also, the offload
start/stop was coming out of sync here.
Bug:
80284000
Test: Manual
Change-Id: If54c28188e7432ebcba639cd2fbfe81536c2f2e6
Merged-In: If54c28188e7432ebcba639cd2fbfe81536c2f2e6
(cherry picked from commit
c2b928c8893ee376578769b64c5be332f03a9806)
Sunny Kapdi [Wed, 23 May 2018 22:14:35 +0000 (15:14 -0700)]
A2DP Offload: Don't crash on repeated endSession
AudioOffload endSession is called from multiple places.
Do not crash if session has already ended.
Also, added/enabled extra log messages to help debug similar issues.
Bug:
80148693
Test: Manual
Change-Id: I409c0146f9629cee6bdabf16e52e88201ee02267
Merged-In: I409c0146f9629cee6bdabf16e52e88201ee02267
(cherry picked from commit
7a2110d6660b080b0242fc385cce3c9748c49090)
TreeHugger Robot [Thu, 24 May 2018 20:25:22 +0000 (20:25 +0000)]
Merge "GATT: Fix GATT error response for execute write" into pi-dev
TreeHugger Robot [Thu, 24 May 2018 20:00:58 +0000 (20:00 +0000)]
Merge "AVRCP: Narrow the scope of the lock in Init and Cleanup" into pi-dev
Ajay Panicker [Thu, 24 May 2018 18:26:15 +0000 (11:26 -0700)]
AVRCP: Narrow the scope of the lock in Init and Cleanup
Bug:
80227904
Test: Disable Bluetooth while connected to a device
Change-Id: I6c77e38ebaa84e4a075ef4636d6b519d4ccfb8c5
Jakub Pawlowski [Thu, 24 May 2018 15:59:34 +0000 (08:59 -0700)]
Add PDU size checks in process_service_search_attr_rsp
Bug:
79884292
Change-Id: Icc02a6188f806f766aa8676804d74995afa08d25
Subramanian Srinivasan [Wed, 23 May 2018 02:35:48 +0000 (19:35 -0700)]
GATT: Fix GATT error response for execute write
Usecaes:
Execute GATT/SR/GAW/BI-09C
Expected Result:
Test case passes
Observed Result:
Unable to pass the test cases
Root Cause:
Incorrect error response sent by DUT if there is no pending write request
Fix:
Send GATT_INVALID_OFFSET error when no pending write request
Test: GATT/SR/GAW/BI-09C passes
Bug:
80168519
Change-Id: I74e723ab0e39ce04e21f929a16dffcd996d1d23e
(cherry picked from commit
b8a5b213a63def7c0a0d09d322603ae5a9abd435)
TreeHugger Robot [Thu, 24 May 2018 00:23:02 +0000 (00:23 +0000)]
Merge "Increase LE connection interval with bonded Hearing Aids" into pi-dev
Stanley Tng [Wed, 23 May 2018 01:15:42 +0000 (18:15 -0700)]
Increase LE connection interval with bonded Hearing Aids
When there are bonded Hearing Aids device, increase the minimum LE
Connection Interval to reduce the audio noises on the devices.
Bug:
80079923
Test: Manual test with RAT mouse and HA devices
Change-Id: I589bc574ef7ff3754a149e30fb3c0a685ce27823
(cherry picked from commit
111c7db93f613a09022d44639517a94be04ab300)
TreeHugger Robot [Wed, 23 May 2018 18:55:56 +0000 (18:55 +0000)]
Merge "GATT: Handle too short Error Response PDU" into pi-dev
TreeHugger Robot [Wed, 23 May 2018 18:30:09 +0000 (18:30 +0000)]
Merge "HFP: Ignore DISCONNECTED state in PhoneStateChange" into pi-dev
Jakub Pawlowski [Wed, 23 May 2018 17:19:53 +0000 (10:19 -0700)]
GATT: Handle too short Error Response PDU
Since the spec is not clear what to do in this case, use one of
reserved error codes as a failure reason, and pass it to upper layers.
Bug:
79591688
Change-Id: Ie6a53e9c8e4ceb8f1e5a75aee44baa5f4a798c4f
Andre Eisenbach [Wed, 23 May 2018 16:55:46 +0000 (16:55 +0000)]
Merge "AVRCP: Cancel all pending messages and prevent future messages after cleanup" into pi-dev
Jack He [Wed, 23 May 2018 00:35:57 +0000 (17:35 -0700)]
HFP: Ignore DISCONNECTED state in PhoneStateChange
* DISCONNECTED state is a transient state from Telecom service and will
always lead to IDLE state when the call is completely disconnected
* This state should be ignored as HFP specification does not handle
cases when a call is being disconnected
Bug:
78674822
Test: Receive incoming call and hangup
Change-Id: Icebdf9b5fdffad3e2b78645d4f0c69ec13b2604c
(cherry picked from commit
f720c9af076347a4ae2cf2fb4c4ed5b79fdb0049)
TreeHugger Robot [Wed, 23 May 2018 02:34:57 +0000 (02:34 +0000)]
Merge "Explicitly stop the stream when the A2DP session ends" into pi-dev
Pavlin Radoslavov [Wed, 23 May 2018 00:56:22 +0000 (17:56 -0700)]
Explicitly stop the stream when the A2DP session ends
Note: this needs to be done only for the A2DP HW offload scenario.
For the software data path, this will be done by the Audio HAL.
Bug:
80117050
Test: Manual
Change-Id: I4397d219d82d779706e946f0c7f833c1e93e91f4
Merged-In: I4397d219d82d779706e946f0c7f833c1e93e91f4
(cherry picked from commit
6d493bdc7b7cc9d38f6759d08734cce691c6ac45)
Ajay Panicker [Tue, 22 May 2018 21:42:16 +0000 (14:42 -0700)]
AVRCP: Cancel all pending messages and prevent future messages after cleanup
Bug:
79859133
Test: Regression test and repeatedly turn Bluetooth off and on
Change-Id: I1aa05cc5430dbda1d4bae6aa9543f655baed77b4
TreeHugger Robot [Tue, 22 May 2018 22:41:10 +0000 (22:41 +0000)]
Merge "HFP: Set audio handle for active device during incoming call" into pi-dev
Joseph Pirozzo [Tue, 22 May 2018 21:39:57 +0000 (21:39 +0000)]
Merge "Support AVRCP Controller on JNI thread" into pi-dev
Jack He [Tue, 22 May 2018 00:09:29 +0000 (17:09 -0700)]
HFP: Set audio handle for active device during incoming call
* Set audio handle for active device during incoming call
* Change debug level logging to warning level when SCO is not allowed to
open or when RING command is not allowed to be sent
Bug:
77949569
Test: connect with HFP devices and receive incoming call
Change-Id: Ibc2caf740f94817ae725786e35e8592390167ce2
(cherry picked from commit
bad2898f07128b032e0bfa7a1b3e85fc832dfbef)
TreeHugger Robot [Tue, 22 May 2018 19:17:40 +0000 (19:17 +0000)]
Merge "Don't mix internal AVDTP state when connecting to two devices" into pi-dev
TreeHugger Robot [Tue, 22 May 2018 19:04:15 +0000 (19:04 +0000)]
Merge "Use the effective peer MTU when preparing the codec configuration" into pi-dev
Pavlin Radoslavov [Tue, 22 May 2018 09:03:20 +0000 (02:03 -0700)]
Use the effective peer MTU when preparing the codec configuration
Added new method A2dpCodecConfig::getEffectiveMtu() and use it
to obtain the effective MTU per peer per codec.
The effective peer MTU could be smaller than the one reported
by the peer (e.g., for interoperability reasons).
Bug:
77913350
Test: Manual
Change-Id: Idd5230681ac5856fd18dd33ac48723c6ea609e16
Merged-In: Idd5230681ac5856fd18dd33ac48723c6ea609e16
(cherry picked from commit
d57fcc86ed62f790e5fe1b0010b411016ea34f81)
Pavlin Radoslavov [Fri, 18 May 2018 03:38:44 +0000 (20:38 -0700)]
Don't mix internal AVDTP state when connecting to two devices
There is a race condition when connecting to two devices, and
the connection to one of the devices is not powered on.
Because of the race condition, the wrong tBTA_AV_LCB entry inside
bta_av_sig_chg() might be allocated for the connection to
the device that is powered on. As a result of that, when
the connection attempt to the powered off device times out,
we will use the wrong bta_handle to close the existing AVDTP connection to
the device that is connected.
Also:
- Add a new function BTA_AvObtainPeerChannelIndex() to select the
appropriate AvdtpCcb entry if there an outgoing connection request
while an incoming connection is received.
- Added/updated log messages to help debugging similar issues in the future
- Removed unnecessary SetActivePeer() call inside the BtifAv state
machine for A2DP Source to avoid additional internal/transient glitches
Test: Manual
Bug:
79697137
Change-Id: Ie55e3dcf6c6a15637ce3631f2828548a2423d881
Merged-In: Ie55e3dcf6c6a15637ce3631f2828548a2423d881
(cherry picked from commit
1e2cab39a42542f12862df1cd47bf6d90853138b)
Hemant Gupta [Tue, 22 May 2018 03:55:50 +0000 (09:25 +0530)]
GATT: Fix usage of 16 and 32 bit UUID's in Discover services by UUID
Fix improper usage of 16 and 32 bit UUID's in Disocever services by UUID
Fixes PTS test cases GATT/CL/GAD/BV-08-C and GATT/CL/GAR/BV-03-C.
Test: PTS test cases GATT/CL/GAD/BV-08-C and GATT/CL/GAR/BV-03-C passes
Bug:
80095184
Change-Id: Ia0a26bd20ee68c5c7db0bc00036634f6719f25e9
Jack He [Sun, 20 May 2018 03:05:02 +0000 (20:05 -0700)]
HFP: Return SDP status to HFP layer
* Fix an error introduced in change Ic0b4498dd623d0ea31b4513d6b7861cae390bc72
so that SDP status is sent up to the HFP BTA layer
* With SDP status correctly passed up, HFP BTA layer can correctly
determine when to continue SDP search for HSP
* When open connection to HFP or HSP devices, use a control block's
registered services instead of passing in opening services every time
from BTIF layer
* Do not use a control block that are in CONNECTING or DISCONNECTING
state
* Add a crash in btif_hf.cc:connect_int() to gurantee that no control
block is in connecting or disconnecting state when connect_int is
called as it should be guranteed by the btif queue configuration
Bug:
74234576
Test: connect to headset, make calls and hangup
Change-Id: I5e2bce8c2f0f51bd3fd3e85e82827c5fb5e92887
(cherry picked from commit
4bf260f2b71c15f091290b16f6c7948b21fa7c49)
TreeHugger Robot [Sat, 19 May 2018 00:08:21 +0000 (00:08 +0000)]
Merge "AVRCP: Route CType NOT_IMPLEMENTED as a response" into pi-dev
Myles Watson [Fri, 18 May 2018 18:31:33 +0000 (11:31 -0700)]
AVRCP: Route CType NOT_IMPLEMENTED as a response
Fixes:
79698590
Test: net_test_avrcp, Connect to the Anker MP140
Change-Id: Ie88dcea949ecb33bc3d76d86b07ab0396a21500d
(cherry picked from commit
f74cecf93e648e861363aa312bef08327f19a26a)
TreeHugger Robot [Thu, 17 May 2018 13:32:39 +0000 (13:32 +0000)]
Merge "Respond reject with INVALID_PARAMETER when register for invalid event ID" into pi-dev
TreeHugger Robot [Thu, 17 May 2018 13:32:20 +0000 (13:32 +0000)]
Merge "Add General Reject for invalid PDU ID" into pi-dev
TreeHugger Robot [Thu, 17 May 2018 13:31:13 +0000 (13:31 +0000)]
Merge "AVRCP: Verify SetBrowsedPlayer player ID" into pi-dev
TreeHugger Robot [Thu, 17 May 2018 13:30:21 +0000 (13:30 +0000)]
Merge "AVRCP: Respond UID Changed for invalid Get Item Attributes command" into pi-dev
Pavlin Radoslavov [Wed, 16 May 2018 02:21:03 +0000 (19:21 -0700)]
Don't update the MTU across multiple A2DP connections that are open
Remove function bta_av_chk_mtu() that updates the MTU to the smallest
value across all open A2DP connections, because that function is not needed.
Such MTU update is problematic for Multi-A2DP, because some codecs cannot
be initialized/used if the MTU is too small. E.g., for LDAC the
MTU value used for the codec initialization must be at least 679.
Bug:
79675742
Test: Manual - (1)Connect Bose QC35; (2)Connect Sony SRS-XB2; (3)Play music
Change-Id: I8048a1bf6df6d4d6291bf3570a95b5182af15b6a
Merged-In: I8048a1bf6df6d4d6291bf3570a95b5182af15b6a
(cherry picked from commit
1200c75df85ac3d4f49b91039334077ada60e0cb)
tedwang [Tue, 15 May 2018 14:21:39 +0000 (22:21 +0800)]
Add General Reject for invalid PDU ID
Add Avrcp Browse General Reject packet
Respond general reject when undefined AVRCP Browsing PDU ID sent from
remote.
Bug:
79376704
Test: run host native test net_test_btpackets
Change-Id: I8a44d8e3f0cc5fac89e23217726c76ede4aff916
TreeHugger Robot [Wed, 16 May 2018 01:34:58 +0000 (01:34 +0000)]
Merge "Print extra error code if LDAC encoder fails to initialize" into pi-dev
Pavlin Radoslavov [Tue, 15 May 2018 10:19:41 +0000 (03:19 -0700)]
Print extra error code if LDAC encoder fails to initialize
Also, add a missing CHECK() assert that the LDAC handle is valid.
Bug:
79675742
Test: Code compilation
Change-Id: I4bd51ed978eadc2aecc27d199e6f01bb31c9a631
Merged-In: I4bd51ed978eadc2aecc27d199e6f01bb31c9a631
(cherry picked from commit
d963d2b2827aa6f1638eaa87597f28bb9d7a88d4)
tedwang [Tue, 15 May 2018 07:25:11 +0000 (15:25 +0800)]
Respond reject with INVALID_PARAMETER when register for invalid event ID
It should respond reject with INVALID_PARAMETER instead of
INVALID_COMMAND while remote registering for an invalid event ID
Bug:
79377562
Test: PTS AVRCP/TG/NFY/BI-01-C
Change-Id: Ic006cb2f6584216f9457af5576dd2d39adaa3cf5
Hansong Zhang [Mon, 14 May 2018 18:29:20 +0000 (11:29 -0700)]
AVRCP: Respond UID Changed for invalid Get Item Attributes command
When we receive GetItenAttributes command with an invalid UidCounter
other than 0x0000, we should reply UID Changed (0x05)
Bug:
79270308
Test: PTS AVRCP/TG/MCN/CB/BI-05-C; unit test
Change-Id: I819991d083944de5a08b0cd4fd0fb33c63f0142a
(cherry picked from commit
335d6e62b0fe2d81375254c9c5114867d524fc19)
Hemant Gupta [Fri, 2 Mar 2018 04:59:25 +0000 (10:29 +0530)]
HID: Update state to disconnected in virtual unplug
Usecase:
1.Pair and connect DUT with Remote device
2.Disconnect Remote device from DUT (Settings menu)
3.Connect to Remote device from settings menu when Remote will not be
advertising.
4.With in 30 secs of connect command, delete the stored link key and then pair
and connect again to Remote device from settings menu
(when RD is advertising).
Expected Result:
Remote device should connect successfully.
Observed Result:
Remote device is shown in paired devices(settings menu)but not connected.
Root cause:
When virtual unplug happens device state is not cleared properly. So next
time when we are trying to connect its going to connected state.
Fix:
Update the current device state to BTHH_CONN_STATE_CONNECTING to
BTIF_HH_DEV_DISCONNECTED when virtual unplug happens.
Test: Issue is not seen after above steps
Fixes:
74082929
Change-Id: I8a325987ff5eb0a8e4f8708fc7c76b8a9ade6ccf
(cherry picked from commit
126397bc6e8ff19bd37b0bc4b9b5db978eecb773)
Hansong Zhang [Mon, 14 May 2018 23:48:58 +0000 (16:48 -0700)]
AVRCP: Verify SetBrowsedPlayer player ID
IUT should reject the invalid SetBrowsedPlayer command sent from PTS.
Bug:
79377126
Test: PTS AVRCP/TG/MPS/BI-02-C
Change-Id: I2afde442e3b3563f4a1a37e2914c9b16fe07e8fc
(cherry picked from commit
f54a72cd8dcfae62ccab5d0b03b50539dde5c520)
Joseph Pirozzo [Tue, 8 May 2018 03:44:23 +0000 (20:44 -0700)]
Support AVRCP Controller on JNI thread
Recent changes to threading of the BTA layer require that all JNI
callbacks are performed on the JNI thread. This change updates the APIs
to ensure that the data passed is thread safe.
Bug:
79145011
Test: Browse and Play music via AVRCP Controller.
Change-Id: I191658ea90c96bcf372e772119db6c31c9010230
Claire Treyz [Fri, 11 May 2018 15:13:28 +0000 (08:13 -0700)]
Use identity addr in BLE scan filter
For BT controllers with the ability to filter scans and resolve RPAs on
controller, when trying to filter for a Public ID type address the
filter must use the static identity address of the peer device instead
of the random pseudo address.
Bug:
78888800
Test: manually tested filtered scanning for BLE peer with RPA with a
device with both offloaded RPA resolution & controller filtering
supported. Tested on a device with no controller filtering, which has
no changes, as expected.
Change-Id: I1d92e219bdbc9ba2399eae637a1f4623d695a3f8
(cherry picked from commit
10704399e1cfbad3421c3272795952cad3ee2920)
TreeHugger Robot [Mon, 14 May 2018 19:39:15 +0000 (19:39 +0000)]
Merge "Check number of attributes before writing to a buffer" into pi-dev
Andre Eisenbach [Mon, 14 May 2018 19:38:34 +0000 (19:38 +0000)]
Merge "Add respond Reject with Invalid parameter for Unknown Capability ID" into pi-dev
Ajay Panicker [Mon, 14 May 2018 18:45:23 +0000 (11:45 -0700)]
Merge changes from topic "am-
deb20f2a-d7e9-4660-922e-
16ad46b80c7a" into oc-dev am:
28af3285c7 am:
7860023df0
am:
1817ac9854
Change-Id: I6b715a091134e48bc2c96d22134c66fc67b155c5
Ajay Panicker [Mon, 14 May 2018 18:41:20 +0000 (11:41 -0700)]
Merge changes from topic "am-
deb20f2a-d7e9-4660-922e-
16ad46b80c7a" into oc-dev am:
28af3285c7
am:
7860023df0
Change-Id: Id8004ef8b208731ba321e3abd1bb562a29f03548
Ajay Panicker [Mon, 14 May 2018 18:37:26 +0000 (11:37 -0700)]
Merge changes from topic "am-
deb20f2a-d7e9-4660-922e-
16ad46b80c7a" into oc-dev
am:
28af3285c7
Change-Id: I9bb0aa68376166994103a659d181e3f7f071c3b5
Ajay Panicker [Mon, 14 May 2018 18:27:44 +0000 (18:27 +0000)]
Merge changes from topic "am-
deb20f2a-d7e9-4660-922e-
16ad46b80c7a" into oc-dev
* changes:
[automerger] DO NOT MERGE: Check number of attributes before writing to a buffer am:
d28e985241 am:
e24f24f31b am:
703cd5a1eb am:
58304c3cf3 skipped:
ec6632f93a
[automerger] DO NOT MERGE: Check number of attributes before writing to a buffer am:
d28e985241 am:
e24f24f31b am:
703cd5a1eb am:
58304c3cf3
[automerger] DO NOT MERGE: Check number of attributes before writing to a buffer am:
d28e985241 am:
e24f24f31b am:
703cd5a1eb
[automerger] DO NOT MERGE: Check number of attributes before writing to a buffer am:
d28e985241 am:
e24f24f31b
[automerger] DO NOT MERGE: Check number of attributes before writing to a buffer am:
d28e985241
DO NOT MERGE: Check number of attributes before writing to a buffer
Ajay Panicker [Fri, 11 May 2018 19:03:07 +0000 (12:03 -0700)]
Check number of attributes before writing to a buffer
Bug:
73824150
Test: Compile
Change-Id: I2a28a503cd74758e707d1e591b55c278d2299f45
(cherry picked from commit
f6db54f071f6974e18b10bb0c2cfcf397cd4c980)
Ajay Panicker [Mon, 14 May 2018 18:19:40 +0000 (11:19 -0700)]
Merge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev am:
89c77dff32 am:
992d901683
am:
3c6d9aef37
Change-Id: I83ccedc2c4a6e36e66c0b398db8e2578e3c379a6
Ajay Panicker [Mon, 14 May 2018 18:15:08 +0000 (11:15 -0700)]
Merge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev am:
89c77dff32
am:
992d901683
Change-Id: I4822314170228bc6df8d3b60f7ee04ea4fa7c5c2
Ajay Panicker [Mon, 14 May 2018 18:11:06 +0000 (11:11 -0700)]
Merge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev
am:
89c77dff32
Change-Id: I50263727a1020e77133f92938f6ecf0770eef14f
Ajay Panicker [Mon, 14 May 2018 18:01:38 +0000 (18:01 +0000)]
Merge "Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ" into oc-dev
TreeHugger Robot [Fri, 11 May 2018 23:30:55 +0000 (23:30 +0000)]
Merge "Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into pi-dev
TreeHugger Robot [Fri, 11 May 2018 23:16:03 +0000 (23:16 +0000)]
Merge "Explicitly restart audio processing when switching active device" into pi-dev
Ajay Panicker [Fri, 11 May 2018 22:45:35 +0000 (15:45 -0700)]
[automerger skipped] Merge "DO NOT MERGE: Check number of attributes before writing to a buffer" into oc-dev am:
2f9f6adfed am:
aded757078
am:
4a6c4b0c64 -s ours
Change-Id: I979219abffdf2fa7e851dcc326931c1c25d219fa
Hansong Zhang [Fri, 11 May 2018 22:45:23 +0000 (15:45 -0700)]
[automerger skipped] Merge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into oc-dev am:
cf48e73715 am:
1fc8fe3b9f
am:
3e207131ab -s ours
Change-Id: Iea5616f8aa43080304bdc30dd1543f2c2930401b
Hansong Zhang [Fri, 11 May 2018 22:45:05 +0000 (15:45 -0700)]
[automerger skipped] [automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am:
9ca8320100 am:
e621790539 am:
26881fbd81 am:
90f604c087 skipped:
5ab83c7a00 am:
e719eb2c4f am:
f7ecdd2915
am:
9b5b26bc63 -s ours
Change-Id: Ie3d309838be405e0c800a235861a7862d99cf230
Ajay Panicker [Fri, 11 May 2018 22:41:24 +0000 (15:41 -0700)]
Merge "DO NOT MERGE: Check number of attributes before writing to a buffer" into oc-dev am:
2f9f6adfed
am:
aded757078
Change-Id: I4ec111d45f8e76aef0095dbf2051b4c3e1f43c5a
Hansong Zhang [Fri, 11 May 2018 22:41:03 +0000 (15:41 -0700)]
Merge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into oc-dev am:
cf48e73715
am:
1fc8fe3b9f
Change-Id: I4ed11e20c3815108510e9d84a6afeda583254613
Hansong Zhang [Fri, 11 May 2018 22:40:42 +0000 (15:40 -0700)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am:
9ca8320100 am:
e621790539 am:
26881fbd81 am:
90f604c087 skipped:
5ab83c7a00 am:
e719eb2c4f
am:
f7ecdd2915
Change-Id: Iaf1eada64bbf87ce545d4d0a975041b51bfb911e
Ajay Panicker [Fri, 11 May 2018 22:37:23 +0000 (15:37 -0700)]
Merge "DO NOT MERGE: Check number of attributes before writing to a buffer" into oc-dev
am:
2f9f6adfed
Change-Id: Ic6cfdf0368ff5b55a0cc0a4a41b006947d520cd4
Hansong Zhang [Fri, 11 May 2018 22:37:00 +0000 (15:37 -0700)]
Merge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into oc-dev
am:
cf48e73715
Change-Id: Ie3b83f993975a6ac532072c774a3ca6c0d0b5272
Hansong Zhang [Fri, 11 May 2018 22:36:38 +0000 (15:36 -0700)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am:
9ca8320100 am:
e621790539 am:
26881fbd81 am:
90f604c087 skipped:
5ab83c7a00
am:
e719eb2c4f
Change-Id: I4626e6077542b983e7b6c8ba40d58f462fc215bb
TreeHugger Robot [Fri, 11 May 2018 22:26:01 +0000 (22:26 +0000)]
Merge "DO NOT MERGE: Check number of attributes before writing to a buffer" into oc-dev
TreeHugger Robot [Fri, 11 May 2018 22:24:23 +0000 (22:24 +0000)]
Merge "DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE" into oc-dev
TreeHugger Robot [Fri, 11 May 2018 21:52:53 +0000 (21:52 +0000)]
Merge "HFP: Workaround for car kits that do not send AT+BAC command" into pi-dev
TreeHugger Robot [Fri, 11 May 2018 21:47:23 +0000 (21:47 +0000)]
Merge "Hearing Aid: Add dumpsys log for audio packet" into pi-dev
TreeHugger Robot [Fri, 11 May 2018 21:46:26 +0000 (21:46 +0000)]
Merge "bta: Only call get_acl_data_size_ble for LE" into pi-dev
TreeHugger Robot [Fri, 11 May 2018 21:46:23 +0000 (21:46 +0000)]
Merge "BTM_BleClearBgConnDev: Return if there is no BLE" into pi-dev
TreeHugger Robot [Fri, 11 May 2018 21:46:20 +0000 (21:46 +0000)]
Merge "Return early if vendor-specific command fails" into pi-dev
Pavlin Radoslavov [Thu, 10 May 2018 16:52:58 +0000 (09:52 -0700)]
Explicitly restart audio processing when switching active device
* Add internal APIs to restart A2DP session and use them
when switching the A2DP active device:
btif_a2dp_source_restart_session() and btif_a2dp_sink_restart_session() .
* Removed internal A2DP Source APIs that shouldn't be APIs
* Call immediately btif_a2dp_on_stopped() when processing
BTIF_AV_STOP_STREAM_REQ_EVT event to stop sooner the audio
datapath processing and report back to the Audio HAL call.
This eliminates the need for waiting for the BTA_AV_STOP_EVT
upcall event from the remote device.
* Added extra log information when processing events in the BtifAv
state machine.
Bug:
78360113
Test: Manual: streaming A2DP, change active device, change codec setup.
Change-Id: Icb356587af9cfaee7aea9f3f9bc95a0fe000fc52
Merged-In: Icb356587af9cfaee7aea9f3f9bc95a0fe000fc52
(cherry picked from commit
c7a5e6038a1c01de1a2219659f999e91003af598)
Hansong Zhang [Fri, 11 May 2018 18:36:29 +0000 (11:36 -0700)]
Add bound check for AVRC_EVT_APP_SETTING_CHANGE
Test: manual
Bug:
73782082
Change-Id: I4e384a2f8c0d8c4af03bd5865b2e907321419c86
Ajay Panicker [Fri, 11 May 2018 19:03:07 +0000 (12:03 -0700)]
DO NOT MERGE: Check number of attributes before writing to a buffer
Bug:
73824150
Test: Compile
Change-Id: I2a28a503cd74758e707d1e591b55c278d2299f45
Android Build Merger (Role) [Fri, 11 May 2018 18:58:10 +0000 (18:58 +0000)]
[automerger] DO NOT MERGE: Check number of attributes before writing to a buffer am:
d28e985241 am:
e24f24f31b am:
703cd5a1eb am:
58304c3cf3 skipped:
ec6632f93a
Change-Id: Id43b919238d9f5bf7b9621e1a492fcab41e77282
Android Build Merger (Role) [Fri, 11 May 2018 18:58:09 +0000 (18:58 +0000)]
[automerger] DO NOT MERGE: Check number of attributes before writing to a buffer am:
d28e985241 am:
e24f24f31b am:
703cd5a1eb am:
58304c3cf3
Change-Id: Ice70ef13544a1f93a9dafb71241141274b81a7f1
Android Build Merger (Role) [Fri, 11 May 2018 18:58:08 +0000 (18:58 +0000)]
[automerger] DO NOT MERGE: Check number of attributes before writing to a buffer am:
d28e985241 am:
e24f24f31b am:
703cd5a1eb
Change-Id: Id36e3e2c089f6302db698b844a7ed0042e5b8658
Android Build Merger (Role) [Fri, 11 May 2018 18:58:06 +0000 (18:58 +0000)]
[automerger] DO NOT MERGE: Check number of attributes before writing to a buffer am:
d28e985241 am:
e24f24f31b
Change-Id: I8df01c872458bbc8b4ab435855b6c76353c8dab7
Android Build Merger (Role) [Fri, 11 May 2018 18:58:05 +0000 (18:58 +0000)]
[automerger] DO NOT MERGE: Check number of attributes before writing to a buffer am:
d28e985241
Change-Id: Ic7688754333ee91513ef0fcd47594eb9e561b3dd
Ajay Panicker [Fri, 11 May 2018 18:47:31 +0000 (11:47 -0700)]
DO NOT MERGE: Check number of attributes before writing to a buffer
Bug:
73824150
Test: Compile
Change-Id: Ie38ba177d6599afe28b5c6684bd951a75fa8a805
Hansong Zhang [Fri, 11 May 2018 18:36:29 +0000 (11:36 -0700)]
DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE
Test: manual
Bug:
73782082
Change-Id: I4e384a2f8c0d8c4af03bd5865b2e907321419c86
Android Build Merger (Role) [Fri, 11 May 2018 18:41:13 +0000 (18:41 +0000)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am:
9ca8320100 am:
e621790539 am:
26881fbd81 am:
90f604c087 skipped:
5ab83c7a00
Change-Id: Ibcd75cd9298d3b3d03da14813514f662a141c66e
Android Build Merger (Role) [Fri, 11 May 2018 18:41:11 +0000 (18:41 +0000)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am:
9ca8320100 am:
e621790539 am:
26881fbd81 am:
90f604c087
Change-Id: I45890811e5ea93ef7b2e42380b68064831a58097
Android Build Merger (Role) [Fri, 11 May 2018 18:41:10 +0000 (18:41 +0000)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am:
9ca8320100 am:
e621790539 am:
26881fbd81
Change-Id: I3b58713fffba346fb96b93632755a41cf9f5a88e
Android Build Merger (Role) [Fri, 11 May 2018 18:41:08 +0000 (18:41 +0000)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am:
9ca8320100 am:
e621790539
Change-Id: I0f8c4399029939d01cdf9be1827e0957df8fcde6
Android Build Merger (Role) [Fri, 11 May 2018 18:41:06 +0000 (18:41 +0000)]
[automerger] DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE am:
9ca8320100
Change-Id: Ic53f90a5ce4767355afaeb0852053120f28df135
Hansong Zhang [Fri, 11 May 2018 18:40:44 +0000 (11:40 -0700)]
DO NOT MERGE AVRC: Add bound check for AVRC_EVT_APP_SETTING_CHANGE
Test: manual
Bug:
73782082
Change-Id: I4e384a2f8c0d8c4af03bd5865b2e907321419c86
Jack He [Tue, 1 May 2018 06:59:40 +0000 (23:59 -0700)]
HFP: Workaround for car kits that do not send AT+BAC command
* Some misbehaving HF devices (e.g. some Hyundai car kits) indicate
their support on Wide Band Speech and Codec Negotiation, but do not
send the required AT+BAC command during Service Level Connection
setup. However, such car kits still expect Fluoride to do codec
negotiation during SCO setup.
* This CL adds a workaround so that when HF indicates support for WBS
and codec negotiation, Fluoride will attempt codec negotiation even
though AT+BAC is never received.
* Store the SDP feature locally. If WBS is supported and no AT+BAC is
received, use the SDP features to set the suported codec.
Bug:
77883405
Test: make, connect SCO to and from Hyundai car kits
Change-Id: I2be6007022183cac5b9006f37089a587b4a67372
(cherry picked from commit
e42cf153f8cc9f2b80153aa3eb7c0be04f3c326f)
tedwang [Wed, 9 May 2018 06:28:04 +0000 (14:28 +0800)]
Add respond Reject with Invalid parameter for Unknown Capability ID
Add handle Get Capabilities with Unknown Capability ID and unit test
for this.
Bug:
79269978
Test: Run host native test net_test_avrcp
Change-Id: I2cb606bcb6462190354bb471577d9383e43649c1
Myles Watson [Thu, 3 May 2018 18:13:55 +0000 (11:13 -0700)]
bta: Only call get_acl_data_size_ble for LE
Pass 0xFFFF (max uint16_t) to GAP_ConnOpen, which will call
get_acl_data_size_ble() to correct the value, but only when the
connection type is LE.
Bug:
77495521
Bug:
76192234
Test: Start Bluetooth with a BT 3.0 chip (or a simulated one)
Change-Id: If46ea249081fc058faf09bcb5149f21d8baf7aa7
(cherry picked from commit
a11bb2dcc23304a2d211f8b5237a5f5bff325880)
Myles Watson [Fri, 4 May 2018 17:15:46 +0000 (10:15 -0700)]
BTM_BleClearBgConnDev: Return if there is no BLE
Bug:
77495521
Bug:
76192234
Test: Start Bluetooth with a BT 3.0 chip (or a simulated one)
Change-Id: I718b7532bbba6100dd51c0677a44d41a2db0ce26
(cherry picked from commit
17fe6e4e06f38e5d997d81f8dfccfa744fe384a6)
Myles Watson [Thu, 3 May 2018 18:15:50 +0000 (11:15 -0700)]
Return early if vendor-specific command fails
Add CHECK() statements to crash if the callback is passed the incorrect
opcode or if there are no parameters.
Bug:
76192234
Bug:
77495521
Test: Start Bluetooth with a BT 3.0 chip (or a simulated one)
Change-Id: Iddd9a8503b2cfd52b16fb1c59f40e108b478e7b6
(cherry picked from commit
aa10181425bc2fa3141d98f954abdb2b5aa641c9)
TreeHugger Robot [Thu, 10 May 2018 22:38:39 +0000 (22:38 +0000)]
Merge "A2DP: Add logging when A2DP fails to open" into pi-dev
TreeHugger Robot [Thu, 10 May 2018 22:10:49 +0000 (22:10 +0000)]
Merge "HearingAid RemoveDevice - don't crash when profile not enabled" into pi-dev
Hansong Zhang [Wed, 9 May 2018 21:39:56 +0000 (14:39 -0700)]
Hearing Aid: Add dumpsys log for audio packet
Add log for audio drops from audio HAL and buffer overflow
Add log for device capabilities and HiSyncId
Sample output:
Hearing Aid Manager:
<device1> connected
binaural right 0x...
Packet counts (enqueued/flushed) : 73557 / 773
Frame counts (enqueued/flushed) : 73557 / 773
<device2> connected
binaural left 0x...
Packet counts (enqueued/flushed) : 74172 / 886
Frame counts (enqueued/flushed) : 74172 / 886
Hearing Aid Audio HAL:
Counts (underflow) : 0
Bytes (underflow) : 0
Last update time ago in ms (underflow) : 0
Test: manual
Bug:
69623109
Change-Id: I5021b9214828b1846506638000f29af7343a3354
(cherry picked from commit
b596bb17140c7fc82c73c7db62308aa057cf9aee)
Jakub Pawlowski [Thu, 10 May 2018 13:42:43 +0000 (06:42 -0700)]
HearingAid RemoveDevice - don't crash when profile not enabled
Bug:
79468820
Test: Unbond non-hearing aid device when profile not enabled
Change-Id: I2a87f8725447045e7bc5b2a33facf1ce14b47c54
(cherry picked from commit
f7c7cd2120f9d407aab849fb553e57427bf3233e)
Ajay Panicker [Thu, 10 May 2018 19:39:32 +0000 (12:39 -0700)]
Use weak pointers for device.cc callbacks to prevent use after delete
Bug:
79400706
Test: Turn bluetooth off then on while connected to a device and playing
music
Change-Id: I2132bb01796a724fba6a36f4eca4f4795b919864
TreeHugger Robot [Wed, 9 May 2018 23:29:36 +0000 (23:29 +0000)]
Merge "Fix PTS: TC_GATT_SR_UNS_BI_01_C sends unsupported opcode" into pi-dev
Jack He [Wed, 9 May 2018 22:44:09 +0000 (15:44 -0700)]
A2DP: Add logging when A2DP fails to open
* Make sure we output a log line whenever A2DP start request returns a
failure state, namingly:
- A2DP_CTRL_ACK_FAILURE
- A2DP_CTRL_ACK_INCALL_FAILURE
- A2DP_CTRL_ACK_DISCONNECT_IN_PROGRESS
Bug:
74988740
Test: make, logging only change
Change-Id: I63280d6280bf9c3d3ee6c578c1be332f8a9a3be0
(cherry picked from commit
b67d5fc97c0a0db33173792b6781a0345ee75cf2)
Ajay Panicker [Fri, 13 Apr 2018 00:03:09 +0000 (17:03 -0700)]
Add bounds check to l2cble_process_sig_cmd L2CAP_CMD_DISC_REQ
Bug:
74121659
Test: Compiles
Change-Id: Idf58e7b25b41ae1bd43cdd51de424b18e03cc7e8