OSDN Git Service

android-x86/system-bt.git
6 years agoMerge "AVRCP: Reject invalid PlayItem and SetAddressedPlayer command" into pi-dev
Andre Eisenbach [Fri, 1 Jun 2018 00:17:53 +0000 (17:17 -0700)]
Merge "AVRCP: Reject invalid PlayItem and SetAddressedPlayer command" into pi-dev
am: 1573be5309

Change-Id: Ie7b3d849f08b783099601fd7837aeb38414ac94f

6 years agoMerge "SMP: Check p_cb->role in smp_br_state_machine_event" into pi-dev
Hansong Zhang [Fri, 1 Jun 2018 00:06:41 +0000 (17:06 -0700)]
Merge "SMP: Check p_cb->role in smp_br_state_machine_event" into pi-dev
am: 09c3f838e4

Change-Id: I80fad4c9814f3bed33112a97e7eaf0d63e39ab96

6 years agoMerge "AVRCP: Reject invalid PlayItem and SetAddressedPlayer command" into pi-dev
Andre Eisenbach [Thu, 31 May 2018 20:41:00 +0000 (20:41 +0000)]
Merge "AVRCP: Reject invalid PlayItem and SetAddressedPlayer command" into pi-dev

6 years agoAVRCP: Reject invalid PlayItem and SetAddressedPlayer command
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

6 years agoMerge "SMP: Check p_cb->role in smp_br_state_machine_event" into pi-dev
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

6 years ago[automerger skipped] Merge changes from topic "avrcp-addressed-player-changed" am...
tedwang [Wed, 30 May 2018 17:01:54 +0000 (10:01 -0700)]
[automerger skipped] Merge changes from topic "avrcp-addressed-player-changed" am: 0b569b1d82
am: 0749d6d96d  -s ours

Change-Id: Ib946ed13bdd8bb5e141f63a9d3e80ce410799ae4

6 years ago[automerger skipped] Add respond track not selected interim when register notificatio...
tedwang [Wed, 30 May 2018 17:01:38 +0000 (10:01 -0700)]
[automerger skipped] Add respond track not selected interim when register notification am: 494dcc55ea
am: 43eb98fc32  -s ours

Change-Id: I1b82bf151c5b7989e42cd8364474a4858395c50a

6 years ago[automerger skipped] Send UID 0 for track changed if there is no media ID am: 8b7b73764a
Ajay Panicker [Wed, 30 May 2018 17:01:26 +0000 (10:01 -0700)]
[automerger skipped] Send UID 0 for track changed if there is no media ID am: 8b7b73764a
am: 69fa501461  -s ours

Change-Id: I41d1abd8d1ac07b32512484e48d4a94d6a5eea85

6 years agoMerge changes from topic "avrcp-addressed-player-changed"
tedwang [Wed, 30 May 2018 16:56:23 +0000 (09:56 -0700)]
Merge changes from topic "avrcp-addressed-player-changed"
am: 0b569b1d82

Change-Id: I0a1fe4ac30fe95b6d86ebaac1cc8456e9b721c2c

6 years agoAdd respond track not selected interim when register notification
tedwang [Wed, 30 May 2018 16:56:02 +0000 (09:56 -0700)]
Add respond track not selected interim when register notification
am: 494dcc55ea

Change-Id: I7dd35d6b985ee173f0bf6412a4f82bd69ab289ee

6 years agoSend UID 0 for track changed if there is no media ID
Ajay Panicker [Wed, 30 May 2018 16:55:38 +0000 (09:55 -0700)]
Send UID 0 for track changed if there is no media ID
am: 8b7b73764a

Change-Id: I1a980b9bc2937fe71cff0ef7c5ccdda5566393f5

6 years agoMerge changes from topic "avrcp-addressed-player-changed"
Treehugger Robot [Wed, 30 May 2018 16:42:33 +0000 (16:42 +0000)]
Merge changes from topic "avrcp-addressed-player-changed"

* changes:
  Send addressed and available player change for PTS test
  Add respond track not selected interim when register notification
  Send UID 0 for track changed if there is no media ID

6 years agoLE Create Connection Complete - crash on Command Disallowed am: f8e8c59bcb
Jakub Pawlowski [Wed, 30 May 2018 15:59:11 +0000 (08:59 -0700)]
LE Create Connection Complete - crash on Command Disallowed am: f8e8c59bcb
am: c71de3e48c

Change-Id: I4ec3d3068872dc317e16ec8a9ba5e7ae31a724e2

6 years agoLE Create Connection Complete - crash on Command Disallowed
Jakub Pawlowski [Wed, 30 May 2018 15:53:07 +0000 (08:53 -0700)]
LE Create Connection Complete - crash on Command Disallowed
am: f8e8c59bcb

Change-Id: Ia6f2a7958eb9df8b5d87f9d0daa5508aa2009c61

6 years agoMerge "Fix race condition in LE Create Connection Cancel handling" am: bba6b8a3da
Jakub Pawlowski [Wed, 30 May 2018 05:32:08 +0000 (22:32 -0700)]
Merge "Fix race condition in LE Create Connection Cancel handling" am: bba6b8a3da
am: 1244cf9130

Change-Id: Ib135d2197089e398948db18ef192456981e3d8a7

6 years agoMerge "Send addressed and available player change for PTS test" into pi-dev
tedwang [Wed, 30 May 2018 04:26:23 +0000 (21:26 -0700)]
Merge "Send addressed and available player change for PTS test" into pi-dev
am: 7c27137325

Change-Id: Ife0ce17268dddcc4e931720cec4d6ea48933ac3c

6 years agoMerge "Fix race condition in LE Create Connection Cancel handling"
Jakub Pawlowski [Wed, 30 May 2018 04:19:12 +0000 (21:19 -0700)]
Merge "Fix race condition in LE Create Connection Cancel handling"
am: bba6b8a3da

Change-Id: I86ad4d40935d3fbf5f86234f51fe6854763adf94

6 years agoSend addressed and available player change for PTS test
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
Merged-In: I6b976af8bdd1afcc9799c50c8e558939cf7be187
(cherry picked from commit 7a3f78eaa6294d5079312dc9f0e5c7d5c6b5e059)

6 years agoAdd respond track not selected interim when register notification
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
Merged-In: Ia861bf4682e9daf9c7c3842df9f95381171da574
(cherry picked from commit a25fca2acb30aafab9cedc521888b794b703eff3)

6 years agoSend UID 0 for track changed if there is no media ID
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
Merged-In: I033f9a2f96acfde25922d6912a4927b95fb89596
(cherry picked from commit 2789ae2b57085aad446d7e062f66f5d83cf26e0b)

6 years agoMerge "Send addressed and available player change for PTS test" 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

6 years agoMerge changes I88886146,I1c076c7f into pi-dev
Jakub Pawlowski [Wed, 30 May 2018 02:56:01 +0000 (19:56 -0700)]
Merge changes I88886146,I1c076c7f into pi-dev
am: 02fa06d70d

Change-Id: I75cfe44bf91f17c478332d5c5c6dbaa25210d8d4

6 years agoMerge changes I88886146,I1c076c7f 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

6 years agoLE Create Connection Complete - crash on Command Disallowed
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

6 years agoMerge "Fix race condition in LE Create Connection Cancel handling"
Jakub Pawlowski [Wed, 30 May 2018 02:43:52 +0000 (02:43 +0000)]
Merge "Fix race condition in LE Create Connection Cancel handling"

6 years agoBluetooth HFP: Use WBS by default (1/5) am: 6146eb0104
Hansong Zhang [Wed, 30 May 2018 02:26:53 +0000 (19:26 -0700)]
Bluetooth HFP: Use WBS by default (1/5) am: 6146eb0104
am: e19b8d25be

Change-Id: Iba92d9ea6915218f6a9664df6737338992af88ac

6 years agoAdd respond track not selected interim when register notification
tedwang [Wed, 30 May 2018 02:23:28 +0000 (19:23 -0700)]
Add respond track not selected interim when register notification
am: a25fca2acb

Change-Id: I22e8c9b0e71c642beb5e8e951dfcf224f9c47f05

6 years agoBluetooth HFP: Use WBS by default (1/5)
Hansong Zhang [Wed, 30 May 2018 01:16:04 +0000 (18:16 -0700)]
Bluetooth HFP: Use WBS by default (1/5)
am: 6146eb0104

Change-Id: I9bd2099abb40d9c3f07c5af0a8245c0ee42eb42f

6 years agoSMP: Check p_cb->role in smp_br_state_machine_event
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

6 years agoSend UID 0 for track changed if there is no media ID
Ajay Panicker [Tue, 29 May 2018 23:43:33 +0000 (16:43 -0700)]
Send UID 0 for track changed if there is no media ID
am: 2789ae2b57

Change-Id: I29754e9b2aeae16fa5dcfce9ee6cf94c8f4fe949

6 years agoSend addressed and available player change for PTS test
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

6 years agoAdd respond track not selected interim when register notification
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

6 years ago[automerger skipped] Explicitly stop streaming when switching streaming to another...
Pavlin Radoslavov [Tue, 29 May 2018 22:55:50 +0000 (15:55 -0700)]
[automerger skipped] Explicitly stop streaming when switching streaming to another device am: ace9d3dd83
am: 52611e6eae  -s ours

Change-Id: I7a30860acd042037d518cbea1ca6a7f4a6bd5c2c

6 years agoLE Create Connection Complete - crash on Command Disallowed
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)

6 years agoFix race condition in LE Create Connection Cancel handling
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)

6 years agoExplicitly stop streaming when switching streaming to another device
Pavlin Radoslavov [Tue, 29 May 2018 22:25:47 +0000 (15:25 -0700)]
Explicitly stop streaming when switching streaming to another device
am: ace9d3dd83

Change-Id: I7e4483090fb78525daebc60f251621c576a8e43d

6 years agoBluetooth HFP: Use WBS by default (1/5)
Hansong Zhang [Tue, 17 Apr 2018 23:00:30 +0000 (16:00 -0700)]
Bluetooth HFP: Use WBS by default (1/5)

Bug: 72624793
Test: compilation
Change-Id: Ia64c49210769581bba5be7354b67fa50d89cfdaa

6 years agoSend UID 0 for track changed if there is no media ID
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

6 years agoExplicitly stop streaming when switching streaming to another device
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
Merged-In: Id583aa44aec7082dc5f94532e6b41a7ea33813a1
(cherry picked from commit 7b97d4d4a45d25a4ac80f3b59a40c115f0a03af4)

6 years agoMerge "Explicitly stop streaming when switching streaming to another device" into...
Pavlin Radoslavov [Tue, 29 May 2018 20:11:08 +0000 (13:11 -0700)]
Merge "Explicitly stop streaming when switching streaming to another device" into pi-dev
am: c52986354c

Change-Id: I2ded8e1466673b8b4693de1e6f995296e8311a5f

6 years agoMerge "Explicitly stop streaming when switching streaming to another device" into...
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

6 years agoFix race condition in LE Create Connection Cancel handling
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

6 years agoExplicitly stop streaming when switching streaming to another device
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

6 years agoLinux build and linking fix am: de3c343221
Jakub Pawlowski [Tue, 29 May 2018 16:56:13 +0000 (09:56 -0700)]
Linux build and linking fix am: de3c343221
am: d9984bff07

Change-Id: I2f02c8ba39d18473b0e17f04ea3aee4d7261eea3

6 years agoLinux build and linking fix
Jakub Pawlowski [Tue, 29 May 2018 16:50:38 +0000 (09:50 -0700)]
Linux build and linking fix
am: de3c343221

Change-Id: I46b4e3325a545cc7e6f16dc5925d968cc186652e

6 years agoMerge "Don't refresh GATT database after bonding" am: 89e8082c60
Jakub Pawlowski [Tue, 29 May 2018 15:17:26 +0000 (08:17 -0700)]
Merge "Don't refresh GATT database after bonding" am: 89e8082c60
am: 5bf1a28992

Change-Id: I560ff8d92c08d85805d985b7c1362d81fbd42bd5

6 years agoLinux build and linking fix
Jakub Pawlowski [Sat, 26 May 2018 04:07:38 +0000 (21:07 -0700)]
Linux build and linking fix

Test: run bluetoothtbd on Linux
Change-Id: Id9d913f8766b71c77696df25f74a8e33ba57523e

6 years agoMerge "Don't refresh GATT database after bonding"
Jakub Pawlowski [Tue, 29 May 2018 15:11:52 +0000 (08:11 -0700)]
Merge "Don't refresh GATT database after bonding"
am: 89e8082c60

Change-Id: I278d2e933db657fc3c237ca1039bcfb5f7bf54c0

6 years agoMerge "Don't refresh GATT database after bonding"
Jakub Pawlowski [Tue, 29 May 2018 15:03:54 +0000 (15:03 +0000)]
Merge "Don't refresh GATT database after bonding"

6 years ago[automerger skipped] [automerger] GATT: Handle too short Error Response PDU am: 03881...
Jakub Pawlowski [Sat, 26 May 2018 15:18:24 +0000 (08:18 -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
am: 00d3321a16  -s ours

Change-Id: I3d2c329a704869715de8c12f7af953f01db9c17a

6 years ago[automerger skipped] [automerger] GATT: Handle too short Error Response PDU am: 03881...
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

6 years ago[automerger skipped] [automerger] GATT: Handle too short Error Response PDU am: 03881...
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

6 years ago[automerger skipped] [automerger] GATT: Handle too short Error Response PDU am: 03881...
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

6 years ago[automerger skipped] GATT: Handle too short Error Response PDU am: 5fd33061c4 am...
Jakub Pawlowski [Sat, 26 May 2018 07:55:00 +0000 (00:55 -0700)]
[automerger skipped] GATT: Handle too short Error Response PDU am: 5fd33061c4 am: 65d0585259  -s ours am: af1d636d9b  -s ours
am: e2922d471e  -s ours

Change-Id: I26840f91e3d9109e8a4721342a403339e4ed8a5a

6 years ago[automerger skipped] GATT: Handle too short Error Response PDU am: 5fd33061c4 am...
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

6 years agoA2DP Offload: Avoid Offload_start/stop from remote am: 33576935cf
Sunny Kapdi [Sat, 26 May 2018 07:49:22 +0000 (00:49 -0700)]
A2DP Offload: Avoid Offload_start/stop from remote am: 33576935cf
am: 6288fe26bf

Change-Id: Id16187eaa8f5a0309c73d46bd1c60259c85040e6

6 years ago[automerger skipped] GATT: Handle too short Error Response PDU am: 5fd33061c4
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

6 years agoA2DP Offload: Avoid Offload_start/stop from remote
Sunny Kapdi [Sat, 26 May 2018 07:42:48 +0000 (00:42 -0700)]
A2DP Offload: Avoid Offload_start/stop from remote
am: 33576935cf

Change-Id: If1641995dc0fbb5e442c5610f3470c2e542e1dbe

6 years agoGATT: Handle too short Error Response PDU
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

6 years ago[automerger] GATT: Handle too short Error Response PDU am: 03881d1055 am: 1e8cabdae2...
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

6 years ago[automerger] GATT: Handle too short Error Response PDU am: 03881d1055 am: 1e8cabdae2...
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

6 years ago[automerger] GATT: Handle too short Error Response PDU am: 03881d1055 am: 1e8cabdae2...
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

6 years ago[automerger] GATT: Handle too short Error Response PDU am: 03881d1055 am: 1e8cabdae2...
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

6 years ago[automerger] GATT: Handle too short Error Response PDU am: 03881d1055 am: 1e8cabdae2...
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

6 years ago[automerger] GATT: Handle too short Error Response PDU am: 03881d1055 am: 1e8cabdae2...
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

6 years ago[automerger] GATT: Handle too short Error Response PDU am: 03881d1055 am: 1e8cabdae2...
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

6 years ago[automerger] GATT: Handle too short Error Response PDU am: 03881d1055 am: 1e8cabdae2
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

6 years ago[automerger] GATT: Handle too short Error Response PDU am: 03881d1055
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

6 years agoGATT: Handle too short Error Response PDU
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

6 years agoInform AVRCP Controller before cleaning up. am: 35e9618558
Joseph Pirozzo [Sat, 26 May 2018 06:00:03 +0000 (23:00 -0700)]
Inform AVRCP Controller before cleaning up. am: 35e9618558
am: 6bbc75bf4f

Change-Id: Iecee4515b632770bc4f9c13f9a078d37564fbdff

6 years agoInform AVRCP Controller before cleaning up.
Joseph Pirozzo [Sat, 26 May 2018 05:53:28 +0000 (22:53 -0700)]
Inform AVRCP Controller before cleaning up.
am: 35e9618558

Change-Id: I7a25750c7f5afa647a1706496d1941f2ac39261f

6 years agoA2DP Offload: Avoid Offload_start/stop from remote
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

6 years agoGATT: Handle too short Error Response PDU
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

6 years ago[automerger skipped] Merge "GATT: Handle too short Error Response PDU" into oc-mr1...
Jakub Pawlowski [Sat, 26 May 2018 04:46:52 +0000 (21:46 -0700)]
[automerger skipped] Merge "GATT: Handle too short Error Response PDU" into oc-mr1-dev am: 29befd94cf  -s ours
am: 5b0e1f119d  -s ours

Change-Id: I275298c30c315422358078deae48d60eaa47a10b

6 years ago[automerger skipped] Merge "GATT: Handle too short Error Response PDU" into oc-mr1-dev
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

6 years agoMerge "GATT: Handle too short Error Response PDU" into oc-mr1-dev
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

6 years agoInform AVRCP Controller before cleaning up.
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

6 years ago[automerger skipped] [automerger] Add PDU size checks in process_service_search_attr_...
Jakub Pawlowski [Sat, 26 May 2018 04:08:24 +0000 (21:08 -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
am: 93e1510b93  -s ours

Change-Id: I172da104e56459ba308f2fc5044fece45569cad3

6 years ago[automerger skipped] [automerger] Add PDU size checks in process_service_search_attr_...
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

6 years ago[automerger skipped] [automerger] Add PDU size checks in process_service_search_attr_...
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

6 years ago[automerger skipped] [automerger] Add PDU size checks in process_service_search_attr_...
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

6 years ago[automerger] Add PDU size checks in process_service_search_attr_rsp am: 3181bdee7d...
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

6 years ago[automerger] Add PDU size checks in process_service_search_attr_rsp am: 3181bdee7d...
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

6 years ago[automerger] Add PDU size checks in process_service_search_attr_rsp am: 3181bdee7d...
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

6 years ago[automerger] Add PDU size checks in process_service_search_attr_rsp am: 3181bdee7d...
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

6 years ago[automerger] Add PDU size checks in process_service_search_attr_rsp am: 3181bdee7d...
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

6 years ago[automerger] Add PDU size checks in process_service_search_attr_rsp am: 3181bdee7d...
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

6 years ago[automerger] Add PDU size checks in process_service_search_attr_rsp am: 3181bdee7d...
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

6 years ago[automerger] Add PDU size checks in process_service_search_attr_rsp am: 3181bdee7d...
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

6 years ago[automerger] Add PDU size checks in process_service_search_attr_rsp am: 3181bdee7d
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

6 years agoHFP: Only advance BTIF queue for outgoing connections
Jack He [Sat, 26 May 2018 01:24:57 +0000 (18:24 -0700)]
HFP: Only advance BTIF queue for outgoing connections
am: f1466605c3

Change-Id: Ieb3922a34c8d73d23ade442a56d6ad91dc82c7c6

6 years agoHFP: Only advance BTIF queue for outgoing connections am: 5d0728dcf9
Jack He [Sat, 26 May 2018 01:14:08 +0000 (18:14 -0700)]
HFP: Only advance BTIF queue for outgoing connections am: 5d0728dcf9
am: a10cdb3ccd

Change-Id: I4fc6c89e32327b9aa2256ea4c8c7bacf069be675

6 years agoHFP: Fix ACL collision handling and WBS update am: 1c2fdca5d7
Jack He [Sat, 26 May 2018 01:13:58 +0000 (18:13 -0700)]
HFP: Fix ACL collision handling and WBS update am: 1c2fdca5d7
am: ac609e1cc5

Change-Id: I3df3454845da38a252525d9f0ee8d02ffad80729

6 years agoHFP: Only advance BTIF queue for outgoing connections
Jack He [Sat, 26 May 2018 01:09:01 +0000 (18:09 -0700)]
HFP: Only advance BTIF queue for outgoing connections
am: 5d0728dcf9

Change-Id: I4fd7faa5385bc44f3e85d979a2aca4657a8077ec

6 years agoHFP: Fix ACL collision handling and WBS update
Jack He [Sat, 26 May 2018 01:08:54 +0000 (18:08 -0700)]
HFP: Fix ACL collision handling and WBS update
am: 1c2fdca5d7

Change-Id: I842425cb0e91368577f4c547aeec024f3cefbd54

6 years agoMerge "HFP: Fix ACL collision handling and WBS update" into pi-dev
Jack He [Fri, 25 May 2018 23:55:30 +0000 (16:55 -0700)]
Merge "HFP: Fix ACL collision handling and WBS update" into pi-dev
am: c9a04d0a3e

Change-Id: I466aaac2ff4adb9d318616dffec9c0472367e1de

6 years agoHFP: Only advance BTIF queue for outgoing connections
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)

6 years agoMerge "HFP: Fix ACL collision handling and WBS update" into pi-dev
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

6 years agoHFP: Only advance BTIF queue for outgoing connections
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

6 years agoHFP: Fix ACL collision handling and WBS update
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