OSDN Git Service
Andre Eisenbach [Thu, 31 May 2018 20:41:00 +0000 (20:41 +0000)]
Merge "AVRCP: Reject invalid PlayItem and SetAddressedPlayer command" into pi-dev
Hansong Zhang [Wed, 30 May 2018 21:16:23 +0000 (14:16 -0700)]
AVRCP: Reject invalid PlayItem and SetAddressedPlayer command
* Use CType REJECT to reject invalid PlayItem command
* Reject SetAddressPlayer command as it is not implemented
Bug:
80481276
Bug:
80483247
Test: PTS AVRCP/TG/MCN/NP/BI-01-C
Change-Id: I837f6d2661e94e09afaa72a9c0c77d5c1ffe9e98
TreeHugger Robot [Thu, 31 May 2018 17:42:18 +0000 (17:42 +0000)]
Merge "SMP: Check p_cb->role in smp_br_state_machine_event" into pi-dev
TreeHugger Robot [Wed, 30 May 2018 03:27:24 +0000 (03:27 +0000)]
Merge "Send addressed and available player change for PTS test" into pi-dev
TreeHugger Robot [Wed, 30 May 2018 02:47:14 +0000 (02:47 +0000)]
Merge changes I88886146,I1c076c7f into pi-dev
* changes:
LE Create Connection Complete - crash on Command Disallowed
Fix race condition in LE Create Connection Cancel handling
Hansong Zhang [Wed, 30 May 2018 00:38:39 +0000 (17:38 -0700)]
SMP: Check p_cb->role in smp_br_state_machine_event
Bug:
80145946
Test: manual
Change-Id: Ic83eaa4be868d5a345d80cd50a6915c0af719a53
tedwang [Fri, 18 May 2018 10:16:40 +0000 (18:16 +0800)]
Send addressed and available player change for PTS test
Implement HandleAddressPlayerUpdate() and HandAvailablePlayerUpdate()
for PTS test.
Bug:
79375787 79376305
Test: PTS Test AVRCPTG/MPS/BV-05-C AVRCP/TG/MPS/BV-07-C
Change-Id: I6b976af8bdd1afcc9799c50c8e558939cf7be187
tedwang [Wed, 16 May 2018 11:51:26 +0000 (19:51 +0800)]
Add respond track not selected interim when register notification
Respond interim with Identifier 0xFFFFFFFFFFFFFFFF register
notification for EVENT_TRACK_CHANGE for pts test
Bug:
79378129
Test: PTS AVRCP/TG/NFY/BV-04-C
Change-Id: Ia861bf4682e9daf9c7c3842df9f95381171da574
Jakub Pawlowski [Tue, 29 May 2018 22:28:15 +0000 (15:28 -0700)]
LE Create Connection Complete - crash on Command Disallowed
When LE Create Connection Complete is received with status "Command
Disallowed", we can't tell which state we should transition to. This
can be triggered only in case of rare race condition. Crash to recover.
This was introduced in
24adb37e4106bf8544c7729d34451fdf2777c4dc, when
generic handling of all errors to this event was added.
Bug:
77429706
Test: sl4a GattConnectTest
Change-Id: I888861461da296876d97e8784a3dc7c53130fb51
(cherry picked from commit
60a7c428a2533349f39bca50289046e7846c15a5)
Jakub Pawlowski [Tue, 29 May 2018 19:52:17 +0000 (12:52 -0700)]
Fix race condition in LE Create Connection Cancel handling
Message with description of the issue being fixed:
https://android-review.googlesource.com/c/platform/system/bt/+/646600#message-
4781dd6e3e74d8b11ef716bbf58edbc64645f18c
Bug:
77429706
Change-Id: I1c076c7f033fc3d1aaf47887ce691b6325721d85
(cherry picked from commit
0d1d8e09e2cd2b14b4daa2d342eb40ccd66e401c)
Ajay Panicker [Tue, 8 May 2018 23:34:04 +0000 (16:34 -0700)]
Send UID 0 for track changed if there is no media ID
Some carkits need the track changed UID to change even though we
explicitly report that UID's are refreshed on any now playing list
change. UID 0 is special since it represents that the song has changed
and forces an update.
Bug:
72824896
Test: Tested with Audi carkit where Spotify wasn't updating past the
first song previously.
Change-Id: I033f9a2f96acfde25922d6912a4927b95fb89596
TreeHugger Robot [Tue, 29 May 2018 20:04:26 +0000 (20:04 +0000)]
Merge "Explicitly stop streaming when switching streaming to another device" into pi-dev
Pavlin Radoslavov [Mon, 28 May 2018 03:06:20 +0000 (20:06 -0700)]
Explicitly stop streaming when switching streaming to another device
* Explicitly call btif_av_stream_stop() inside
btif_a2dp_source_end_session_delayed() when ending the session.
It should be called regardless whether we are using software
or hardware based encoding.
* Removed extra btif_av_stream_stop() call inside
BtifAvSource::SetActivePeer(), because it is not needed anymore.
It is replaced by the call inside btif_a2dp_source_end_session_delayed()
* Added "peer_address" argument to btif_av_stream_stop()
so it can be used to stop the stream to a specific peer.
* Fix an issue inside bta_av_chk_2nd_start() that was triggering
extra start request to some headsets - the extra start request
was blocking follow-up legitimate requests.
* Simplify the logic inside bta_av_do_start() so it is easier to
identify issues when start streaming. The actual processing logic
itself is not changed.
* Add extra log messages or update existing ones to help debug
similar issues in the future.
Bug:
79909084
Test: Manual: streaming A2DP, connect a new device, change active device
Change-Id: Id583aa44aec7082dc5f94532e6b41a7ea33813a1
Jakub Pawlowski [Sat, 26 May 2018 15:12:50 +0000 (08:12 -0700)]
[automerger skipped] [automerger] GATT: Handle too short Error Response PDU am:
03881d1055 am:
1e8cabdae2 am:
bdcc61da11 am:
ed1ba213f3 am:
272ded19ed am:
aebdc76523 am:
98b95ec8b4 am:
ce3eb99f64 skipped:
89580929ab am:
532c9426ec -s ours am:
0b64bfb34b -s ours
am:
eb928f907e -s ours
Change-Id: I5c235b0ecbcd9111ee656b5eb62326904765bc87
Jakub Pawlowski [Sat, 26 May 2018 15:06:47 +0000 (08:06 -0700)]
[automerger skipped] [automerger] GATT: Handle too short Error Response PDU am:
03881d1055 am:
1e8cabdae2 am:
bdcc61da11 am:
ed1ba213f3 am:
272ded19ed am:
aebdc76523 am:
98b95ec8b4 am:
ce3eb99f64 skipped:
89580929ab am:
532c9426ec -s ours
am:
0b64bfb34b -s ours
Change-Id: I775c2463cea6d87f60ce10aa53c9f1729622a65c
Jakub Pawlowski [Sat, 26 May 2018 15:01:13 +0000 (08:01 -0700)]
[automerger skipped] [automerger] GATT: Handle too short Error Response PDU am:
03881d1055 am:
1e8cabdae2 am:
bdcc61da11 am:
ed1ba213f3 am:
272ded19ed am:
aebdc76523 am:
98b95ec8b4 am:
ce3eb99f64 skipped:
89580929ab
am:
532c9426ec -s ours
Change-Id: Iba3ee8429d5f63384d2f617913a326428ca48fde
Jakub Pawlowski [Sat, 26 May 2018 07:49:25 +0000 (00:49 -0700)]
[automerger skipped] GATT: Handle too short Error Response PDU am:
5fd33061c4 am:
65d0585259 -s ours
am:
af1d636d9b -s ours
Change-Id: Idab42dcdf02077b50ef3b46761058d2997b01467
Jakub Pawlowski [Sat, 26 May 2018 07:42:51 +0000 (00:42 -0700)]
[automerger skipped] GATT: Handle too short Error Response PDU am:
5fd33061c4
am:
65d0585259 -s ours
Change-Id: I2f91edd9d9c3b933690139621e5ce1e05fbc603a
Jakub Pawlowski [Sat, 26 May 2018 07:36:48 +0000 (00:36 -0700)]
GATT: Handle too short Error Response PDU
am:
5fd33061c4
Change-Id: Idb329c5956132c13de53fd34cdbe0dc89efc1aa1
Android Build Merger (Role) [Sat, 26 May 2018 07:30:26 +0000 (07:30 +0000)]
[automerger] GATT: Handle too short Error Response PDU am:
03881d1055 am:
1e8cabdae2 am:
bdcc61da11 am:
ed1ba213f3 am:
272ded19ed am:
aebdc76523 am:
98b95ec8b4 am:
ce3eb99f64 skipped:
89580929ab
Change-Id: Ic8f13917ab7a7682aa352076d12f09ec575170ea
Android Build Merger (Role) [Sat, 26 May 2018 07:29:23 +0000 (07:29 +0000)]
[automerger] GATT: Handle too short Error Response PDU am:
03881d1055 am:
1e8cabdae2 am:
bdcc61da11 am:
ed1ba213f3 am:
272ded19ed am:
aebdc76523 am:
98b95ec8b4 am:
ce3eb99f64
Change-Id: I94a5085e6d4a16759253179d34194ad17885aabb
Android Build Merger (Role) [Sat, 26 May 2018 07:29:21 +0000 (07:29 +0000)]
[automerger] GATT: Handle too short Error Response PDU am:
03881d1055 am:
1e8cabdae2 am:
bdcc61da11 am:
ed1ba213f3 am:
272ded19ed am:
aebdc76523 am:
98b95ec8b4
Change-Id: I9dc6a8173995d2337c9e59ae6dbfc201143245e9
Android Build Merger (Role) [Sat, 26 May 2018 07:29:20 +0000 (07:29 +0000)]
[automerger] GATT: Handle too short Error Response PDU am:
03881d1055 am:
1e8cabdae2 am:
bdcc61da11 am:
ed1ba213f3 am:
272ded19ed am:
aebdc76523
Change-Id: Ie2a4ba49599805c63b4d3ad81d2b6b50e53c385f
Android Build Merger (Role) [Sat, 26 May 2018 07:29:18 +0000 (07:29 +0000)]
[automerger] GATT: Handle too short Error Response PDU am:
03881d1055 am:
1e8cabdae2 am:
bdcc61da11 am:
ed1ba213f3 am:
272ded19ed
Change-Id: If0a5e66c97c1acb07555cd20c0a4bbed62e40a9a
Android Build Merger (Role) [Sat, 26 May 2018 07:29:16 +0000 (07:29 +0000)]
[automerger] GATT: Handle too short Error Response PDU am:
03881d1055 am:
1e8cabdae2 am:
bdcc61da11 am:
ed1ba213f3
Change-Id: I5a24b2d428c69771380e3d6484f9770a3c8cf33e
Android Build Merger (Role) [Sat, 26 May 2018 07:29:15 +0000 (07:29 +0000)]
[automerger] GATT: Handle too short Error Response PDU am:
03881d1055 am:
1e8cabdae2 am:
bdcc61da11
Change-Id: I43e8c151fffa381413347fa2429b4a996f432199
Android Build Merger (Role) [Sat, 26 May 2018 07:29:14 +0000 (07:29 +0000)]
[automerger] GATT: Handle too short Error Response PDU am:
03881d1055 am:
1e8cabdae2
Change-Id: I3edb3cd03b07aa7dba92f6d90026dd1c1e8d3b6b
Android Build Merger (Role) [Sat, 26 May 2018 07:29:12 +0000 (07:29 +0000)]
[automerger] GATT: Handle too short Error Response PDU am:
03881d1055
Change-Id: I1d7cb68481b798a0f59b8b8bdf6639f5fb1c5fea
Jakub Pawlowski [Wed, 23 May 2018 17:30:19 +0000 (10:30 -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
Merged-In: Ie6a53e9c8e4ceb8f1e5a75aee44baa5f4a798c4f
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
Merged-In: Ie6a53e9c8e4ceb8f1e5a75aee44baa5f4a798c4f
Jakub Pawlowski [Sat, 26 May 2018 04:41:18 +0000 (21:41 -0700)]
[automerger skipped] Merge "GATT: Handle too short Error Response PDU" into oc-mr1-dev
am:
29befd94cf -s ours
Change-Id: I04051b1a6a9846bbc2336fc2491eebacb26ad00f
TreeHugger Robot [Sat, 26 May 2018 04:32:17 +0000 (04:32 +0000)]
Merge "GATT: Handle too short Error Response PDU" into oc-mr1-dev
Jakub Pawlowski [Sat, 26 May 2018 04:02:49 +0000 (21:02 -0700)]
[automerger skipped] [automerger] Add PDU size checks in process_service_search_attr_rsp am:
3181bdee7d am:
ab7f755c9d am:
c8a02c4bd8 am:
0f69ef1742 am:
1e0d3bafed am:
13a24d8cc9 am:
42d53a8c71 am:
2f5acf66b0 skipped:
0488ddb980 am:
147da61cb8 -s ours am:
5c37e7f55e -s ours
am:
243abd8835 -s ours
Change-Id: I7f1e5d4a5fe7ac5ec5a2ee0bca3397713b434e06
Jakub Pawlowski [Sat, 26 May 2018 03:56:45 +0000 (20:56 -0700)]
[automerger skipped] [automerger] Add PDU size checks in process_service_search_attr_rsp am:
3181bdee7d am:
ab7f755c9d am:
c8a02c4bd8 am:
0f69ef1742 am:
1e0d3bafed am:
13a24d8cc9 am:
42d53a8c71 am:
2f5acf66b0 skipped:
0488ddb980 am:
147da61cb8 -s ours
am:
5c37e7f55e -s ours
Change-Id: I92119dcc397c342bc673ae219773e0db5ae2a8f4
Jakub Pawlowski [Sat, 26 May 2018 03:51:41 +0000 (20:51 -0700)]
[automerger skipped] [automerger] Add PDU size checks in process_service_search_attr_rsp am:
3181bdee7d am:
ab7f755c9d am:
c8a02c4bd8 am:
0f69ef1742 am:
1e0d3bafed am:
13a24d8cc9 am:
42d53a8c71 am:
2f5acf66b0 skipped:
0488ddb980
am:
147da61cb8 -s ours
Change-Id: Ie6defc0efc49dc58d3e2f7d262f2277a617d77c3
Android Build Merger (Role) [Sat, 26 May 2018 02:56:23 +0000 (02:56 +0000)]
[automerger] Add PDU size checks in process_service_search_attr_rsp am:
3181bdee7d am:
ab7f755c9d am:
c8a02c4bd8 am:
0f69ef1742 am:
1e0d3bafed am:
13a24d8cc9 am:
42d53a8c71 am:
2f5acf66b0 skipped:
0488ddb980
Change-Id: Id6fbc4d73a7b922ff9224850000a4a1f10b81050
Android Build Merger (Role) [Sat, 26 May 2018 02:50:31 +0000 (02:50 +0000)]
[automerger] Add PDU size checks in process_service_search_attr_rsp am:
3181bdee7d am:
ab7f755c9d am:
c8a02c4bd8 am:
0f69ef1742 am:
1e0d3bafed am:
13a24d8cc9 am:
42d53a8c71 am:
2f5acf66b0
Change-Id: I55b0755496a55a6f1c5a84227104f6478f05d0b4
Android Build Merger (Role) [Sat, 26 May 2018 02:50:30 +0000 (02:50 +0000)]
[automerger] Add PDU size checks in process_service_search_attr_rsp am:
3181bdee7d am:
ab7f755c9d am:
c8a02c4bd8 am:
0f69ef1742 am:
1e0d3bafed am:
13a24d8cc9 am:
42d53a8c71
Change-Id: I5516d1c6ec683898b459bf9ba9c57299404aa42f
Android Build Merger (Role) [Sat, 26 May 2018 02:50:28 +0000 (02:50 +0000)]
[automerger] Add PDU size checks in process_service_search_attr_rsp am:
3181bdee7d am:
ab7f755c9d am:
c8a02c4bd8 am:
0f69ef1742 am:
1e0d3bafed am:
13a24d8cc9
Change-Id: Id9651d76b8cd1ab201f5f3024ea8f7b2d57de521
Android Build Merger (Role) [Sat, 26 May 2018 02:50:26 +0000 (02:50 +0000)]
[automerger] Add PDU size checks in process_service_search_attr_rsp am:
3181bdee7d am:
ab7f755c9d am:
c8a02c4bd8 am:
0f69ef1742 am:
1e0d3bafed
Change-Id: If52d04ab58a88e517a559d11d4f876a2ba56d70f
Android Build Merger (Role) [Sat, 26 May 2018 02:50:25 +0000 (02:50 +0000)]
[automerger] Add PDU size checks in process_service_search_attr_rsp am:
3181bdee7d am:
ab7f755c9d am:
c8a02c4bd8 am:
0f69ef1742
Change-Id: I274a46dd9edf3810f47daf791e1dc69c6ba0504b
Android Build Merger (Role) [Sat, 26 May 2018 02:50:23 +0000 (02:50 +0000)]
[automerger] Add PDU size checks in process_service_search_attr_rsp am:
3181bdee7d am:
ab7f755c9d am:
c8a02c4bd8
Change-Id: Ib296956f3e5ff59ed7f02d61dcc6bf93e572c58f
Android Build Merger (Role) [Sat, 26 May 2018 02:50:21 +0000 (02:50 +0000)]
[automerger] Add PDU size checks in process_service_search_attr_rsp am:
3181bdee7d am:
ab7f755c9d
Change-Id: Ib45cb979df156f9871bbe845dcd12d291681035e
Android Build Merger (Role) [Sat, 26 May 2018 02:50:19 +0000 (02:50 +0000)]
[automerger] Add PDU size checks in process_service_search_attr_rsp am:
3181bdee7d
Change-Id: Ib457d90751151790f92abe23b38596c02f0a69af
Jack He [Thu, 24 May 2018 22:53:27 +0000 (15:53 -0700)]
HFP: Only advance BTIF queue for outgoing connections
* Modify HFP btif layer to only advance queue when there is a
connection outcome for outgoing connections
* During an ACL collision, incoming connection may preempt outgoing
connection and come back to the upper layer in a separate control
block. In this case, we should not advance the btif queue until the
outgoing connection sends callback to the btif layer
* When RFCOMM connection is successful, but SLC connection failed, we
should also send callback to Java layer and advance the queue. We
should only do this when transition from RFCOMM connected to
Disconnected, not from SLC connected to Disconnected
* We should only advance the queue after sending connection state update
to Java layer
* This prevents the crash in connect_int() where we check for any
control block that is left in connecting state
Bug:
80251999
Test: connect HFP devices rapidly to trigger ACL collision
testplans/details/166812/3975
Change-Id: Iba3736c77d8ef4a4701896461042466c26bc4820
(cherry picked from commit
8ced3dfacba328b1260096b93b9e9e6f65929fe3)
TreeHugger Robot [Fri, 25 May 2018 23:36:36 +0000 (23:36 +0000)]
Merge "HFP: Fix ACL collision handling and WBS update" into pi-dev
Jack He [Fri, 25 May 2018 01:59:13 +0000 (18:59 -0700)]
HFP: Fix ACL collision handling and WBS update
* Correctly set control block handle when passing WBS event data to
upstream
* Correctly reject local outgoing connection when a colliding incoming
connection is connected to RFCOMM
* Add more logging to help with future debugging
Bug:
80251999
Test: connect HFP devices rapidly and toggle Bluetooth rapidly
testplans/details/166812/3975
Change-Id: I90616d70335ca68c40251fb722146924c4801cbe
(cherry picked from commit
275df40271331e3d1f11167c961890f2dfdc3eda)
TreeHugger Robot [Fri, 25 May 2018 23:00:24 +0000 (23:00 +0000)]
Merge "Inform AVRCP Controller before cleaning up." into pi-dev
TreeHugger Robot [Fri, 25 May 2018 22:55:57 +0000 (22:55 +0000)]
Merge "A2DP Offload: Avoid Offload_start/stop from remote" into pi-dev
Jakub Pawlowski [Fri, 25 May 2018 22:30:49 +0000 (15:30 -0700)]
[automerger skipped] Add PDU size checks in process_service_search_attr_rsp am:
980f6427b1 am:
b7de2e7afb
am:
4dceea74c6 -s ours
Change-Id: Ib74d2f95105d7c2c9c9a3605d0873c216d3cf1ea
Jakub Pawlowski [Fri, 25 May 2018 22:26:44 +0000 (15:26 -0700)]
Add PDU size checks in process_service_search_attr_rsp am:
980f6427b1
am:
b7de2e7afb
Change-Id: Iefba89565fe0c2088498ce0faff09c1a39f8afc3
Jakub Pawlowski [Fri, 25 May 2018 22:21:11 +0000 (15:21 -0700)]
Add PDU size checks in process_service_search_attr_rsp
am:
980f6427b1
Change-Id: I08d0a722f3421a59ed81c1324062d35ebe5057bd
Joseph Pirozzo [Fri, 25 May 2018 19:31:06 +0000 (12:31 -0700)]
Inform AVRCP Controller before cleaning up.
Move the JNI callback earlier in the procedure before the device info is
zeroed out such that the higher levels know which device disconnected.
Bug:
80265765
Test: Disconnect AVRCP and verify bluetooth_manager reports it is
disconnected.
Change-Id: I1c69341227f4c1c1662022a4a77e1752f6306d2e
(cherry picked from commit
3ee0329420f1c26cbd37653f982b8cdc67d0cb35)
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
Merged-In: Icc02a6188f806f766aa8676804d74995afa08d25
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
Merged-In: Icc02a6188f806f766aa8676804d74995afa08d25
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
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
Merged-In: Ie6a53e9c8e4ceb8f1e5a75aee44baa5f4a798c4f
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