OSDN Git Service

android-x86/system-bt.git
4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2...
Automerger Merge Worker [Tue, 3 Dec 2019 01:31:32 +0000 (01:31 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2 am: 5d8fde3e01 am: 5dbe08152a am: 294e64950c am: 28523075a6 am: dee808040c

Change-Id: I5fa64cfa93c5884b69a68dbcc9d117f71b1515a8

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2...
Automerger Merge Worker [Tue, 3 Dec 2019 01:20:25 +0000 (01:20 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2 am: 5d8fde3e01 am: 5dbe08152a am: 294e64950c am: 28523075a6

Change-Id: If031a82d0c25708dfd2c99ba9db88bd5f014de0e

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2...
Automerger Merge Worker [Tue, 3 Dec 2019 01:06:32 +0000 (01:06 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2 am: 5d8fde3e01 am: 5dbe08152a am: 294e64950c

Change-Id: I69396f7e01601ac6298b7a626268e96c1538dea0

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2...
Automerger Merge Worker [Tue, 3 Dec 2019 00:58:27 +0000 (00:58 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2 am: 5d8fde3e01 am: 5dbe08152a

Change-Id: I9b78c5b36d9d1382f307fabacc20bb74d2e91322

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2...
Automerger Merge Worker [Tue, 3 Dec 2019 00:47:12 +0000 (00:47 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2 am: 5d8fde3e01

Change-Id: I95231c695e0ec4a413c3cce64b3ea16936cc1bff

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2
Automerger Merge Worker [Tue, 3 Dec 2019 00:40:09 +0000 (00:40 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2

Change-Id: I9ed3a6586a87f199cef8b90d8c8c7d6bbb862823

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev
TreeHugger Robot [Tue, 3 Dec 2019 00:33:29 +0000 (00:33 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev

4 years agoMerge "Hearing Aid: Remove std::promise from suspend / resume calls, and stop audio...
TreeHugger Robot [Fri, 29 Nov 2019 06:38:23 +0000 (06:38 +0000)]
Merge "Hearing Aid: Remove std::promise from suspend / resume calls, and stop audio ticks by no devices" into qt-qpr1-dev

4 years agoHearing Aid: Remove std::promise from suspend / resume calls, and stop audio ticks...
Cheney Ni [Wed, 10 Jul 2019 08:24:31 +0000 (16:24 +0800)]
Hearing Aid: Remove std::promise from suspend / resume calls, and stop audio ticks by no devices

The Hearing Aid uses the stack main thread to be the media task thread.
This thread handles events / feeds audio data sequentially, and won't
have a race condition within the single thread. The promise is a bit
redundant, but wasted time to cause a potential deadlock that the caller
waits for the task thread finished which needed the caller's resource.

This CL also stops the audio ticks when no devices available, and no
need to wait for next timer expired. Besides, move all timer controls
into the media task thread, so timer is started / stopped at the same
thread, too.

Bug: 134996542
Test: add big delay within functions, and check no abnormal manually
Change-Id: If0b279a191d86b30db41a682dc7f0ad9470cb10e
Merged-In: If0b279a191d86b30db41a682dc7f0ad9470cb10e
(cherry picked from commit 90ba872a726b4b66c0b6af29e602dfee65edb710)

4 years agoFix potential OOB write in btm_read_remote_ext_features_complete
Ted Wang [Tue, 26 Nov 2019 03:46:38 +0000 (11:46 +0800)]
Fix potential OOB write in btm_read_remote_ext_features_complete

Add event length check to avoid hci event sent from controller not
correct.
Add page number check to avoid page number is bigger than
HCI_EXT_FEATURES_PAGE_MAX.

Bug: 141552859
Bug: 144205318
Test: inject function
Merged-In: Iaca4db4ee9bf27362f62aba0da088727e98955d1
Change-Id: Iaca4db4ee9bf27362f62aba0da088727e98955d1

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:53:28 +0000 (19:53 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-mr1-dev am: c5cbe3c7fb am: 274af11d49 am: 3b768c89a9
am: 627dccaa50

Change-Id: I67fdbb33c160b2146eab0f2f31caf2dd938b1b6d

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:53:10 +0000 (19:53 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into pi-dev am: 9f4246c83b am: 373dd096ba
am: 82763b80e8

Change-Id: Ica7a1af601af5370653b8873bfca552e4c431a3d

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:50:57 +0000 (19:50 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-mr1-dev am: c5cbe3c7fb am: 274af11d49
am: 3b768c89a9

Change-Id: I3908b00449687861fdcc9b46b35cbcc5ef9007f7

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:50:39 +0000 (19:50 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into pi-dev am: 9f4246c83b
am: 373dd096ba

Change-Id: Ie96b7d9290233712edb3c21a6e9fa05d56954b7e

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 03:47:02 +0000 (03:47 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-mr1-dev am: c5cbe3c7fb am: 274af11d49

Change-Id: I1cbe42de33365dec1cd292ad8ed97c26a40eecce

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 03:46:52 +0000 (03:46 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-mr1-dev am: c5cbe3c7fb

Change-Id: I6cc380ce5e08ea003cc2d12a767cff8a53705b6e

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 03:46:51 +0000 (03:46 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into pi-dev am: 9f4246c83b

Change-Id: Ie79dc03533d04e41429f8e9f918e23d8e97fe7fa

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:33:50 +0000 (03:33 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-mr1-dev

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:33:50 +0000 (03:33 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into pi-dev

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:30:33 +0000 (19:30 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev am: aa754ed3ec am: 53afb387a4 am: a651e35ad0 am: 91f38752fa am: 9d7aa50fb7
am: 9e976434fe

Change-Id: I62a7aefbeaeb699b21daf88ccd16b1d72f3c0438

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:28:10 +0000 (19:28 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev am: aa754ed3ec am: 53afb387a4 am: a651e35ad0 am: 91f38752fa
am: 9d7aa50fb7

Change-Id: Ia8a5e5a10eaba77db43760e48b166f427fcaf501

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 03:18:01 +0000 (03:18 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev am: aa754ed3ec am: 53afb387a4 am: a651e35ad0 am: 91f38752fa

Change-Id: I58e7827a9e995e44a43bf58a8bd647a66e32d5dc

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 03:04:10 +0000 (03:04 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev am: aa754ed3ec am: 53afb387a4 am: a651e35ad0

Change-Id: Idf9a04bc8291f8e08ca504c373d77750c1280b74

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 02:55:04 +0000 (02:55 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev am: aa754ed3ec am: 53afb387a4

Change-Id: I22fb89a33d6265470d4dc82a19d3ff66ce1ad9fa

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 02:45:55 +0000 (02:45 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev am: aa754ed3ec

Change-Id: I2cc0a9befe3c2b0412d53bad6b7790e61119cae2

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 02:44:11 +0000 (18:44 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into qt-dev am: db7ae0ecc0
am: a9b717c00f

Change-Id: Ic37a3ead8287b567157df927b7557eeb506e15a0

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 02:41:51 +0000 (18:41 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into qt-dev
am: db7ae0ecc0

Change-Id: Ia54ec1a9162039d515c4209df614ddba73858cd6

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 02:37:56 +0000 (02:37 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 02:37:43 +0000 (02:37 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into qt-dev

4 years agoRevert "Fix potential OOB write in btm_read_remote_ext_features_complete"
Adam Seaton [Fri, 22 Nov 2019 19:29:41 +0000 (19:29 +0000)]
Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"

This reverts commit 9935f2ba7d9e78ff4c82bd3384960e27072a0b21.

Reason for revert: reverting due to functional regressions in Auto.

Bug: 144205318
Change-Id: I41dbcc0c5cb88dc72b13db2dd76e4751d7e98a6c

4 years agoRevert "Fix potential OOB write in btm_read_remote_ext_features_complete"
Adam Seaton [Fri, 22 Nov 2019 19:29:29 +0000 (19:29 +0000)]
Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"

This reverts commit 0d7723d147012c3141d259cce24745eb446ff1b1.

Reason for revert: reverting due to functional regressions in Auto.

Bug: 144205318
Change-Id: I96ec04beeb8eb4cb307f45c3c2a02d267c00c8fc

4 years agoRevert "Fix potential OOB write in btm_read_remote_ext_features_complete"
Adam Seaton [Fri, 22 Nov 2019 19:29:14 +0000 (19:29 +0000)]
Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"

This reverts commit 33a71f2955f1254d2f96fd4a4d16d44463a21423.

Reason for revert: reverting due to functional regressions in Auto.

Bug: 144205318
Change-Id: I6e1d62f370fc910e91c0919dcb3f37fa2f3c7bf5

4 years agoRevert "Fix potential OOB write in btm_read_remote_ext_features_complete"
Adam Seaton [Fri, 22 Nov 2019 18:46:38 +0000 (18:46 +0000)]
Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"

This reverts commit efcedeb60ea270cf6be228a88da4cf3bad65975c.

Reason for revert: reverting from release branches due to functional regressions in Auto.

Bug: 144205318
Change-Id: I80d7fb4f910e6c5c88668141e83ca48401151496

4 years agoGAP: Correct the continuous pkt length in l2cap
Venkata Jagadeesh Garaga [Thu, 18 Apr 2019 11:43:49 +0000 (17:13 +0530)]
GAP: Correct the continuous pkt length in l2cap

L2cap continuous pkt length wrongly calculated in
reassembly logic when remote sends more data
than expected.

Wrong pkt length leading to memory corruption

Hence the Correct the continuous pkt length in
l2cap reassembly logic.

Bug: 135239489
Bug: 143894715
CRs-Fixed: 2434229
Test: make and internal testing
Change-Id: I758d9e31465b99e436b9b1841320000f08186c97
Merged-In: I758d9e31465b99e436b9b1841320000f08186c97
(cherry picked from commit 337bd4579453bd6bf98ff519de3ac1019cd30d28)

4 years agoAdd protection to prevent null pointer dereference.
jonerlin [Mon, 11 Nov 2019 13:09:00 +0000 (21:09 +0800)]
Add protection to prevent null pointer dereference.

* Potential null pointer dereference risk to cause Bluetooth native
crash.

Bug: 144102387
Test: Pair with BLE device
Change-Id: I1986899a3f4e472a68a589fa2465118d66a27915

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 22:04:15 +0000 (14:04 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 981e2483c6 am: 4b700057ae -s ours am: b830f4e39c -s ours am: db3402061d -s ours am: 3a9fd92f40 -s ours
am: a4d464a0b0 -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 9935f2ba7d is in history

Change-Id: I3107d4706b1faa2d49a4272123aa66a1454c3206

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 22:00:17 +0000 (14:00 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi-dev am: 86a71f0ddd -s ours am: facbbf5fa7 -s ours
am: 121bddf18c -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 0d7723d147 is in history

Change-Id: I9778c7294b0b3f3554c4505cd787378fc4711e3d

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 21:42:38 +0000 (13:42 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 981e2483c6 am: 4b700057ae -s ours am: b830f4e39c -s ours am: db3402061d -s ours
am: 3a9fd92f40 -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 9935f2ba7d is in history

Change-Id: Ibdd16959dd14a9e6b0bd95a65f898eb83db0eb12

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 21:37:39 +0000 (13:37 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi-dev am: 86a71f0ddd -s ours
am: facbbf5fa7 -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 0d7723d147 is in history

Change-Id: I912662be3c4414538d309dde7a496912fc5419b7

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 21:32:17 +0000 (13:32 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into qt-dev am: bbcded2f6a -s ours
am: 70c79e56bd -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 0d7723d147 is in history

Change-Id: Ifbdb17bf91e24056ec0226d98fb869a557ae6e93

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 21:26:49 +0000 (13:26 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 981e2483c6 am: 4b700057ae -s ours am: b830f4e39c -s ours
am: db3402061d -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 9935f2ba7d is in history

Change-Id: I0f3149c5c7c95950e58d15040764ae1997cd9b7d

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 21:26:24 +0000 (13:26 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi-dev
am: 86a71f0ddd -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 0d7723d147 is in history

Change-Id: Ic84c24779b8a0ce8ea85a899b14b5cab979cd703

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 21:23:19 +0000 (13:23 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into qt-dev
am: bbcded2f6a -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 0d7723d147 is in history

Change-Id: I9577e51f124a7bb324d1923a7c58ab13441b7089

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 21:19:25 +0000 (13:19 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 981e2483c6 am: 4b700057ae -s ours
am: b830f4e39c -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 9935f2ba7d is in history

Change-Id: I34998950f7353d3820099e30823abd371de06cf4

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi-dev
TreeHugger Robot [Wed, 6 Nov 2019 21:15:03 +0000 (21:15 +0000)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi-dev

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 21:13:44 +0000 (13:13 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 981e2483c6
am: 4b700057ae -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 0d7723d147 is in history

Change-Id: I4e3cea1e80f91d5a7789fa5305a1fafea6690a70

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev
Ted Wang [Wed, 6 Nov 2019 21:08:00 +0000 (13:08 -0800)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev
am: 981e2483c6

Change-Id: Iba00aec2298d8b6522555a56ba02b3dba5b7de3b

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into qt-dev
TreeHugger Robot [Wed, 6 Nov 2019 21:07:05 +0000 (21:07 +0000)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into qt-dev

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc...
Ted Wang [Wed, 6 Nov 2019 18:27:12 +0000 (10:27 -0800)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-mr1-dev am: 82e29feb42 am: 0b3d1dd9a9 am: ea5f6b522e
am: 442dd7a5e6

Change-Id: Id4e46fd79d0a0f3af6e50e692b49e1d565abefdd

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc...
Ted Wang [Wed, 6 Nov 2019 18:21:20 +0000 (10:21 -0800)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-mr1-dev am: 82e29feb42 am: 0b3d1dd9a9
am: ea5f6b522e

Change-Id: Ib1374a76587575d7c34ea99e9c56ed900086dda0

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc...
Ted Wang [Wed, 6 Nov 2019 18:15:11 +0000 (10:15 -0800)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-mr1-dev am: 82e29feb42
am: 0b3d1dd9a9

Change-Id: I44d5112277d9f1c7e25c7872b79a8f8f03a3396e

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc...
Ted Wang [Wed, 6 Nov 2019 18:08:13 +0000 (10:08 -0800)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-mr1-dev
am: 82e29feb42

Change-Id: I6d685ffb735c1ff96224ec19d8eab569f4b2c2f2

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev
TreeHugger Robot [Wed, 6 Nov 2019 17:55:06 +0000 (17:55 +0000)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc...
TreeHugger Robot [Wed, 6 Nov 2019 17:48:42 +0000 (17:48 +0000)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-mr1-dev

4 years agoMerge "HFP: remove the dropped HF connection request message in btif connect_queue...
TreeHugger Robot [Fri, 25 Oct 2019 11:48:02 +0000 (11:48 +0000)]
Merge "HFP: remove the dropped HF connection request message in btif connect_queue and advance to the next scheduled connection request." into qt-qpr1-dev

4 years agoMerge "Prevent bluetooth native crash during failed security authentication" into...
TreeHugger Robot [Fri, 25 Oct 2019 11:38:32 +0000 (11:38 +0000)]
Merge "Prevent bluetooth native crash during failed security authentication" into qt-qpr1-dev

4 years agoHFP: remove the dropped HF connection request message in btif connect_queue and advan...
jonerlin [Mon, 23 Sep 2019 15:25:48 +0000 (23:25 +0800)]
HFP: remove the dropped HF connection request message in btif connect_queue and advance to the next scheduled connection request.

* hf connect-request message does not be handled in btif connect_queue when remote headset has already reconnected hfp, but it did not be removed, either.
it will make subsequent connecting request messsages blocked in btif connect_queue and never be handled.
* Add unit test for btif_profile_queue to verify the case when connect_cb() returns non BT_STATUS_SUCCESS

Bug: 140846154
Test: Connected 2 headset (HS1, HS2) -> Disable Bluetooth and Turn Off
HS2 ->  Enable Bluetooth and Turn On HS2 -> Check hfp and a2dp profole
state after HS2 connected

Change-Id: I503fba1975054efe3180ecf1f7daa917fb6edf99

4 years agoFix potential OOB write in btm_read_remote_ext_features_complete
Ted Wang [Fri, 4 Oct 2019 10:39:02 +0000 (18:39 +0800)]
Fix potential OOB write in btm_read_remote_ext_features_complete

Add event length check to avoid hci event sent from controller not
correct.
Add page number check to avoid page number is bigger than max page
number.

Bug: 141552859
Test: inject function
Merged-In: I3bd7349f382aa0e42123bbd835dcb60b77af099a
Change-Id: I3bd7349f382aa0e42123bbd835dcb60b77af099a

4 years agoFix potential OOB write in btm_read_remote_ext_features_complete
Ted Wang [Fri, 4 Oct 2019 10:39:02 +0000 (18:39 +0800)]
Fix potential OOB write in btm_read_remote_ext_features_complete

Add event length check to avoid hci event sent from controller not
correct.
Add page number check to avoid page number is bigger than max page
number.

Bug: 141552859
Test: inject function
Merged-In: I3bd7349f382aa0e42123bbd835dcb60b77af099a
Change-Id: I3bd7349f382aa0e42123bbd835dcb60b77af099a

4 years ago[system][bt] fix -Wdangling-gsl am: 20ed45d633 am: 2f0c176bad am: 2bcb84cd7d am:...
Nick Desaulniers [Wed, 16 Oct 2019 04:42:57 +0000 (21:42 -0700)]
[system][bt] fix -Wdangling-gsl am: 20ed45d633 am: 2f0c176bad am: 2bcb84cd7d am: 6c6ffc3d18 am: 9e474d2ee6
am: be1c9c3248

Change-Id: I25f8df91c9fb578829bafa44f9f0adfa7580c117

4 years agoMerge "resolve merge conflicts of 26513d4a93ed51c4b3e3c8608a28cbc41aba79ba to pi...
Martin Brabham [Wed, 16 Oct 2019 04:42:35 +0000 (21:42 -0700)]
Merge "resolve merge conflicts of 26513d4a93ed51c4b3e3c8608a28cbc41aba79ba to pi-dev" into pi-dev am: 01c69ce222 am: fee0b616ea
am: cdbe4a31bb

Change-Id: I4a1362cb21e95cecf271ab2d596168533aae99ef

4 years ago[system][bt] fix -Wdangling-gsl am: 20ed45d633 am: 2f0c176bad am: 2bcb84cd7d am:...
Nick Desaulniers [Wed, 16 Oct 2019 04:34:28 +0000 (21:34 -0700)]
[system][bt] fix -Wdangling-gsl am: 20ed45d633 am: 2f0c176bad am: 2bcb84cd7d am: 6c6ffc3d18
am: 9e474d2ee6

Change-Id: I343bab88804aed8f0120f6719e78dc633ff96f35

4 years ago[system][bt] fix -Wdangling-gsl am: 20ed45d633 am: 2f0c176bad am: 2bcb84cd7d
Nick Desaulniers [Wed, 16 Oct 2019 04:30:26 +0000 (21:30 -0700)]
[system][bt] fix -Wdangling-gsl am: 20ed45d633 am: 2f0c176bad am: 2bcb84cd7d
am: 6c6ffc3d18

Change-Id: I7d24cb7afab04cd92c526417930884ec133a0c4c

4 years agoMerge "resolve merge conflicts of 26513d4a93ed51c4b3e3c8608a28cbc41aba79ba to pi...
Martin Brabham [Wed, 16 Oct 2019 04:29:28 +0000 (21:29 -0700)]
Merge "resolve merge conflicts of 26513d4a93ed51c4b3e3c8608a28cbc41aba79ba to pi-dev" into pi-dev am: 01c69ce222
am: fee0b616ea

Change-Id: I738b73e6a8b5fff974f286168bc8ec9523501411

4 years ago[system][bt] fix -Wdangling-gsl am: 20ed45d633 am: 2f0c176bad
Nick Desaulniers [Wed, 16 Oct 2019 04:20:22 +0000 (21:20 -0700)]
[system][bt] fix -Wdangling-gsl am: 20ed45d633 am: 2f0c176bad
am: 2bcb84cd7d

Change-Id: I216e30fb5fb6ca5cadb7821d33825db4f197d087

4 years agoMerge "resolve merge conflicts of 26513d4a93ed51c4b3e3c8608a28cbc41aba79ba to pi...
Martin Brabham [Wed, 16 Oct 2019 04:20:22 +0000 (21:20 -0700)]
Merge "resolve merge conflicts of 26513d4a93ed51c4b3e3c8608a28cbc41aba79ba to pi-dev" into pi-dev
am: 01c69ce222

Change-Id: Ie358b950ce8488361da18d040d5e825eda79a795

4 years agoMerge "resolve merge conflicts of 26513d4a93ed51c4b3e3c8608a28cbc41aba79ba to pi...
Martin Brabham [Wed, 16 Oct 2019 03:10:24 +0000 (03:10 +0000)]
Merge "resolve merge conflicts of 26513d4a93ed51c4b3e3c8608a28cbc41aba79ba to pi-dev" into pi-dev

4 years ago[system][bt] fix -Wdangling-gsl am: 20ed45d633
Nick Desaulniers [Tue, 15 Oct 2019 21:31:31 +0000 (14:31 -0700)]
[system][bt] fix -Wdangling-gsl am: 20ed45d633
am: 2f0c176bad

Change-Id: I82b0d0a3b21111b8711d58609c3f70f4637bc74b

4 years ago[system][bt] fix -Wdangling-gsl
Nick Desaulniers [Tue, 15 Oct 2019 21:24:30 +0000 (14:24 -0700)]
[system][bt] fix -Wdangling-gsl
am: 20ed45d633

Change-Id: I9f59103dc40ae2154a2b2314d309ba0f7184376a

4 years agoFix potential OOB write in btm_read_remote_ext_features_complete
Ted Wang [Fri, 4 Oct 2019 10:39:02 +0000 (18:39 +0800)]
Fix potential OOB write in btm_read_remote_ext_features_complete

Add event length check to avoid hci event sent from controller not
correct.
Add page number check to avoid page number is bigger than max page
number.

Bug: 141552859
Test: inject function
Merged-In: I3bd7349f382aa0e42123bbd835dcb60b77af099a
Change-Id: I3bd7349f382aa0e42123bbd835dcb60b77af099a

4 years agoFix potential OOB write in btm_read_remote_ext_features_complete
Ted Wang [Fri, 4 Oct 2019 10:39:02 +0000 (18:39 +0800)]
Fix potential OOB write in btm_read_remote_ext_features_complete

Add event length check to avoid hci event sent from controller not
correct.
Add page number check to avoid page number is bigger than max page
number.

Bug: 141552859
Test: inject function
Merged-In: I3bd7349f382aa0e42123bbd835dcb60b77af099a
Change-Id: I3bd7349f382aa0e42123bbd835dcb60b77af099a

4 years ago[system][bt] fix -Wdangling-gsl
Nick Desaulniers [Thu, 10 Oct 2019 21:04:47 +0000 (14:04 -0700)]
[system][bt] fix -Wdangling-gsl

BtAddrString() returns a std::string. It's not safe to chain a call to
c_str() as otherwise the returned std::string is a temporary, and the
expression evaluates to an immediately dangling pointer.

Bug: 139945549
Bug: 142558228
Test: mm
Change-Id: I30972458abcc563b24ee0d80b289c3efd6c3e04d
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
4 years agoPrevent bluetooth native crash during failed security authentication
jonerlin [Tue, 27 Aug 2019 17:12:41 +0000 (01:12 +0800)]
Prevent bluetooth native crash during failed security authentication

* Use-after-free issue cause Bluetooth native crash during failed security authentication
* fixes a regression caused by commit SHA 26d629c

Bug: 137828534
Test: pair with Bluetooth keyboard/carkit -> input incorrect PIN code.
Change-Id: Ia1f7dad678fc71ebf4af6b943c6a9e6102e67592

4 years agoRevert "Confirm the presence of BT key when BT ON"
Martin Brabham [Fri, 4 Oct 2019 14:38:29 +0000 (07:38 -0700)]
Revert "Confirm the presence of BT key when BT ON"

This reverts commit bd8c5865c9991dd318c7ac47263b527ad7a4cd9b.

Bug: 139930706
Test: Manual
Change-Id: Ie80622782563bd38ee3421e7d3585ebd112482bf
(cherry picked from commit ae055008f4cc8e0a06dd9cf7a473d94b1c2bbcfd)

4 years agoresolve merge conflicts of 26513d4a93ed51c4b3e3c8608a28cbc41aba79ba to pi-dev
Martin Brabham [Wed, 2 Oct 2019 15:42:19 +0000 (08:42 -0700)]
resolve merge conflicts of 26513d4a93ed51c4b3e3c8608a28cbc41aba79ba to pi-dev

Test: I solemnly swear I tested this conflict resolution.
Bug: 110433804
Change-Id: I1ba3911607e587d13a69d2cfc4f8f905fe031141

4 years ago[automerger skipped] Merge "JustWorks: Auto-accept only incoming temporary pairing...
Martin Brabham [Thu, 3 Oct 2019 16:28:09 +0000 (09:28 -0700)]
[automerger skipped] Merge "JustWorks: Auto-accept only incoming temporary pairing." into pi-dev am: 6c603cedb5 -s ours am: 9665fdd556 -s ours
am: d9633df86a -s ours
am skip reason: change_id I4e3f39bc08e9d9493734a21ea29d76e43aeb50c8 with SHA1 a73dfccf32 is in history

Change-Id: I7684184f8ea9d2a038242c6c9f631c248eb34f64

4 years ago[automerger skipped] Merge "JustWorks: Auto-accept only incoming temporary pairing...
Martin Brabham [Thu, 3 Oct 2019 16:21:38 +0000 (09:21 -0700)]
[automerger skipped] Merge "JustWorks: Auto-accept only incoming temporary pairing." into pi-dev am: 6c603cedb5 -s ours
am: 9665fdd556 -s ours
am skip reason: change_id I4e3f39bc08e9d9493734a21ea29d76e43aeb50c8 with SHA1 a73dfccf32 is in history

Change-Id: I949ed3c2d0eff4f3613eb5210307d55d75622f08

4 years ago[automerger skipped] Merge "JustWorks: Auto-accept only incoming temporary pairing...
Martin Brabham [Thu, 3 Oct 2019 16:14:38 +0000 (09:14 -0700)]
[automerger skipped] Merge "JustWorks: Auto-accept only incoming temporary pairing." into pi-dev
am: 6c603cedb5 -s ours
am skip reason: change_id I4e3f39bc08e9d9493734a21ea29d76e43aeb50c8 with SHA1 a73dfccf32 is in history

Change-Id: I3becd255be392b7858a68302943deff735884477

4 years agoMerge "JustWorks: Auto-accept only incoming temporary pairing." into pi-dev
Martin Brabham [Thu, 3 Oct 2019 15:58:42 +0000 (15:58 +0000)]
Merge "JustWorks: Auto-accept only incoming temporary pairing." into pi-dev

4 years agoMerge "A2DP: Don't wait for role switch on a blacklisted device" into qt-r1-dev
Myles Watson [Thu, 3 Oct 2019 13:41:46 +0000 (06:41 -0700)]
Merge "A2DP: Don't wait for role switch on a blacklisted device" into qt-r1-dev
am: a051b3c8a5

Change-Id: Ifaeaf5ea9f1d766bfe3e918b4d6c623b696b6626

4 years agoMerge "A2DP: Don't wait for role switch on a blacklisted device" into qt-r1-dev
Myles Watson [Thu, 3 Oct 2019 13:30:48 +0000 (13:30 +0000)]
Merge "A2DP: Don't wait for role switch on a blacklisted device" into qt-r1-dev

4 years agoFix read out of bounds in BtifAvEvent::DeepCopy am: 8ac773aa5b am: ea54f0f392
Jakub Pawlowski [Thu, 3 Oct 2019 00:31:08 +0000 (17:31 -0700)]
Fix read out of bounds in BtifAvEvent::DeepCopy am: 8ac773aa5b am: ea54f0f392
am: 30247a50e7

Change-Id: Ib05141b588887bf52dd51010d37e0094938afa12

4 years agoFix read out of bounds in BtifAvEvent::DeepCopy am: 8ac773aa5b
Jakub Pawlowski [Thu, 3 Oct 2019 00:24:01 +0000 (17:24 -0700)]
Fix read out of bounds in BtifAvEvent::DeepCopy am: 8ac773aa5b
am: ea54f0f392

Change-Id: I6c2cd356b94f72d1718afc5764b74ebbffe00426

4 years agoFix read out of bounds in BtifAvEvent::DeepCopy
Jakub Pawlowski [Thu, 3 Oct 2019 00:16:01 +0000 (17:16 -0700)]
Fix read out of bounds in BtifAvEvent::DeepCopy
am: 8ac773aa5b

Change-Id: I7fdb4699d3aebaafe77e278786a8ddefbf0916f8

4 years agoJustWorks: Auto-accept only incoming temporary pairing.
Martin Brabham [Thu, 20 Jun 2019 15:59:24 +0000 (08:59 -0700)]
JustWorks: Auto-accept only incoming temporary pairing.

Bug: 110433804
Bug: 134461862
Test: Manual; atest net_test_bluetooth
Change-Id: I4e3f39bc08e9d9493734a21ea29d76e43aeb50c8
Merged-In: I4e3f39bc08e9d9493734a21ea29d76e43aeb50c8

4 years agoFix read out of bounds in BtifAvEvent::DeepCopy
Jakub Pawlowski [Wed, 2 Oct 2019 13:04:38 +0000 (15:04 +0200)]
Fix read out of bounds in BtifAvEvent::DeepCopy

Bug: 140768453
Change-Id: Ia05e12382ef78a3e07228d09bcf9347f9976bffd

4 years ago[automerger skipped] Revert "DO NOT MERGE: btif: require pairing dialog for JustWorks...
Martin Brabham [Wed, 2 Oct 2019 01:13:56 +0000 (18:13 -0700)]
[automerger skipped] Revert "DO NOT MERGE: btif: require pairing dialog for JustWorks SSP" am: caff42bd3c -s ours am: a3330ce66a
am: be1be9d6ce

Change-Id: I0f34367a11e23ed16c748f08f1a4d0a570bcccc9

4 years agoJustWorks: Auto-accept only incoming temporary pairing. am: a73dfccf32
Martin Brabham [Wed, 2 Oct 2019 01:13:34 +0000 (18:13 -0700)]
JustWorks: Auto-accept only incoming temporary pairing. am: a73dfccf32
am: ac0dc29844

Change-Id: Icfd485bf0948fdbc744b5e74dcf16bb8b12b1ab6

4 years agoJustWorks: Auto-accept only incoming temporary pairing. am: 10e15ee461
Martin Brabham [Wed, 2 Oct 2019 01:13:16 +0000 (18:13 -0700)]
JustWorks: Auto-accept only incoming temporary pairing. am: 10e15ee461
am: 103ba67ee2

Change-Id: I89a7a2650b3c4814a28c13a287722485d0b6eba7

4 years ago[automerger skipped] Revert "DO NOT MERGE: btif: require pairing dialog for JustWorks...
Martin Brabham [Wed, 2 Oct 2019 01:07:51 +0000 (18:07 -0700)]
[automerger skipped] Revert "DO NOT MERGE: btif: require pairing dialog for JustWorks SSP" am: caff42bd3c -s ours
am: a3330ce66a

Change-Id: I8d329840d1b0c168b5876c6cd85cd28fee0b5f72

4 years agoJustWorks: Auto-accept only incoming temporary pairing.
Martin Brabham [Wed, 2 Oct 2019 01:07:33 +0000 (18:07 -0700)]
JustWorks: Auto-accept only incoming temporary pairing.
am: a73dfccf32

Change-Id: If2371493e1dc6d0ac4d3be413c847f1a0a115ccd

4 years agoJustWorks: Auto-accept only incoming temporary pairing.
Martin Brabham [Wed, 2 Oct 2019 01:06:15 +0000 (18:06 -0700)]
JustWorks: Auto-accept only incoming temporary pairing.
am: 10e15ee461

Change-Id: I392280bb44e2ab665baeab5ef5f1e6b9323fe463

4 years ago[automerger skipped] Revert "DO NOT MERGE: btif: require pairing dialog for JustWorks...
Martin Brabham [Wed, 2 Oct 2019 01:06:08 +0000 (18:06 -0700)]
[automerger skipped] Revert "DO NOT MERGE: btif: require pairing dialog for JustWorks SSP"
am: caff42bd3c -s ours
am skip reason: subject contains skip directive

Change-Id: I28ca9e4d3b1995295a392f58f1e973e2212968ac

4 years agoA2DP: Don't wait for role switch on a blacklisted device
Cheney Ni [Wed, 25 Sep 2019 13:33:25 +0000 (21:33 +0800)]
A2DP: Don't wait for role switch on a blacklisted device

When there are 2 or more ACL links, we will try to be the master for
better link quality, and setup flags to wait for the following role
switch results. Because this is an asynchronous task, we would check
flags for any further actions. However, there would not be other results
for role switch IOP, and could be just ignored.

Bug: 141177108
Test: Add headset to IOP and do A2DP playback manually
Change-Id: I0d9e92968765365410909908ffcaf6dc81161ea0
Merged-In: I0d9e92968765365410909908ffcaf6dc81161ea0
(cherry picked from commit f11548248484e27044e3fc2b634db89a61eede05)

4 years agoRevert "DO NOT MERGE: btif: require pairing dialog for JustWorks SSP"
Martin Brabham [Sat, 8 Jun 2019 04:58:52 +0000 (04:58 +0000)]
Revert "DO NOT MERGE: btif: require pairing dialog for JustWorks SSP"

This reverts commit 26ba26be830f04e6fd9c77b075bcae48677d4cce.

Reason for revert: breaks tv UX
Bug: 110433804
Change-Id: I2c644ed62619f34494be0a0c7c75078cec0ebdd3

4 years agoJustWorks: Auto-accept only incoming temporary pairing.
Martin Brabham [Thu, 20 Jun 2019 15:59:24 +0000 (08:59 -0700)]
JustWorks: Auto-accept only incoming temporary pairing.

Bug: 110433804
Bug: 134461862
Test: Manual; atest net_test_bluetooth
Change-Id: I4e3f39bc08e9d9493734a21ea29d76e43aeb50c8
Merged-In: I4e3f39bc08e9d9493734a21ea29d76e43aeb50c8

4 years agoJustWorks: Auto-accept only incoming temporary pairing.
Martin Brabham [Thu, 20 Jun 2019 15:59:24 +0000 (08:59 -0700)]
JustWorks: Auto-accept only incoming temporary pairing.

Bug: 110433804
Bug: 134461862
Test: Manual; atest net_test_bluetooth
Change-Id: I4e3f39bc08e9d9493734a21ea29d76e43aeb50c8
Merged-In: I4e3f39bc08e9d9493734a21ea29d76e43aeb50c8

4 years ago[automerger skipped] Merge "Use memcpy instead of casting to convert device_class...
Rahul Sabnis [Sat, 28 Sep 2019 01:30:30 +0000 (18:30 -0700)]
[automerger skipped] Merge "Use memcpy instead of casting to convert device_class to int" into oc-dev am: ca7cd4593a am: 92b5515436 -s ours am: 81e5d13abe -s ours am: ec4d990050 -s ours am: 46737356e4 -s ours
am: 44e1d2b303 -s ours
am skip reason: change_id Iee71ce35576e438317841d41a81fda6a87e1984a with SHA1 ecf8f751b0 is in history

Change-Id: I802ce80c487aeff34ac9cbee57e41f879ef66b4b

4 years ago[automerger skipped] Merge "Use memcpy instead of casting to convert device_class...
Rahul Sabnis [Sat, 28 Sep 2019 01:23:59 +0000 (18:23 -0700)]
[automerger skipped] Merge "Use memcpy instead of casting to convert device_class to int" into oc-dev am: ca7cd4593a am: 92b5515436 -s ours am: 81e5d13abe -s ours am: ec4d990050 -s ours
am: 46737356e4 -s ours
am skip reason: change_id Iee71ce35576e438317841d41a81fda6a87e1984a with SHA1 ecf8f751b0 is in history

Change-Id: Ibcb246f3dc79f1c3134528a61c405fa4b475e559

4 years ago[automerger skipped] Merge "Use memcpy instead of casting to convert device_class...
Rahul Sabnis [Sat, 28 Sep 2019 01:16:58 +0000 (18:16 -0700)]
[automerger skipped] Merge "Use memcpy instead of casting to convert device_class to int" into oc-dev am: ca7cd4593a am: 92b5515436 -s ours am: 81e5d13abe -s ours
am: ec4d990050 -s ours
am skip reason: change_id Iee71ce35576e438317841d41a81fda6a87e1984a with SHA1 ecf8f751b0 is in history

Change-Id: I229bcea18a55e7c62cce886a13e6083ebe37dbc3