OSDN Git Service

android-x86/system-bt.git
4 years agoRootCanal: Add a scripted beacon for testing am: 544c47cef8 am: ea0dba8df8
Myles Watson [Mon, 11 May 2020 16:14:16 +0000 (16:14 +0000)]
RootCanal: Add a scripted beacon for testing am: 544c47cef8 am: ea0dba8df8

Change-Id: Icaa2b1d34196d7bc6181912308af6545e81b1318

4 years agoRootCanal: Add a scripted beacon for testing am: 544c47cef8
Myles Watson [Mon, 11 May 2020 15:57:05 +0000 (15:57 +0000)]
RootCanal: Add a scripted beacon for testing am: 544c47cef8

Change-Id: I33217ec8576702e377a3e5426ead41f2f2267c44

4 years agoRootCanal: Add a scripted beacon for testing
Myles Watson [Mon, 20 Apr 2020 22:57:07 +0000 (15:57 -0700)]
RootCanal: Add a scripted beacon for testing

Bug: 154491371
Tag: #feature
Test: Scan for devices
Test: gd/cert/run --host
Change-Id: I3354d621d4253d051eb7b814de8d7889dcf99f64

4 years agoAllow Java-land to request current track metadata through JNI am: d39a5ba44a am:...
Sal Savage [Fri, 8 May 2020 23:08:12 +0000 (23:08 +0000)]
Allow Java-land to request current track metadata through JNI am: d39a5ba44a am: 326b0662f0

Change-Id: I140859f44f40dc1d1c442fa0f586e1e8f525538a

4 years agoAllow Java-land to request current track metadata through JNI am: d39a5ba44a
Sal Savage [Fri, 8 May 2020 22:48:25 +0000 (22:48 +0000)]
Allow Java-land to request current track metadata through JNI am: d39a5ba44a

Change-Id: Ib6a0928f4c13e00781dd138b18f3c99d4772e216

4 years agoAllow Java-land to request current track metadata through JNI
Sal Savage [Thu, 30 Apr 2020 22:10:08 +0000 (15:10 -0700)]
Allow Java-land to request current track metadata through JNI

AVRCP Targets are not supposed to give image handles over with metadata
until an AVRCP BIP client connects from a particular controller. Because
this connection can happen any time and there's nothing forcing a target
to send us a track changed notification to inform us of the new handle,
the best thing we can do to work with all devices is to request it when
we connect on BIP. Otherwise, we risk a race condition between the BIP
connection and any amount of track changed notifications that might
happen organically. Our JNI doesn't current support requesting current
track metadata.

This change adds/implements a get_current_track_metadata() method to the
JNI. This, paired with a change in /packages/apps/Bluetooth/, fixes the
above mentioned race condition and keeps us from missing out on possible
cover art image handles.

Bug: 152655644
Test: Build, flash, test with AVRCP target cover art devices
Change-Id: I9d1f28068b4fded61d5336da8d864fbd9ef34f98
Merged-In: I9d1f28068b4fded61d5336da8d864fbd9ef34f98

4 years agoMerge "Check search state when cancel read remote name procedure" into rvc-dev am...
TreeHugger Robot [Wed, 6 May 2020 17:53:54 +0000 (17:53 +0000)]
Merge "Check search state when cancel read remote name procedure" into rvc-dev am: fd6bc2f4e1 am: c0865b3091

Change-Id: I549cf62ac1702699e137f504fc5f900da42cdcd0

4 years agoMerge "Check search state when cancel read remote name procedure" into rvc-dev am...
TreeHugger Robot [Wed, 6 May 2020 17:39:20 +0000 (17:39 +0000)]
Merge "Check search state when cancel read remote name procedure" into rvc-dev am: fd6bc2f4e1

Change-Id: I08afd971c1580eea0cdacd018c26fd5208b29e2d

4 years agoMerge "Check search state when cancel read remote name procedure" into rvc-dev
TreeHugger Robot [Wed, 6 May 2020 17:22:06 +0000 (17:22 +0000)]
Merge "Check search state when cancel read remote name procedure" into rvc-dev

4 years agoservice: A2DP source callback to query the preferred codec am: 1c682f8f22 am: af5c573229
Cheney Ni [Wed, 6 May 2020 09:15:06 +0000 (09:15 +0000)]
service: A2DP source callback to query the preferred codec am: 1c682f8f22 am: af5c573229

Change-Id: I23b7b53a55078996fa1e1da763e1c3ccffe8c9e6

4 years agoA2DP: Don't select disabled optional codecs when local SRC reconnecting am: 32379e306...
Cheney Ni [Wed, 6 May 2020 09:15:04 +0000 (09:15 +0000)]
A2DP: Don't select disabled optional codecs when local SRC reconnecting am: 32379e3062 am: c29443caa2

Change-Id: I19172d442031a1432e657f8b413ef210bb3f32ea

4 years agoservice: A2DP source callback to query the preferred codec am: 1c682f8f22
Cheney Ni [Wed, 6 May 2020 08:56:05 +0000 (08:56 +0000)]
service: A2DP source callback to query the preferred codec am: 1c682f8f22

Change-Id: I40971aebf892d508b125be82e5be36094608aa83

4 years agoA2DP: Don't select disabled optional codecs when local SRC reconnecting am: 32379e3062
Cheney Ni [Wed, 6 May 2020 08:56:02 +0000 (08:56 +0000)]
A2DP: Don't select disabled optional codecs when local SRC reconnecting am: 32379e3062

Change-Id: I2a8112143887448fc765bb44abc04130a1e22202

4 years agoservice: A2DP source callback to query the preferred codec
Cheney Ni [Tue, 5 May 2020 07:17:29 +0000 (15:17 +0800)]
service: A2DP source callback to query the preferred codec

In order to apply user's preferred codec while reconnecting, we need a
callback method to talk to Bluetooth stack whether the mandatory codec
has higher priority than others. This change implements a dummy method
in the fluoride service, so is working with the stack.

Bug: 134131114
Bug: 147572898
Test: bluetoothtbd_test
Change-Id: Ib99cf12eba85450526e22723d1509405469c2ebc
Merged-In: Ib99cf12eba85450526e22723d1509405469c2ebc
(cherry picked from commit 3254942410f182533675645392d7f72d14bf7543)

4 years agoA2DP: Don't select disabled optional codecs when local SRC reconnecting
Cheney Ni [Tue, 14 Apr 2020 06:25:20 +0000 (14:25 +0800)]
A2DP: Don't select disabled optional codecs when local SRC reconnecting

When local SRC is establishing a connection, the Bluetooth stack follows
those default priorities to choose a codec, and A2dpService needs to
judge again after this connection up event. If a user prefers the
mandatory codec, the peer state is OPEN -> RECONFIG -> OPEN which
is redundant but lousy. Since codecs preference is saved at the
upper-layer, this change queries the mandatory codec, and raises
the priority for more preferred codec while reconnecting from local.

Bug: 134131114
Bug: 147572898
Test: Local A2DP initializes connections
Change-Id: I110ffa463dd4c9ec62e18e1843b5aebc84d73093
Merged-In: I110ffa463dd4c9ec62e18e1843b5aebc84d73093
(cherry picked from commit 2fda2f0e415b2da9e7d5201bf8089492db88e73a)

4 years agoSet min_sdk_version to be part of mainline modules am: 5c54cb7229 am: 427dc2f752
Jooyung Han [Wed, 29 Apr 2020 16:13:53 +0000 (16:13 +0000)]
Set min_sdk_version to be part of mainline modules am: 5c54cb7229 am: 427dc2f752

Change-Id: I6bebd0ed6fe09d9e1f234b46ece34a39ab3ddb2b

4 years agoSet min_sdk_version to be part of mainline modules am: 5c54cb7229
Jooyung Han [Wed, 29 Apr 2020 15:58:20 +0000 (15:58 +0000)]
Set min_sdk_version to be part of mainline modules am: 5c54cb7229

Change-Id: I8e978818c51398d1177a8244eeab2814d3383c6d

4 years agoSet min_sdk_version to be part of mainline modules
Jooyung Han [Thu, 16 Apr 2020 09:48:33 +0000 (18:48 +0900)]
Set min_sdk_version to be part of mainline modules

Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Merged-In: Ifb9e0d4cd57a0e8212341cf493cd9fb20d0e264c
Change-Id: Ifb9e0d4cd57a0e8212341cf493cd9fb20d0e264c
(cherry picked from commit da09207b693706b0ed5cc2fef65401dbe972925e)

4 years agoMerge "Revert "Add min_sdk_version:R to updatable apexes"" into rvc-dev am: 563eb9062...
TreeHugger Robot [Wed, 29 Apr 2020 02:30:47 +0000 (02:30 +0000)]
Merge "Revert "Add min_sdk_version:R to updatable apexes"" into rvc-dev am: 563eb9062e am: 7848c46c16

Change-Id: I8bf6c724faa75fe96bebfb18f28dee3780b152d9

4 years agoMerge "Revert "Add min_sdk_version:R to updatable apexes"" into rvc-dev am: 563eb9062e
TreeHugger Robot [Wed, 29 Apr 2020 02:19:04 +0000 (02:19 +0000)]
Merge "Revert "Add min_sdk_version:R to updatable apexes"" into rvc-dev am: 563eb9062e

Change-Id: I7255c2c2a5cca7f9da34772af79709b4d0bd1f9c

4 years agoMerge "Revert "Add min_sdk_version:R to updatable apexes"" into rvc-dev
TreeHugger Robot [Wed, 29 Apr 2020 02:08:38 +0000 (02:08 +0000)]
Merge "Revert "Add min_sdk_version:R to updatable apexes"" into rvc-dev

4 years agoCheck search state when cancel read remote name procedure
cheng_cai [Tue, 14 Apr 2020 06:19:16 +0000 (14:19 +0800)]
Check search state when cancel read remote name procedure

Application may call cancel_discovery when the stack is doing
create_bond. The bonding process fails, because cancel_discovery
causes to cancel remote name request procedure.

Bug:154074383
Test: CtsVerifier->Bluetooth Test->Bluetooth HID Host
Change-Id: Icadf9abe342fffdf06b9623fb5c7e6de05a337bc
(cherry picked from commit e3f9fe7425705dc819a638c158ad9f87cb2bd1eb)

4 years agoRevert "Add min_sdk_version:R to updatable apexes"
Jooyung Han [Tue, 28 Apr 2020 18:07:40 +0000 (03:07 +0900)]
Revert "Add min_sdk_version:R to updatable apexes"

This reverts commit 971de2aa7e2227092051b32b3a805de3020ab74c.

Reason for revert: the BT apex is not yet updatable
Bug: 152655956
Test: m nothing
Change-Id: I91c516d4ce950ff2f70a1536152bac0cf878e919

Change-Id: I784c3ea6c6ebc95c6fce70dac76b90afc7d0bff6

4 years agoUpdate call of HAL 1.1 bluetooth HCI initialization am: 1f890d1b2f am: a76a58435c
Grzegorz Kołodziejczyk [Tue, 28 Apr 2020 17:30:00 +0000 (17:30 +0000)]
Update call of HAL 1.1 bluetooth HCI initialization am: 1f890d1b2f am: a76a58435c

Change-Id: Ibde26939b1762b40530fa633e495f533e3d8b141

4 years agoUpdate call of HAL 1.1 bluetooth HCI initialization am: 1f890d1b2f
Grzegorz Kołodziejczyk [Tue, 28 Apr 2020 17:18:05 +0000 (17:18 +0000)]
Update call of HAL 1.1 bluetooth HCI initialization am: 1f890d1b2f

Change-Id: If4d689cf7bca28ee2a78b6ab862136678fc1a6a9

4 years agoUpdate call of HAL 1.1 bluetooth HCI initialization
Grzegorz Kołodziejczyk [Tue, 28 Apr 2020 10:26:43 +0000 (10:26 +0000)]
Update call of HAL 1.1 bluetooth HCI initialization

Updates initialization call if HAL for bluetooth is 1.1

Bug: 144413056
Change-Id: I7d8ac8af74303d15f83c3dbaea784ec1ad7d54fa

4 years agoMerge "NIAP: remove keystore related code for now." into rvc-dev am: 0b50e98e5c am...
TreeHugger Robot [Thu, 23 Apr 2020 09:07:12 +0000 (09:07 +0000)]
Merge "NIAP: remove keystore related code for now." into rvc-dev am: 0b50e98e5c am: 82ebedd7fc

Change-Id: I3746f878ea074f64c8e4c7552a1c05dd36d8fc8c

4 years agoMerge "NIAP: remove keystore related code for now." into rvc-dev am: 0b50e98e5c
TreeHugger Robot [Thu, 23 Apr 2020 08:54:28 +0000 (08:54 +0000)]
Merge "NIAP: remove keystore related code for now." into rvc-dev am: 0b50e98e5c

Change-Id: Ie84d32d5ecdf898b2d67833ff1d778da64183d5e

4 years agoMerge "NIAP: remove keystore related code for now." into rvc-dev
TreeHugger Robot [Thu, 23 Apr 2020 08:42:17 +0000 (08:42 +0000)]
Merge "NIAP: remove keystore related code for now." into rvc-dev

4 years agoMerge "Fix bugprone-use-after-move warnings" into rvc-dev am: e4085fe54b am: c57dd1722d
TreeHugger Robot [Thu, 23 Apr 2020 00:17:27 +0000 (00:17 +0000)]
Merge "Fix bugprone-use-after-move warnings" into rvc-dev am: e4085fe54b am: c57dd1722d

Change-Id: I7f5491ad023c65b946d5eb5be0a74f497ba976aa

4 years agoMerge "Fix bugprone-use-after-move warnings" into rvc-dev am: e4085fe54b
TreeHugger Robot [Thu, 23 Apr 2020 00:02:35 +0000 (00:02 +0000)]
Merge "Fix bugprone-use-after-move warnings" into rvc-dev am: e4085fe54b

Change-Id: I333bb01ab29d54158216eceb74456bd10f55beea

4 years agoMerge "Fix bugprone-use-after-move warnings" into rvc-dev
TreeHugger Robot [Wed, 22 Apr 2020 23:52:11 +0000 (23:52 +0000)]
Merge "Fix bugprone-use-after-move warnings" into rvc-dev

4 years agoInto the BG connection when the HA disconnects from remote side am: 645730da0a am...
weichinweng [Wed, 22 Apr 2020 21:43:03 +0000 (21:43 +0000)]
Into the BG connection when the HA disconnects from remote side am: 645730da0a am: efaa7482dc

Change-Id: I149ff2621c5021ba0323847fe8bbbd0aa3633c69

4 years agoInto the BG connection when the HA disconnects from remote side am: 645730da0a
weichinweng [Wed, 22 Apr 2020 21:16:32 +0000 (21:16 +0000)]
Into the BG connection when the HA disconnects from remote side am: 645730da0a

Change-Id: Ifc4096e20f78405129188783e4d1bc136415fc5a

4 years agoInto the BG connection when the HA disconnects from remote side
weichinweng [Wed, 8 Apr 2020 08:41:19 +0000 (16:41 +0800)]
Into the BG connection when the HA disconnects from remote side

In some cases, it will add the random address into the BG connection
after the HA device is connected via a random address. Then the
ble_bgconn will add the public address into the controller white list if
the random address has the public address. Finally, it will get a second
connection handle with the public address on the same HearingAid device.
The patch changes the behavior that when the HearingAid device
disconnects from the remote side, add the device into the BG connection.

Bug: 152517031
Test: 1.run unit test.
2.Forget/Repair HearingAid device from Bluetooth UI.
3.Disconnect/Reconnect HearingAid device from Bluetooth UI.
4.HearingAid device power off/on, check them can reconnect.

Change-Id: Id491faeaddaa32bbea0c88c7f0563d299f7f33f8
Merged-In: Id491faeaddaa32bbea0c88c7f0563d299f7f33f8

4 years agoFix bugprone-use-after-move warnings
Chih-Hung Hsieh [Thu, 5 Mar 2020 23:17:42 +0000 (15:17 -0800)]
Fix bugprone-use-after-move warnings

Bug: 150783499
Test: TreeHugger
Change-Id: I004a4084f2d7ab1a1f2908e930a17527d3b0d0bf
Merged-In: I004a4084f2d7ab1a1f2908e930a17527d3b0d0bf

4 years agobtsnoop: Fix btsnoop_net runs unexpected am: dc57138de5 am: bc3e8a8ba1
KimJeongYeon [Tue, 21 Apr 2020 22:00:06 +0000 (22:00 +0000)]
btsnoop: Fix btsnoop_net runs unexpected am: dc57138de5 am: bc3e8a8ba1

Change-Id: Ia835bed90bed46db5d15d98c8428d71c94e8e709

4 years agobtsnoop: Fix btsnoop_net runs unexpected am: dc57138de5
KimJeongYeon [Tue, 21 Apr 2020 21:45:35 +0000 (21:45 +0000)]
btsnoop: Fix btsnoop_net runs unexpected am: dc57138de5

Change-Id: I5cfcf4f2da8145c3a5765f2f7c04a3ce5e2fd37e

4 years agobtsnoop: Fix btsnoop_net runs unexpected
KimJeongYeon [Tue, 10 Mar 2020 04:00:40 +0000 (13:00 +0900)]
btsnoop: Fix btsnoop_net runs unexpected

By default, btsnoop_net was disabled using "BT_NET_DEBUG" macro.
But, it enabled actually and manages socket connection for sending
btsnoop logs. The reason was, TRUE/FALSE macro were not defined.
This fix including "bt_types.h" to work macro properly.

Bug: 154647071
Test: Turn on btsnoop logging and observe btsnoop_net runs or not.

Signed-off-by: KimJeongYeon <jeongyeon.kim@samsung.com>
Change-Id: I595d06510170d27fbf81068fa7ce8769eabd0992
Merged-In: I595d06510170d27fbf81068fa7ce8769eabd0992
(cherry picked from commit bc6072c798a597624bda3e999c3432d384d851a0)

4 years agoMerge "Send the only song in queue as now playing song when get item attributes of...
TreeHugger Robot [Mon, 20 Apr 2020 14:55:54 +0000 (14:55 +0000)]
Merge "Send the only song in queue as now playing song when get item attributes of now playing" into rvc-dev am: b5693ec293 am: bd18879093

Change-Id: I788b17d1d3f0cc17c266f41bde2e3ac4ba68b9cd

4 years agoMerge "Send the only song in queue as now playing song when get item attributes of...
TreeHugger Robot [Mon, 20 Apr 2020 14:36:21 +0000 (14:36 +0000)]
Merge "Send the only song in queue as now playing song when get item attributes of now playing" into rvc-dev am: b5693ec293

Change-Id: I2dd5b9e6464982b31559e56466d268946a6f4d65

4 years agoMerge "Send the only song in queue as now playing song when get item attributes of...
TreeHugger Robot [Mon, 20 Apr 2020 14:13:41 +0000 (14:13 +0000)]
Merge "Send the only song in queue as now playing song when get item attributes of now playing" into rvc-dev

4 years agoA2DP: Fix integer sanitizer in SBC encoder am: 7f973d8726 am: 1d7b8c033d
Cheney Ni [Mon, 20 Apr 2020 13:38:48 +0000 (13:38 +0000)]
A2DP: Fix integer sanitizer in SBC encoder am: 7f973d8726 am: 1d7b8c033d

Change-Id: I3f246c1307688f2d700cd87377afe6faafb5c6a0

4 years agoA2DP: Fix integer sanitizer in SBC encoder am: 7f973d8726
Cheney Ni [Mon, 20 Apr 2020 13:13:45 +0000 (13:13 +0000)]
A2DP: Fix integer sanitizer in SBC encoder am: 7f973d8726

Change-Id: I73787acdbe3b951a7a3239a4301c77deaf206262

4 years ago[automerger skipped] DO NOT MERGE Check a2dp packet length is zero am: d61cf5fe04...
Chris Manton [Fri, 17 Apr 2020 20:08:06 +0000 (20:08 +0000)]
[automerger skipped] DO NOT MERGE Check a2dp packet length is zero am: d61cf5fe04 -s ours am: 73c855ec7c -s ours

am skip reason: Change-Id I105b445293c02cb4f37c759fd5b05758fd4e3646 with SHA-1 96392b0f2c is in history

Change-Id: I3e9ea2eed13f7131b706cfda699f4386b2e5d92c

4 years ago[automerger skipped] DO NOT MERGE Check a2dp packet length is zero am: d61cf5fe04...
Chris Manton [Fri, 17 Apr 2020 19:46:50 +0000 (19:46 +0000)]
[automerger skipped] DO NOT MERGE Check a2dp packet length is zero am: d61cf5fe04 -s ours

am skip reason: Change-Id I105b445293c02cb4f37c759fd5b05758fd4e3646 with SHA-1 96392b0f2c is in history

Change-Id: I588fee43c2c097a38a1f14e9f201e6e69e0dafa6

4 years agoA2DP: Fix integer sanitizer in SBC encoder
Cheney Ni [Sat, 11 Apr 2020 21:19:31 +0000 (05:19 +0800)]
A2DP: Fix integer sanitizer in SBC encoder

There were three potential integer overflow within SBC software encoder:

* embdrv/sbc/encoder/srce/sbc_packing.c:144:38: runtime error: unsigned
  integer overflow: 4294967231 + 8192 cannot be represented in type
  'unsigned int'
* embdrv/sbc/encoder/srce/sbc_packing.c:147:9: runtime error: signed
  integer overflow: 37932 * 65535 cannot be represented in type 'int'
* embdrv/sbc/encoder/srce/sbc_packing.c:147:9: runtime error: signed
  integer overflow: 178177545 + 2146959360 cannot be represented in type
  'int'

They were caught by the integer sanitizer, and

1. (*ps32SbPtr >> 2) is either greater than 0xFF00,0000 or less than
   0x007F,FFFF, so just cast to a signed integer explicitly.
2. Positive integer between 0x8000,0000 ~ 0xFFFF,FFFF can't be
   represented in type 'int', but is still feasible in 32-bits.
3. s32OutLow is the lower byte of a 64 bits integer, but can't have the
   carry values which is only for the higher byte.

This change gives the compiler a signed 64-bits variable, and trusts it
to do better optimization at multiplication.

Bug: 153402404
Test: make sure there are no integer sanitization errors.
Change-Id: I5046a42f9927c1aa7c25da2828c4f921ba7a5021
Merged-In: I5046a42f9927c1aa7c25da2828c4f921ba7a5021
(cherry picked from commit a42db783434da238e4daade95ce2adb1bca0f138)

4 years agoDO NOT MERGE Check a2dp packet length is zero
Chris Manton [Tue, 10 Mar 2020 15:59:02 +0000 (08:59 -0700)]
DO NOT MERGE Check a2dp packet length is zero

already in master

Bug: 142546668
Test: net_test_stack_a2dp_native

Change-Id: I105b445293c02cb4f37c759fd5b05758fd4e3646
Merged-In: I105b445293c02cb4f37c759fd5b05758fd4e3646
(cherry picked from commit 96392b0f2cfb2adc72cc7cad0d74dec8f4041582)

4 years agoNIAP: remove keystore related code for now.
weichinweng [Fri, 17 Apr 2020 10:27:44 +0000 (18:27 +0800)]
NIAP: remove keystore related code for now.

Since we need to use keystore function on JAVA layer. Remove keystore
related code for now.

Bug: 148758680
Test: m
Change-Id: I642078f11cdb858a739abe4ad69c36060ad0f99c
Merged-In: I642078f11cdb858a739abe4ad69c36060ad0f99c

4 years agoRevert "Mark updatable APEXes" am: e3ff9a59f8 am: 673dd4a74b
Jiyong Park [Fri, 17 Apr 2020 06:01:01 +0000 (06:01 +0000)]
Revert "Mark updatable APEXes" am: e3ff9a59f8 am: 673dd4a74b

Change-Id: Ic874f835784e12c6aeb65a07bb3dcf9ffbe515f4

4 years agoRevert "Mark updatable APEXes" am: e3ff9a59f8
Jiyong Park [Fri, 17 Apr 2020 05:36:42 +0000 (05:36 +0000)]
Revert "Mark updatable APEXes" am: e3ff9a59f8

Change-Id: Iaba5dc471efa3997d3444ff5d106d34136b182e2

4 years agoRevert "Mark updatable APEXes"
Jiyong Park [Fri, 17 Apr 2020 03:55:59 +0000 (03:55 +0000)]
Revert "Mark updatable APEXes"

This reverts commit f3d123910b4c899b3aed8d82272fa5d24b6dc426.

Reason for revert: the BT apex is not yet updatable
Bug: 149805758
Test: m
Change-Id: I92cf6ac12f989726a797fec6a0c0f121346c188e

4 years agoSend the only song in queue as now playing song when get item attributes
Ted Wang [Thu, 26 Mar 2020 10:11:26 +0000 (18:11 +0800)]
Send the only song in queue as now playing song when get item attributes
of now playing

Bug: 152007084
Test: Manully
Change-Id: I1d31612f20fe21e8364c578718ca282eeb75eac0
Merged-In: I1d31612f20fe21e8364c578718ca282eeb75eac0

4 years agoMerge "Fix potential OOB vulnerability when SBC framedata is prefetched" into rvc...
Joseph Pirozzo [Tue, 14 Apr 2020 23:38:17 +0000 (23:38 +0000)]
Merge "Fix potential OOB vulnerability when SBC framedata is prefetched" into rvc-dev am: 633b811269 am: c920ff763c

Change-Id: I3dd30ac58010f7ff00f8c7bd7f734573bb2b7bf5

4 years agoMerge "Fix potential OOB vulnerability when SBC framedata is prefetched" into rvc...
Joseph Pirozzo [Tue, 14 Apr 2020 23:12:07 +0000 (23:12 +0000)]
Merge "Fix potential OOB vulnerability when SBC framedata is prefetched" into rvc-dev am: 633b811269

Change-Id: Ibe7ea77fb263d5571ac141f02136fb0dd0943e37

4 years agoMerge "Fix potential OOB vulnerability when SBC framedata is prefetched" into rvc-dev
Joseph Pirozzo [Tue, 14 Apr 2020 22:58:56 +0000 (22:58 +0000)]
Merge "Fix potential OOB vulnerability when SBC framedata is prefetched" into rvc-dev

4 years agoMerge "AVCRP Controller support Get Item Attributes" into rvc-dev am: 6c8e7b0de3...
Sal Savage [Tue, 14 Apr 2020 20:18:03 +0000 (20:18 +0000)]
Merge "AVCRP Controller support Get Item Attributes" into rvc-dev am: 6c8e7b0de3 am: 12f9f2cbeb

Change-Id: Iac78aadfbfef2937c61e6e5029909836235b0a7b

4 years agoMerge "AVCRP Controller support Get Item Attributes" into rvc-dev am: 6c8e7b0de3
Sal Savage [Tue, 14 Apr 2020 19:42:56 +0000 (19:42 +0000)]
Merge "AVCRP Controller support Get Item Attributes" into rvc-dev am: 6c8e7b0de3

Change-Id: I38e422ed3001cde8351e12ca6ff569aa70aa3a80

4 years agoMerge "AVCRP Controller support Get Item Attributes" into rvc-dev
Sal Savage [Tue, 14 Apr 2020 19:22:21 +0000 (19:22 +0000)]
Merge "AVCRP Controller support Get Item Attributes" into rvc-dev

4 years agoA2DP: Wait for previous AVDTP instance to be clean up before re-enabling am: f2cf5ebc...
Cheney Ni [Tue, 14 Apr 2020 15:20:56 +0000 (15:20 +0000)]
A2DP: Wait for previous AVDTP instance to be clean up before re-enabling am: f2cf5ebc7f am: bbfc268097

Change-Id: Ib240e74a968f6ec0d8cd0582cff4c899be49676a

4 years agoA2DP: Workaround to clean up previous AVDTP instance while re-enabling am: 3537765c21...
Cheney Ni [Tue, 14 Apr 2020 15:20:54 +0000 (15:20 +0000)]
A2DP: Workaround to clean up previous AVDTP instance while re-enabling am: 3537765c21 am: 9bf95b614a

Change-Id: I04a2d13557b5ad8612a9044a1dfb52249d79500d

4 years agoA2DP: Be more careful in allocating a BtifAvPeer instance am: f92966049c am: 250f99a734
Cheney Ni [Tue, 14 Apr 2020 15:20:52 +0000 (15:20 +0000)]
A2DP: Be more careful in allocating a BtifAvPeer instance am: f92966049c am: 250f99a734

Change-Id: I19c3dbcf2bc4f518af5f9180d74a12d82f61e059

4 years agoA2DP: Wait for previous AVDTP instance to be clean up before re-enabling am: f2cf5ebc7f
Cheney Ni [Tue, 14 Apr 2020 15:00:13 +0000 (15:00 +0000)]
A2DP: Wait for previous AVDTP instance to be clean up before re-enabling am: f2cf5ebc7f

Change-Id: I76f4fa637fd61030ed2c7d80792b40221b463983

4 years agoA2DP: Workaround to clean up previous AVDTP instance while re-enabling am: 3537765c21
Cheney Ni [Tue, 14 Apr 2020 15:00:10 +0000 (15:00 +0000)]
A2DP: Workaround to clean up previous AVDTP instance while re-enabling am: 3537765c21

Change-Id: I88d4af5d20cf09bbc973d646aaaee8ddfd668877

4 years agoA2DP: Be more careful in allocating a BtifAvPeer instance am: f92966049c
Cheney Ni [Tue, 14 Apr 2020 15:00:07 +0000 (15:00 +0000)]
A2DP: Be more careful in allocating a BtifAvPeer instance am: f92966049c

Change-Id: I98c77dadc9031c78a0f319485d8811ff3403f164

4 years agoA2DP: Wait for previous AVDTP instance to be clean up before re-enabling
Cheney Ni [Wed, 19 Feb 2020 09:41:59 +0000 (17:41 +0800)]
A2DP: Wait for previous AVDTP instance to be clean up before re-enabling

Because more connections spend more time to disconnect, the stack may
still be busy at disabling AVDTP, if we re-enable the A2dpService
quickly. This change will defer BTA_AV_API_ENABLE and BTA_AV_API_REG
events if the stack is still disabling the previous instance, so gives
the stack half more seconds to handle its previous task.

Bug: 135655859
Test: manually
Change-Id: I8e700ce195aa634819ea1ad8cf5892cc35669e10
Merged-In: I8e700ce195aa634819ea1ad8cf5892cc35669e10
(cherry picked from commit 21fe257db23887b3000a6c8d38ee339fcccbdc2b)

4 years agoA2DP: Workaround to clean up previous AVDTP instance while re-enabling
Cheney Ni [Wed, 18 Mar 2020 08:37:29 +0000 (16:37 +0800)]
A2DP: Workaround to clean up previous AVDTP instance while re-enabling

If the user disables and re-enables A2dpService quickly, the stack has
chances to be still busy at dropping those out-of-date links, and this
is highly dependent on the handset. If the handset responds more slowly, it
spends more time to disable, but causes the new AVDTP instance won't
work. This change checks the previous disabling flag, and cleans up the
old instance up before re-enabling.

Bug: 135655859
Test: manually
Change-Id: I625cfffab6d4df327fb8159aa4b759a09d90e076
Merged-In: I625cfffab6d4df327fb8159aa4b759a09d90e076
(cherry picked from commit 07689d65f4c6fbc8b20dd0890657936fc6d6cb7b)

4 years agoA2DP: Be more careful in allocating a BtifAvPeer instance
Cheney Ni [Fri, 27 Mar 2020 03:54:28 +0000 (11:54 +0800)]
A2DP: Be more careful in allocating a BtifAvPeer instance

While a new peer is coming either by in-coming or out-going connection,
the stack first tries to find or create an associated BtifAvPeer object
for it, but uses an unknown BTA handle if BTA_AV is still registering.
This handle will be updated after BTA_AV registered, but causes
a mismatch in the handle usage between BTIF and BTA layers since the
register process just finished. This change disallows to use an unknown
BTA handle, so it prevents such abnormal cases. Besides, it adds more
log messages about BTA_AV registering, and also makes sure the disabling
flag won't be activated after disabled.

Bug: 135655859
Bug: 152597903
Test: Switch BT state quickly between STATE_BLE_ON and STATE_ON
Change-Id: I9df3d64f301dffbecdeaf3de18dd455be1c63ce2
Merged-In: I9df3d64f301dffbecdeaf3de18dd455be1c63ce2
(cherry picked from commit 714e639cb7291ecfb9feb12acad9bc7c8f455ba0)

4 years agoAVCRP Controller support Get Item Attributes
Sal Savage [Tue, 3 Mar 2020 22:43:06 +0000 (14:43 -0800)]
AVCRP Controller support Get Item Attributes

Add support for the GetItemAttributes command when the browsing chanel
is connected.

Bug: 149411071
Test: Play a song from a paired phone compare metadata and HCI logs.
Change-Id: I0ac3c3bb7c9d1c3c72f0e2bad13d276c836ecf6f
Merged-In: I0ac3c3bb7c9d1c3c72f0e2bad13d276c836ecf6f

4 years agoFix potential OOB vulnerability when SBC framedata is prefetched
Joseph Pirozzo [Tue, 31 Mar 2020 20:57:21 +0000 (13:57 -0700)]
Fix potential OOB vulnerability when SBC framedata is prefetched

Macros were filling a value buffer when reading bit stream data in
advance of any fetch being called, updated to only fetch data into
buffer when needed.

Bug: 110107252
Bug: 146032016
Bug: 146398979
Test: sbcdecoder_fuzzer
Change-Id: Ibb7793c9a015eaddcc8faa6ccfd8ec998d03ed86

4 years ago[automerger skipped] Merge "Check a2dp packet length is zero" into qt-dev am: c909de6...
Sterling Huber [Thu, 9 Apr 2020 18:10:49 +0000 (18:10 +0000)]
[automerger skipped] Merge "Check a2dp packet length is zero" into qt-dev am: c909de62bf -s ours am: db1917d8ae am: e134c6f179 am: 954d24628c

Change-Id: Ie5b08dc90b7a96856dc448df3bd1c55fd6f0a3aa

4 years ago[automerger skipped] Merge "Check a2dp packet length is zero" into qt-dev am: c909de6...
Sterling Huber [Thu, 9 Apr 2020 17:54:09 +0000 (17:54 +0000)]
[automerger skipped] Merge "Check a2dp packet length is zero" into qt-dev am: c909de62bf -s ours am: db1917d8ae am: e134c6f179

Change-Id: I7b59a34358ec5178219188a0158e66ab05133850

4 years ago[automerger skipped] Merge "Check a2dp packet length is zero" into qt-dev am: c909de6...
Sterling Huber [Thu, 9 Apr 2020 17:39:35 +0000 (17:39 +0000)]
[automerger skipped] Merge "Check a2dp packet length is zero" into qt-dev am: c909de62bf -s ours am: db1917d8ae

Change-Id: Id1c8c3155d96ee1e050dd1d308ebeca838a22c8e

4 years ago[automerger skipped] Merge "Check a2dp packet length is zero" into qt-dev am: c909de6...
Sterling Huber [Thu, 9 Apr 2020 17:17:37 +0000 (17:17 +0000)]
[automerger skipped] Merge "Check a2dp packet length is zero" into qt-dev am: c909de62bf -s ours

am skip reason: skipped by user cmanton

Change-Id: I8ff4f933b88c68473b378d0894b89ae8b10431fd

4 years agoMerge "btm: fixing oob write in multi-adv SetData." into qt-qpr1-dev am: aeeb427c94...
TreeHugger Robot [Wed, 8 Apr 2020 17:42:37 +0000 (17:42 +0000)]
Merge "btm: fixing oob write in multi-adv SetData." into qt-qpr1-dev am: aeeb427c94 am: 873f23b9be am: e13e9a5629

Change-Id: I42f605074ad336f490976d5d3bc4584ab9dcb169

4 years agoMerge "btm: fixing oob write in multi-adv SetData." into qt-qpr1-dev am: aeeb427c94...
TreeHugger Robot [Wed, 8 Apr 2020 17:24:04 +0000 (17:24 +0000)]
Merge "btm: fixing oob write in multi-adv SetData." into qt-qpr1-dev am: aeeb427c94 am: 873f23b9be

Change-Id: I8a6ea3ad108de14fe22ccdff10e5b52d217b99ad

4 years agoMerge "btm: fixing oob write in multi-adv SetData." into qt-qpr1-dev am: aeeb427c94
TreeHugger Robot [Wed, 8 Apr 2020 17:00:45 +0000 (17:00 +0000)]
Merge "btm: fixing oob write in multi-adv SetData." into qt-qpr1-dev am: aeeb427c94

Change-Id: Ibb621c8984997088b6ec96cc61fc65733e73c673

4 years agoMerge "btm: fixing oob write in multi-adv SetData." into qt-qpr1-dev
TreeHugger Robot [Wed, 8 Apr 2020 16:40:55 +0000 (16:40 +0000)]
Merge "btm: fixing oob write in multi-adv SetData." into qt-qpr1-dev

4 years ago[automerger skipped] Fix potential stack overflow caused by integer overflow am:...
Jakub Pawlowski [Wed, 8 Apr 2020 00:37:14 +0000 (00:37 +0000)]
[automerger skipped] Fix potential stack overflow caused by integer overflow am: 1570b62c88 am: 5b4bf745e9 am: 6360e91bb3 am: 3cd74938d8 -s ours am: db0c360dce -s ours am: ca7a1eabe0 -s ours am: 67fa765f93 -s ours am: 7b4660ebc8 -s ours

am skip reason: Change-Id I0655b0b62301f78cd8705cc7b0e4fc11522f00ca with SHA-1 ec0d507ed2 is in history

Change-Id: I2a4dfc211b59fcd6f22dc048492ae36aed5d74f3

4 years ago[automerger skipped] Fix potential stack overflow caused by integer overflow am:...
Jakub Pawlowski [Wed, 8 Apr 2020 00:24:50 +0000 (00:24 +0000)]
[automerger skipped] Fix potential stack overflow caused by integer overflow am: 1570b62c88 am: 5b4bf745e9 am: 6360e91bb3 am: 3cd74938d8 -s ours am: db0c360dce -s ours am: ca7a1eabe0 -s ours am: 67fa765f93 -s ours

am skip reason: Change-Id I0655b0b62301f78cd8705cc7b0e4fc11522f00ca with SHA-1 ec0d507ed2 is in history

Change-Id: Id21decf03db19bd2e9d771268bf21378ef92f6d2

4 years agoMerge "Check a2dp packet length is zero" into qt-dev
Sterling Huber [Wed, 8 Apr 2020 00:13:33 +0000 (00:13 +0000)]
Merge "Check a2dp packet length is zero" into qt-dev

4 years ago[automerger skipped] Fix potential stack overflow caused by integer overflow am:...
Jakub Pawlowski [Wed, 8 Apr 2020 00:10:53 +0000 (00:10 +0000)]
[automerger skipped] Fix potential stack overflow caused by integer overflow am: 1570b62c88 am: 5b4bf745e9 am: 6360e91bb3 am: 3cd74938d8 -s ours am: db0c360dce -s ours am: ca7a1eabe0 -s ours

am skip reason: Change-Id I0655b0b62301f78cd8705cc7b0e4fc11522f00ca with SHA-1 ec0d507ed2 is in history

Change-Id: Id31d6d296c0c76921d0b581362e7e1e0a75f7f48

4 years ago[automerger skipped] Fix potential stack overflow caused by integer overflow am:...
Jakub Pawlowski [Tue, 7 Apr 2020 23:50:35 +0000 (23:50 +0000)]
[automerger skipped] Fix potential stack overflow caused by integer overflow am: 1570b62c88 am: 5b4bf745e9 am: 6360e91bb3 am: 3cd74938d8 -s ours am: db0c360dce -s ours

am skip reason: Change-Id I0655b0b62301f78cd8705cc7b0e4fc11522f00ca with SHA-1 ec0d507ed2 is in history

Change-Id: I2748027eb3a50e6ed5130be43861fa69d794bee8

4 years ago[automerger skipped] Fix potential stack overflow caused by integer overflow am:...
Jakub Pawlowski [Tue, 7 Apr 2020 23:38:36 +0000 (23:38 +0000)]
[automerger skipped] Fix potential stack overflow caused by integer overflow am: 1570b62c88 am: 5b4bf745e9 am: 6360e91bb3 am: 3cd74938d8 -s ours

am skip reason: Change-Id I0655b0b62301f78cd8705cc7b0e4fc11522f00ca with SHA-1 ec0d507ed2 is in history

Change-Id: Ife4a1d737088dbf51ac29f0a6411d9468b456593

4 years agoFix potential stack overflow caused by integer overflow am: 1570b62c88 am: 5b4bf745e9...
Jakub Pawlowski [Tue, 7 Apr 2020 23:24:21 +0000 (23:24 +0000)]
Fix potential stack overflow caused by integer overflow am: 1570b62c88 am: 5b4bf745e9 am: 6360e91bb3

Change-Id: I1e23e75fd05e41b9cd31bb93b945135bef21c04f

4 years ago[automerger skipped] Fix potential stack overflow caused by integer overflow am:...
Jakub Pawlowski [Tue, 7 Apr 2020 23:09:39 +0000 (23:09 +0000)]
[automerger skipped] Fix potential stack overflow caused by integer overflow am: ec0d507ed2 am: 8ccc0c8d5f -s ours am: 7a1190ef0c -s ours am: 35d64d233a -s ours

am skip reason: Change-Id I0655b0b62301f78cd8705cc7b0e4fc11522f00ca with SHA-1 4c0c93eb61 is in history

Change-Id: I18b21203e19f8fbf20bec44229d12eef00fc7583

4 years agoFix potential stack overflow caused by integer overflow am: 1570b62c88 am: 5b4bf745e9
Jakub Pawlowski [Tue, 7 Apr 2020 23:09:11 +0000 (23:09 +0000)]
Fix potential stack overflow caused by integer overflow am: 1570b62c88 am: 5b4bf745e9

Change-Id: I91417fff40a89042993a9fcbfaa6b7f45c162d89

4 years ago[automerger skipped] Fix potential stack overflow caused by integer overflow am:...
Jakub Pawlowski [Tue, 7 Apr 2020 22:55:20 +0000 (22:55 +0000)]
[automerger skipped] Fix potential stack overflow caused by integer overflow am: ec0d507ed2 am: 8ccc0c8d5f -s ours am: 7a1190ef0c -s ours

am skip reason: Change-Id I0655b0b62301f78cd8705cc7b0e4fc11522f00ca with SHA-1 4c0c93eb61 is in history

Change-Id: I696b3093d3452bd25c592ddb226a2e8aabf70139

4 years agoFix potential stack overflow caused by integer overflow am: 1570b62c88
Jakub Pawlowski [Tue, 7 Apr 2020 22:51:21 +0000 (22:51 +0000)]
Fix potential stack overflow caused by integer overflow am: 1570b62c88

Change-Id: Iaf75d5b63297d50e3115422f15fa8511133ef45a

4 years ago[automerger skipped] Fix potential stack overflow caused by integer overflow am:...
Jakub Pawlowski [Tue, 7 Apr 2020 22:43:47 +0000 (22:43 +0000)]
[automerger skipped] Fix potential stack overflow caused by integer overflow am: ec0d507ed2 am: 8ccc0c8d5f -s ours

am skip reason: Change-Id I0655b0b62301f78cd8705cc7b0e4fc11522f00ca with SHA-1 4c0c93eb61 is in history

Change-Id: I2d54dc3becde918d809bfc2f970bc192bb562b1b

4 years agoFix potential stack overflow caused by integer overflow am: ec0d507ed2
Jakub Pawlowski [Tue, 7 Apr 2020 22:31:00 +0000 (22:31 +0000)]
Fix potential stack overflow caused by integer overflow am: ec0d507ed2

Change-Id: Ia8ae7d5d144e3a5e94728dc236d9e7af6ddd3dd2

4 years agoCheck a2dp packet length is zero
Chris Manton [Tue, 10 Mar 2020 15:59:02 +0000 (08:59 -0700)]
Check a2dp packet length is zero

Bug: 142546668
Test: net_test_stack_a2dp_native

Change-Id: I105b445293c02cb4f37c759fd5b05758fd4e3646
Merged-In: I105b445293c02cb4f37c759fd5b05758fd4e3646

4 years agoMerge "Remove BTA_HF_CLIENT_SCO_LISTEN_E fallthrough" into rvc-dev am: a1d7af831b...
Joseph Pirozzo [Tue, 7 Apr 2020 19:54:31 +0000 (19:54 +0000)]
Merge "Remove BTA_HF_CLIENT_SCO_LISTEN_E fallthrough" into rvc-dev am: a1d7af831b am: beea398858

Change-Id: Iaaed78e91cd666eefd2454a9d4b102eaa461ebec

4 years agoMerge "Remove BTA_HF_CLIENT_SCO_LISTEN_E fallthrough" into rvc-dev am: a1d7af831b
Joseph Pirozzo [Tue, 7 Apr 2020 19:40:22 +0000 (19:40 +0000)]
Merge "Remove BTA_HF_CLIENT_SCO_LISTEN_E fallthrough" into rvc-dev am: a1d7af831b

Change-Id: Ic108c9fe910a2c877c1c1d16a95b4089c4a1ad7a

4 years agoMerge "Remove BTA_HF_CLIENT_SCO_LISTEN_E fallthrough" into rvc-dev
Joseph Pirozzo [Tue, 7 Apr 2020 19:32:41 +0000 (19:32 +0000)]
Merge "Remove BTA_HF_CLIENT_SCO_LISTEN_E fallthrough" into rvc-dev

4 years agoFix potential stack overflow caused by integer overflow am: 4c0c93eb61 am: b0a2c73279
Jakub Pawlowski [Tue, 7 Apr 2020 19:29:09 +0000 (19:29 +0000)]
Fix potential stack overflow caused by integer overflow am: 4c0c93eb61 am: b0a2c73279

Change-Id: I99741f34d7b6585a78f786eb57925d1112f7fffd

4 years agoFix potential stack overflow caused by integer overflow am: 4c0c93eb61
Jakub Pawlowski [Tue, 7 Apr 2020 19:17:17 +0000 (19:17 +0000)]
Fix potential stack overflow caused by integer overflow am: 4c0c93eb61

Change-Id: I4996d5fa51f94a588e9f8c22bb8338668de2b21b

4 years agoFix potential stack overflow caused by integer overflow
Jakub Pawlowski [Mon, 16 Mar 2020 11:09:15 +0000 (12:09 +0100)]
Fix potential stack overflow caused by integer overflow

Bug: 151155194
Change-Id: I0655b0b62301f78cd8705cc7b0e4fc11522f00ca

4 years agoRemove BTA_HF_CLIENT_SCO_LISTEN_E fallthrough
Joseph Pirozzo [Tue, 7 Apr 2020 16:00:03 +0000 (09:00 -0700)]
Remove BTA_HF_CLIENT_SCO_LISTEN_E fallthrough

Remove unintended fallthrough.
Bug: 143901894
Test: connect SCO from both HF and AG.

Change-Id: Ifa5363479d4c844ed0b6a8585c25147b23156599
Merged-In: Ifa5363479d4c844ed0b6a8585c25147b23156599

4 years agoMerge "A2DP: Do the connection task in the stack main thread" into rvc-dev am: 145214...
TreeHugger Robot [Mon, 6 Apr 2020 15:19:53 +0000 (15:19 +0000)]
Merge "A2DP: Do the connection task in the stack main thread" into rvc-dev am: 145214a381 am: 2c8d597005

Change-Id: If86988fd02d80ed445ea1fed546145577cbe7768