Commit Graph

1764 Commits

Author SHA1 Message Date
Etienne Ruffieux
84abea03d6 Prevent create bond for null MAC address
Tag: #feature
Bug: 193702115
Test: atest BluetoothInstrumentationTests
Change-Id: I5684f00cf4a567a899c958b94af22ccf5067b476
2021-07-28 17:57:35 +00:00
Yunsik Bae
4d990467b2 Unify the mismatch in the byte order of the address.
Bluetooth address should check MSB for AddrType based on Spec.
(BT Core Spec v 5.2 | Vol 6, Part B, 1.3 DEVICE ADDRESS)
Bluetooth address meaning is not unified in the current Android framework layer.
Because of this, cannot register scanfilter with the intended address format.

Bug: 180466950
Test: manual
Tag: #compatibility
Change-Id: I59a1b5538e4f3fea77a98cba2aa46649fc32ac6b
2021-07-20 10:53:09 +00:00
Jakub Pawlowski
6ea20906f3 Bluetooth: deprecate TruncatedFilter and ResultStorageDescriptor
It's not used anywhere, and the implementation actually never do
anything.

Bug: 192615539
Merged-In: Icf8906c972cf18d65a22d30c3a628fd54db59179
Change-Id: Icf8906c972cf18d65a22d30c3a628fd54db59179
2021-07-14 17:16:19 +02:00
Jakub Pawlowski
5aa40b903a Get rid of ResultStorageDescriptor in startScan
It's never used

Bug: 192615539
Merged-In: Ia2d65def69b13150a20e8a2077c3fe630f8ec86e
Change-Id: Ia2d65def69b13150a20e8a2077c3fe630f8ec86e
2021-07-14 16:58:20 +02:00
Johanna Ye
cfa6f14403 Merge "Fix long characteristic write concurrency bug." 2021-07-09 15:39:32 +00:00
Rahul Sabnis
d748e6ec7a Update BluetoothAdapter and BluetoothDevice documentation
Update BluetoothAdapter#startDiscovery and
BluetoothDevice#fetchUuidsWithSdp documentation to
indicate that it queues the request if a device is
currently bonding

Tag: #feature
Bug: 187165224
Test: Manual
Change-Id: I3dbcdacff062f6c33c2fdc8d64170bf60b2fbf6f
2021-07-01 22:36:56 +00:00
Johanna Ye
9eeafe9d52 Fix long characteristic write concurrency bug.
Tag: #stability
Test: Bramble (pixel phone) with test app
Bug: 169559728
Ignore-AOSP-First: Current security annotation parity
Merged-In: I3e3a5ff0965c1ca4f79e70e6163bc5d6917edbd1

Change-Id: Ia2d821c5d34d8d035fbbb0b33b9bf4fc8c08b354
2021-07-01 10:51:03 +02:00
Johanna Ye
e36f798dea Add synchronization to all mDeviceBusy state changes.
Tag: #stability
Test: make
Bug: 169559728
Change-Id: I5c1b926a4c774b4bc5f24a9aaa66aa5f7780e121
2021-06-29 16:19:53 +02:00
Alice Kuo
47840a8d73 Unhide BluetoothProfile.LE_AUDIO and getGroupId for the App usage.
This change contains two item,
1. public BluetoothProfile.LE_AUDIO that App can use
BluetoothProfile.ServiceLister with LE Audio profile, such as HFP, A2DP
and hearing aid profile.
2. public getGroupId API that App can use this api to identify which
devices are in the same group

Bug: 150670922
Test: Manual test
Change-Id: I32865720a8195b7c5ae29411cd1f3de95e7fc9b5
Merged-In: I32865720a8195b7c5ae29411cd1f3de95e7fc9b5
2021-06-21 23:34:53 +00:00
Jakub Pawlowski
4619694a85 Bluetooth: fix comments on Volume Control Profile review
Bug: 150670922
Test: compilation
Merged-In: I72b36b77aa97aa9501d13ecdfe0b9b7f49bcce2c
Change-Id: I72b36b77aa97aa9501d13ecdfe0b9b7f49bcce2c
2021-06-18 20:46:27 +00:00
Treehugger Robot
87a2d5bf91 Merge "Adds rahulsabnis@ as an owner for all Bluetooth files in frameworks/base" 2021-06-18 19:21:16 +00:00
Rahul Sabnis
165faf4460 Adds rahulsabnis@ as an owner for all Bluetooth files in frameworks/base
Tag: #feature
Bug: 191481598
Test: Manual
Change-Id: I6c8606c8e4802b74e80555e8ebf78932863d3f5b
2021-06-18 10:31:26 -07:00
Treehugger Robot
ceba9c2521 Merge "Fix NPE in logging" 2021-06-17 23:55:09 +00:00
Jakub Pawlowski
0778be8099 Merge "Bluetooth: add Volume Control Profile boilerpalate" 2021-06-17 21:34:30 +00:00
Martin Brabham
22f1dcf528 Fix NPE in logging
Bug: 191268917
Test: Manual test app, log OobData
Tag: #stability
Change-Id: I975722642298cb580081de9a324302d7a3282d3c
2021-06-17 20:36:06 +00:00
Rahul Sabnis
739f69bc0c Update nullability checks to use Objects#requireNonNull
instead of deprecated method in Preconditions class

Tag: #feature
Bug: 190767948
Test: Manual
Merged-In: Ie7f7282b89c13f587fdfe1bf3288eb4a3c7dcc6e
Change-Id: Ie7f7282b89c13f587fdfe1bf3288eb4a3c7dcc6e
2021-06-14 23:40:27 +00:00
Łukasz Rymanowski
690b89ec89 Bluetooth: add Volume Control Profile boilerpalate
This is very simple API to allow Android to connect VCP profile.

Bug: 150670922
Test: compilation
Sponsor: jpawlowski@
CTS-Coverage-Bug: 190833351
Change-Id: Ib20d967fcf6797077abf83b40b0eda526e5ab89d
Merged-In: Ib20d967fcf6797077abf83b40b0eda526e5ab89d
2021-06-14 15:18:05 +00:00
Myles Watson
025714ff33 Bluetooth ScanFilter: Allow null in setDeviceAddress
Bug: 187076761
Test: manual scan filter test
Change-Id: I6456be4baab4b2a2b6d4607619ff92370b8b457d
2021-05-10 13:52:32 -07:00
Rahul Sabnis
d8c539d8b8 Merge "Update docs for BluetoothDevice#fetchUuidsWithSdp to reflect that if the device is bonding, we either broadcast cached UUIDs or wait for SDP to be performed after the device is bonded." 2021-05-10 17:41:36 +00:00
Rahul Sabnis
6f92ae94ab Update docs for BluetoothDevice#fetchUuidsWithSdp to reflect that if the
device is bonding, we either broadcast cached UUIDs or wait for SDP to
be performed after the device is bonded.

Tag: #feature
Bug: 187157597
Test: Manual
Change-Id: I1bd694195c4e974b7cd72f81848a6343b45c98fd
2021-05-07 19:13:25 -07:00
Martin Brabham
b0d691b3a1 Convert onOobData parameter for OobData from @Nullable to @NonNull
Bug: 185603183
Test: Compiles, test app works
Tag: #feature
Change-Id: I52636769f50f50b5ad2d135f54472bdeb1c25ee5
2021-04-27 09:36:41 -07:00
Martin Brabham
1cd46165dd OOB: Remove static creator methods in favor of public constructors
Bug: 184370881
Tag: #feature
Test: Manual compile
Change-Id: I502cdf5adde324b7a41cfb6974f0b43b0064a911
2021-04-26 09:35:54 -07:00
Rahul Sabnis
93404b4883 Update docs to reflect LE batch scan report delay floor
Tag: #feature
Bug: 167340030
Test: Manual
Change-Id: Ieeb0e6bccfc316fd4c8cdc40f6865b4185d6d9e8
2021-04-20 14:22:16 -07:00
Martin Brabham
76a512f958 OOB generateLocalOobData
unhide @SystemApi callback methods

Bug: 178007935
Tag: #feature
Test: compiles
Change-Id: I2d4167a6c92ee0cc24da12df206838161c8f3318
Merged-In: I2d4167a6c92ee0cc24da12df206838161c8f3318
2021-04-15 18:36:06 +00:00
Hansong Zhang
a77bdb5161 Bluetooth OOB: Fix getLeAppearance
Bug: 185196125
Test: Use OOB pairing
Change-Id: I1cb1c33b0b17f2fd242f6579844996c2ccf09e62
2021-04-13 11:55:28 -07:00
Martin Brabham
6d4100e433 OOB: Implement getLocalOutOfBand API
CTS-Coverage-Bug: 184395281
Bug: 178007935
Tag: #feature
Test: manual
Change-Id: I5bc11ac13d9cbb8f76f422aa4aea8295ebec95b4
Merged-In: I5bc11ac13d9cbb8f76f422aa4aea8295ebec95b4
2021-04-07 14:08:39 -07:00
Rahul Sabnis
2b735a548f Remove BluetoothHeadset#setPriority which was deprecated in Android 11
Tag: #feature
Bug: 183551808
Test: Manual
Change-Id: I88745589ec66d3060d24b530fe49fea8926726c6
2021-03-24 14:01:52 -07:00
Chen Chen
feab55912c ScanFilter.setDeviceAddress: Should send deviceAddress instead of mDeviceAddress to the next level
Bug: 183409081
Test: build and run

Change-Id: I2d25d21b0f143fc7362679e0094455c9132fda9d
2021-03-23 17:43:36 +00:00
Treehugger Robot
bf516b9e11 Merge "Add new @SystemApi for specifying AddressType and IRK" 2021-03-21 20:15:38 +00:00
Martin Brabham
045fe260e1 Add new @SystemApi for specifying AddressType and IRK
Bug: 178234318
Test: compiles and runs
Tag: #feature
Change-Id: Ib67e681af01260df98602003b2aca47963494c6f
2021-03-20 15:13:24 -07:00
Chienyuan Huang
4a47532570 Merge "Le Scan: Add ambient discovery mode (1/2)" 2021-03-20 00:26:04 +00:00
Martin Brabham
3af765a863 Fix CTS Failure
Bug: 182849735
Test: atest CtsSystemApiAnnotationTestCases:android.signature.cts.api.AnnotationTest#testAnnotation -- --abi x86_64
Change-Id: I1b9e77b05cd23299bf179c854e136fa341c81566
2021-03-16 20:11:05 -07:00
Martin Brabham
96e6e4a0b3 Bluetooth: Modify and append to the Out-of-Band API
- Modify createOutOfBand to be a SystemApi, and accept p192 and p256 data objects.
 - Modify OobData to become a SystemApi and to provide a Builder pattern for creation.

CTS-Coverage-Bug: 182420103
Bug: 178007935
Test: compiles and runs
Tag: #feature
Change-Id: I46aec8c2cb64a8da8957d01d32b879d60df7a31c
Merged-In: I46aec8c2cb64a8da8957d01d32b879d60df7a31c
2021-03-16 20:10:56 -07:00
Chienyuan
f757d2fa69 Le Scan: Add ambient discovery mode (1/2)
Bug: 177466875
Test: manual
Change-Id: I4a5c8a0768903ef0838dcf55cf5cfba9a0a18eef
2021-03-16 17:53:19 +08:00
Rahul Sabnis
8e97fea3c2 Merge "Derestrict some APIs." 2021-03-09 21:29:12 +00:00
Mathew Inwood
cbc3132096 Derestrict some APIs.
They were retricted because we thought they were unused, but it turns out
that they are needed afterall.

NoNonSdkCheck: 170729553

Bug: 181103983
Test: N/A
Change-Id: Iddf7916456be27d60d2a7520d7cadcda1d04cac6
2021-03-09 21:24:00 +00:00
Xin Li
1af6a12e98 Merge "Merge RQ2A.210305.007" 2021-03-03 21:41:39 +00:00
Jakub Pawlowski
5629c959bf Fix comment typo in PeriodicAdvertisingParameters
Bug: 176967118
Test: m ds-docs-java
Exempt-From-Owner-Approval: Docs-only change
Change-Id: I1777ca23ba6f395eeb2ec98b970ccbf920661663
2021-03-03 18:45:45 +00:00
Treehugger Robot
ad1bbc487c Merge "Additional metadata keys for Fast Pair" 2021-03-03 08:15:22 +00:00
Ugo Yu
370ecf007c Additional metadata keys for Fast Pair
Tag: #feature
Bug: 171387275
Test: atest BluetoothInstrumentationTests
Change-Id: I98f4cbd214437d1cd3681be03108c824ad087260
2021-03-02 14:44:41 +08:00
More Kuo
e90bacbc0a Merge "Update BluetoothA2dp API" am: ae6583b34f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1596413

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1fc9c4dad0013ecd62788417054f872f29dc775f
2021-02-24 00:39:44 +00:00
Andrew Cheng
c12293f799 Surface ACL disconnect reasons from native to Java am: b8e09882d8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1595220

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I70317579c1235d84a4c491823c8b9747e135ff34
2021-02-23 23:41:17 +00:00
Andrew Cheng
4757f6cd7f Make BluetoothConnectionCallback static am: 8ef54b299e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1596074

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id1b69b7ef8ea255fea87d68ae8806b437319d885
2021-02-23 23:38:24 +00:00
Joseph Pirozzo
0a5ceea870 Merge "Add BluetoothMapClient to system API" am: 9cabf5a07b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1564659

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie60ce04dd17204740027fb7a1198bcd05e0b9012
2021-02-23 22:31:48 +00:00
More Kuo
ae6583b34f Merge "Update BluetoothA2dp API" 2021-02-23 02:37:41 +00:00
Andrew Cheng
1c276e7591 Merge changes from topic "hci-disconnect-reason"
* changes:
  Update Companion to new BluetoothConnectionCallback
  Add BluetoothConnectionCallback to Companion App
  Surface ACL disconnect reasons from native to Java
  Make BluetoothConnectionCallback static
2021-02-22 19:25:13 +00:00
Xin Li
be473bf819 Merge ab/7061308 into stage.
Bug: 180401296
Merged-In: I4bf82035631ccff6d5a6144d6d9b1d203b076851
Change-Id: I1b5f3a672a55eaabba0f5389bab110b395553559
2021-02-21 09:39:53 -08:00
Andrew Cheng
b8e09882d8 Surface ACL disconnect reasons from native to Java
HCI disconnect commands and events have an accompanying "reason"
parameter comprising of a HCI error code. This can be useful in both
debugging and re-connection logic at the Java level.

This CL grabs the HCI codes from native and passes it up to Java via an
extra parameter to existing ACL connection callbacks.

Tag: #feature
Bug: 177668957
Test: atest BluetoothInstrumentationTests

Change-Id: Ic729140b8ffb1273a9ca53cdfd39c9f5d71e1522
2021-02-20 05:50:03 +00:00
Andrew Cheng
8ef54b299e Make BluetoothConnectionCallback static
Tag: #refactor
Fixes: 180727461
Test: atest BluetoothInstrumentationTests
Change-Id: I4bd084cb6c0371b649adb1d1a65b3327ae3e488a
Merged-In: Id24a4b3a3510781d9105763b1722f44583a7fd7c
2021-02-19 18:50:20 +00:00
Joseph Pirozzo
f3bf66ac7a Add BluetoothMapClient to system API
Add BluetoothMapClient.sendMessage to system API for use by mainline
modules.

Bug: 157948464
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: Idee4cb2cefeaf03f0351ea576f919a294219d391
2021-02-19 07:39:07 -08:00