OSDN Git Service
TreeHugger Robot [Tue, 23 Jun 2020 06:47:19 +0000 (06:47 +0000)]
Merge "Add Honda High End carkit to IOP table to only use AVRCP 1.4" into rvc-d1-dev
Cheney Ni [Tue, 14 Jan 2020 03:02:29 +0000 (11:02 +0800)]
A2DP: Use codec_specific_1 to report AAC bitrate mode to upper layer
This CL uses the AAC's btav_a2dp_codec_config_t.codec_specific_1 to
store its bitrate mode, and report this information to upper layer, and
upper layer would be able to use this variable to change settings, too.
There are 7 constant numbers to present those bitrate modes:
* AACENC_BR_MODE_CBR - AAC VBR is unable to use, and upper layer can use
this value to keep the current configuration without touched.
* AACENC_BR_MODE_VBR_C - AAC VBR is supported by both source and sink,
and we use or are going to use AAC CBR.
* AACENC_BR_MODE_VBR_1 ~ AACENC_BR_MODE_VBR_5 - Using AAC VBR with
different quality.
Bug:
112325138
Test: check the codec status from frameworks manually
Change-Id: I2096d9569c7aa0e5c79708946ba117d3edc4f041
Merged-In: I2096d9569c7aa0e5c79708946ba117d3edc4f041
Cheney Ni [Tue, 31 Dec 2019 09:29:58 +0000 (17:29 +0800)]
A2DP: Enable AAC VBR for A2DP source feature
This CL adds AAC variable bitrate to the source capabilities, and the
software encoder uses VBR mode 5 (vary high bitrate) by default.
Bug:
112325138
Test: atest net_test_stack / IOP test
Tag: #feature
Change-Id: I4271154248af5ea82c3de2c97bb39526e9f904ba
Merged-In: I4271154248af5ea82c3de2c97bb39526e9f904ba
Sal Savage [Fri, 19 Jun 2020 23:53:25 +0000 (23:53 +0000)]
Merge "Don't query for metadata on playing status" into rvc-dev am:
12d6bc5db8
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
11921967
Change-Id: I7a1e935dd2c78282ac4ade3bdd6cfe3b36a32384
Sal Savage [Fri, 19 Jun 2020 23:35:51 +0000 (23:35 +0000)]
Merge "Don't query for metadata on playing status" into rvc-dev
Sal Savage [Thu, 4 Jun 2020 20:35:39 +0000 (13:35 -0700)]
Don't query for metadata on playing status
These removed lines of code were for a problem that no longer seems to
exist with other phones. It was a band-aid at best, having us pull
metadaa on 'playing status' when a phone really should have just been
sending the update to us anyway. Pulling metadata here causes a bad user
experience with cover artwork where the new metadata is interpreted as a
track change in Java land and cover artwork can be redownloaded. This
happens primarily with non-database aware players after a BIP reconnect
where we're guarenteed nothing about the handle we receive.
Tag: #compatibility
Bug:
158232844
Test: atest BluetoothInstrumentationTests
Merged-In: Idb88e7c1e1553319cb26eba2c18e3cd2bbd552cc
Change-Id: Idb88e7c1e1553319cb26eba2c18e3cd2bbd552cc
Ted Wang [Thu, 18 Jun 2020 17:05:51 +0000 (01:05 +0800)]
Add Honda High End carkit to IOP table to only use AVRCP 1.4
Bug:
158722323
Test: Manual
Change-Id: Ia496633871c9a7f8e36b61266add059ac3f28536
Sanjay Ramankandath [Wed, 17 Jun 2020 00:03:42 +0000 (00:03 +0000)]
RootCanal: Use a state machine in ScriptedBeacon am:
80b43139bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
11882435
Change-Id: I49094be6dc2a397061c813fcd94bb4c7f2f0230e
Sanjay Ramankandath [Wed, 3 Jun 2020 22:24:06 +0000 (22:24 +0000)]
RootCanal: Use a state machine in ScriptedBeacon
Add indication for ble add playback completion
bt HCI: Make sure the device numbers match
Clean up static variables in scripted beacon
Clean up logs in scripted beacon
Test: boot cuttlefish and check logcat
Tag: #gd-refactor
Bug:
154491371
Bug:
158019041
(cherry picked from commit
79f168b7f3b03722cf2d0bb5ee97258824dc3832)
(cherry picked from commit
1c66bdaa38c46e859b66f8cc055993c5f0e7f5a1)
(cherry picked from commit
82656e9682e9de7596b7327618cf680936f34589)
Change-Id: I7f54ecef4ba08acc33b9d773b02b8428ca91a415
(cherry picked from commit
53c68dba78cc8f746c93e3db062ef358a976f0bf)
Merged-In: I7f54ecef4ba08acc33b9d773b02b8428ca91a415
Venkata Jagadeesh Garaga [Fri, 12 Jun 2020 01:57:30 +0000 (01:57 +0000)]
GAP: Use proper page scan rep mode for connection am:
78d863bd30
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/
11839912
Change-Id: I0bf0569afabb56cfdaaf9b022f89177bdcca4294
Venkata Jagadeesh Garaga [Fri, 17 Apr 2020 10:36:17 +0000 (16:06 +0530)]
GAP: Use proper page scan rep mode for connection
Issue: Page time out seen when user initiated pairing from LE scan response
Steps to reproduce
==================
Steps:
1. Turn on BT
2. inquiry any dual mode device
3. Initiate pairing (only LE scan response received but br/edr
inquiry response not received)
Actual Result:
Remote name request or create connection got page timeout some times
Expected result:
Remote name request and create connection should be successful
Root Cause:
If user finds only LE scan response for dual mode devices, then stack
treats it as dual mode based on br/edr not supported bit. If pairing
initiated from LE scan response, then stack initiates RNR and ACL connection
on br/edr transport with wrong page scan response from LE inquiry database,
it leads to page time out.
Fix:
Use page scan response from inquiry data base if br/edr inquiry response
received, else use default page scan response R1 in RNR and create connection.
Test: Follow steps above
Bug:
154286616
Change-Id: I281ebc6d0e67d88c30328cb67df7f28793f354c1
Myles Watson [Sun, 31 May 2020 13:38:46 +0000 (13:38 +0000)]
RootCanal: Use GD defaults to define OS_ANDROID am:
b5deb4ac2e
Change-Id: I270cfc33908038be119865a9cd1d166929cb3842
Myles Watson [Fri, 29 May 2020 19:17:43 +0000 (12:17 -0700)]
RootCanal: Use GD defaults to define OS_ANDROID
When OS_ANDROID is defined logs go to logcat.
When OS_ANDROID is not defined logs to stderr.
Bug:
157706301
Test: cert/run --host
Tag: #gd-refactor
Change-Id: I3e735a4716fbc35a3d66e03909fdbf905436d285
Merged-In: I3e735a4716fbc35a3d66e03909fdbf905436d285
TreeHugger Robot [Fri, 29 May 2020 16:20:36 +0000 (16:20 +0000)]
Merge "Enable bitpool sanity checks" into rvc-dev am:
02cca0f8df
Change-Id: I60d8c55db1d48f91362905de9516da0480dc1bda
TreeHugger Robot [Fri, 29 May 2020 16:09:13 +0000 (16:09 +0000)]
Merge "Enable bitpool sanity checks" into rvc-dev
TreeHugger Robot [Wed, 27 May 2020 05:18:46 +0000 (05:18 +0000)]
Merge "Respond AVRCP profile descritpion list 1.4 only for some device" into rvc-d1-dev
TreeHugger Robot [Wed, 27 May 2020 05:18:46 +0000 (05:18 +0000)]
Merge "Update Bluetooth AVRCP default version to 1.5" into rvc-d1-dev
Greg Kaiser [Wed, 27 May 2020 03:45:10 +0000 (03:45 +0000)]
btif_config: Fix pointer to freed memory am:
d96e89cd9c
Change-Id: I52aac3213e98a32d74e9828dffdf409b0bc9793b
Greg Kaiser [Tue, 26 May 2020 12:42:36 +0000 (05:42 -0700)]
btif_config: Fix pointer to freed memory
We change the scope of our 'string' declaration so the contents
are still in scope when we use a pointer to them. Previously,
the contents were out of scope when we referenced them through
a pointer.
Bug:
148758680
Test: TreeHugger
Change-Id: Ib0aa689bf4547d079b77965d958cc382ba0276e6
weichinweng [Tue, 26 May 2020 03:46:51 +0000 (03:46 +0000)]
NIAP: Add a map to store the LTTKM am:
ae93daab29
Change-Id: Ie2d7ad8254c1b680cb23e8f3587944a62b34030f
weichinweng [Tue, 26 May 2020 03:46:48 +0000 (03:46 +0000)]
NIAP: Use bluetooth keystore to encrypt/decrypt LTTKM. am:
85c92841f5
Change-Id: I26b58e1d73bdbd6588c7d61ce500f8f728976127
weichinweng [Tue, 26 May 2020 03:46:45 +0000 (03:46 +0000)]
NIAP: implement bluetooth keystore interface.(2/2) am:
b30bb98bf5
Change-Id: I2a75725c6d6ed27e92f11e37eaee598d129c19c3
weichinweng [Tue, 26 May 2020 03:46:42 +0000 (03:46 +0000)]
NIAP: Add new argument to determine config checksum check result.(2/4) am:
14b98e02f1
Change-Id: I1f381a046909abb58caf9de0aa3cdd15341d7858
weichinweng [Tue, 26 May 2020 03:46:39 +0000 (03:46 +0000)]
NIAP: Add keystore.proto for java layer usage. am:
a7b61f45e0
Change-Id: Iaa46f7e3134677d83a5e2c7e4169fd42077843df
Joseph Pirozzo [Mon, 25 May 2020 17:36:26 +0000 (10:36 -0700)]
Enable bitpool sanity checks
Enable bitpool sanity checks to run all the time, not just in debug
mode.
Tag: #security
Test: sbcdecoder_fuzzer
Bug:
146398979
Change-Id: Iff58305cd18de35e37290f0c09fba01ee14e787a
Ted Wang [Mon, 18 May 2020 10:02:34 +0000 (18:02 +0800)]
Respond AVRCP profile descritpion list 1.4 only for some device
Some devices (Toyota Car Audio), will not perfomance general AVRCP
initial action like get capabilities or register for any notification
when receiving AVRCP profile version 1.5. Create black list for these
devices so we can reply AVRCP 1.4 when we are in higher AVRCP version.
Bug:
154780267
Test: manaul
Change-Id: If6c9453ad1f844d255fade63afad828b185b7fdf
Ted Wang [Tue, 19 May 2020 07:05:17 +0000 (15:05 +0800)]
Update Bluetooth AVRCP default version to 1.5
Bug:
154780267
Test: Manual
Change-Id: I13f77b46acb3f13b02b61a69cc0239ef4cbb5642
weichinweng [Mon, 27 Apr 2020 03:52:15 +0000 (11:52 +0800)]
NIAP: Add a map to store the LTTKM
When do pairing, the set_encrypt_key_or_remove_key will be later than
get_key due to they are in different thread. Use a map to store them and
will check whether the key exist in map. If no, will get the key from
the JAVA bluetoothKeystore.
Bug:
148758680
Test: m
Change-Id: I044b11a231c6f65978019ce6092657c1bdd814d1
Merged-In: I044b11a231c6f65978019ce6092657c1bdd814d1
weichinweng [Thu, 23 Apr 2020 09:33:02 +0000 (17:33 +0800)]
NIAP: Use bluetooth keystore to encrypt/decrypt LTTKM.
Bug:
148758680
Test: m
Change-Id: Ic1e4ddd186d900c5058f40e8eeef500ce23087b7
Merged-In: Ic1e4ddd186d900c5058f40e8eeef500ce23087b7
weichinweng [Tue, 21 Apr 2020 01:42:27 +0000 (09:42 +0800)]
NIAP: implement bluetooth keystore interface.(2/2)
Bug:
148758680
Test: m
Change-Id: I89f782039123d1deac173d13670de4d9dae5252a
Merged-In: I89f782039123d1deac173d13670de4d9dae5252a
weichinweng [Tue, 21 Apr 2020 02:26:26 +0000 (10:26 +0800)]
NIAP: Add new argument to determine config checksum check result.(2/4)
Bug:
148758680
Test: m
Change-Id: I07eb90a144e172212c7a1a55ef200111efd297e0
Merged-In: I07eb90a144e172212c7a1a55ef200111efd297e0
weichinweng [Mon, 20 Apr 2020 09:48:43 +0000 (17:48 +0800)]
NIAP: Add keystore.proto for java layer usage.
Add keystore.proto for java layer usage.
Bug:
148758680
Test: m
Change-Id: I8fecbcdc46eb12336c9fd1fa1e2166df80d80f19
Merged-In: I8fecbcdc46eb12336c9fd1fa1e2166df80d80f19
TreeHugger Robot [Thu, 14 May 2020 10:08:41 +0000 (10:08 +0000)]
Merge "BluetoothMetrics: Fix LRU eviction callback bug" into rvc-dev am:
bb0b795283
Change-Id: I5124047540863cf3a902f9c00efec78bf6220c1f
TreeHugger Robot [Thu, 14 May 2020 09:50:48 +0000 (09:50 +0000)]
Merge "BluetoothMetrics: Fix LRU eviction callback bug" into rvc-dev
Chen Chen [Wed, 13 May 2020 22:35:42 +0000 (15:35 -0700)]
BluetoothMetrics: Fix LRU eviction callback bug
Test: atest bluetooth_test_common
Bug:
156504089
Tag: #stability
Change-Id: I594070a0dc1c33bd8f971bb8a7752fd317872a55
Merged-In: I594070a0dc1c33bd8f971bb8a7752fd317872a55
(cherry picked from commit
184414edd1a0851892865241d9287ca0d808b54e)
Sanjay Ramankandath [Mon, 11 May 2020 15:57:07 +0000 (15:57 +0000)]
Support for reading playback file in scripted beacon am:
466f60ad97
Change-Id: If08572674ce2bf90c58548d10bc60e9b06842b0f
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
Sanjay Ramankandath [Fri, 24 Apr 2020 14:40:59 +0000 (14:40 +0000)]
Support for reading playback file in scripted beacon
Bug:
154491371
Tag: #feature
Test: Manual test on cuttlefish
Test: gd/cert/run --host
Change-Id: Ie0ce31796a0c28826002b0677d27e5db075dde6d
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
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
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
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
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
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
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
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)
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)
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
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)
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
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
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)
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
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
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
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
TreeHugger Robot [Thu, 23 Apr 2020 08:42:17 +0000 (08:42 +0000)]
Merge "NIAP: remove keystore related code for now." into rvc-dev
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
TreeHugger Robot [Wed, 22 Apr 2020 23:52:11 +0000 (23:52 +0000)]
Merge "Fix bugprone-use-after-move warnings" into rvc-dev
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
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
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
KimJeongYeon [Tue, 21 Apr 2020 21:45:35 +0000 (21:45 +0000)]
btsnoop: Fix btsnoop_net runs unexpected am:
dc57138de5
Change-Id: I5cfcf4f2da8145c3a5765f2f7c04a3ce5e2fd37e
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)
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
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
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
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
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)
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)
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
Jiyong Park [Fri, 17 Apr 2020 05:36:42 +0000 (05:36 +0000)]
Revert "Mark updatable APEXes" am:
e3ff9a59f8
Change-Id: Iaba5dc471efa3997d3444ff5d106d34136b182e2
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
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
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
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
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
Sal Savage [Tue, 14 Apr 2020 19:22:21 +0000 (19:22 +0000)]
Merge "AVCRP Controller support Get Item Attributes" into rvc-dev
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
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
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
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)
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)
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)
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
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
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
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
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
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
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
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
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
Sterling Huber [Wed, 8 Apr 2020 00:13:33 +0000 (00:13 +0000)]
Merge "Check a2dp packet length is zero" into qt-dev
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
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
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
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
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
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