Commit Graph

1747 Commits

Author SHA1 Message Date
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
More Kuo
d1c7af46ca Update BluetoothA2dp API
- Rename setBufferMillis to setBufferLengthMillis
- Rename getCodec to forCodec

Bug: 179814567
Test: Build
Change-Id: Iadb1b9e2b42ecab98f70b8bf6500e7a97aaf0aab
2021-02-19 18:29:00 +08:00
Łukasz Rymanowski
ebb62d5d58 Add Volume Control UUID
Sponsor: jpawlowski@
Test: compilation
Bug: 159786353
Tag: #feature

Change-Id: I14116848411026ceab0ee15098687bf821e74d38
2021-02-08 19:37:24 +00:00
Treehugger Robot
0f12a22aa6 Merge "AdvertiseData: fix nullable collection" 2021-02-03 19:10:59 +00:00
Jakub Pawlowski
1b9358bfe6 docs: fix typo HDP->HFP in BluetoothHeadset
Bug: 158742305
Test: m ds-docs-java
Exempt-From-Owner-Approval: Docs-only change
Change-Id: Iec48eba9a29e1cb7c2565e773ae876db662552ef
2021-01-29 09:21:00 +01:00
Kevin Hufnagle
633ec9f636 docs: Use correct profile for intent
The ACTION_AUDIO_STATE_CHANGED intent action uses the HDP profile,
not the A2DP profile.

Bug: 158742305
Test: m ds-docs-java
Exempt-From-Owner-Approval: Docs-only change
Change-Id: I4358aac8c8aa9fc8b36e517e568e5a9db538555e
(cherry picked from commit fcd519fde9)
2021-01-29 09:16:33 +01:00
Adrian Roos
8b25bab292 AdvertiseData: fix nullable collection
Bug: 152525509
Test: make checkapi
Change-Id: Ia400cb2bda55b26594bc3a253612583134294edb
2021-01-28 18:54:38 +01:00
Zach Johnson
75da9f9f27 Merge "Dynamic Audio Buffer (1/3)" 2021-01-21 17:28:17 +00:00
More Kuo
2883a293e8 Dynamic Audio Buffer (1/3)
Add APIs in BluetoothA2dp to:
1. Get the supported type of the dynamic audio buffer.
2. Get the dynamic audio buffer millis.
3. Set dynamic audio buffer millis.

Add BufferConstraints class to access the buffer millis of different
codec.

Bug: 163968696
Tag: #feature
Test: Run dynamic audio buffer test
Change-Id: If097d94be861dbb0c4d8f67fe7caf70a99093e34
2021-01-20 14:35:22 +08:00
Mathew Inwood
29bf6e8443 Merge "Derestrict some non-SDK APIs." 2021-01-13 09:38:35 +00:00
Łukasz Rymanowski
9bf1c7c57c gatt: Allow to set eatt support
With this patch it is possible to enable eatt_support as a GATT Client
or GATT Server.

Tag: #feature
Bug: 159786353
Test: manually verified against device supporting EATT
Sponsor: jpawlowski@
Change-Id: I6835a2bbd1b0ab9d6d64ee2bac5dfc96c0563afd
2021-01-11 20:49:56 +01:00
Fei Zheng
62d30f1a08 Bluetooth: Implement API to get device identification information
Submitted on behalf of a third-party: Samsung System LSI

License rights, if any, to the submission are granted solely by the
copyright owner of such submission under its applicable intellectual
property.

Copyright (C) 2015 Samsung System LSI
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Third Party code includes additions/modifications from Qualcomm Innovation Center, Inc.

Call BluetoothDevice.sdpSearch(BluetoothUuid.DIP) to search DIP information,
and receive intent BluetoothDevice.ACTION_SDP_RECORD to get SdpDipRecord from
BluetoothDevice.EXTRA_SDP_RECORD

Bug: 141666056
Test: atest BluetoothInstrumentationTests
Sponsor: alainv@
Tag: #feature

Change-Id: I82d0979b77d28ec36fde6616622d216a28310b4a
2021-01-08 10:59:46 +08:00
Mathew Inwood
95709ba69f Derestrict some non-SDK APIs.
Per request from a partner, these APIs will not be restricted as they
are in use. This is conceptually a partial revert of change 5d123b6775.

NoNonSdkCheck: b/170729553

Bug: 171933273
Test: Treehugger
Change-Id: Ibb525e9a9e2fc90248b74f45f3cdcb0be7487c3a
2021-01-07 09:53:09 +00:00
Rahul Sabnis
2b2f76b7bb Introduce public APIs to check whether a remote bluetooth headset
supports voice recognition as well as echo cancellation and/or noise
reduction via the AT+BRSF bitmask

Tag: #feature
Bug: 172960943
Test: Manual
Change-Id: I40579d9b6d493d2b32fb260983eeb7c79cc0d525
2021-01-06 17:20:19 -08:00
Treehugger Robot
5e50fd7970 Merge "Register the service-to-app callback whenever the service comes up for BluetoothConnectionCallback. This ensures that if the bluetooth process dies, the callbacks will be re-established once it comes back up." am: 0aa6ab7887 am: 7d10fee593
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1533089

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic60e9efe84a5009c7fd0112c8ab92cae2973d77c
2020-12-21 21:58:44 +00:00
Treehugger Robot
0aa6ab7887 Merge "Register the service-to-app callback whenever the service comes up for BluetoothConnectionCallback. This ensures that if the bluetooth process dies, the callbacks will be re-established once it comes back up." 2020-12-21 20:56:26 +00:00
Rahul Sabnis
9fc40b34c3 Register the service-to-app callback whenever the service comes up for
BluetoothConnectionCallback. This ensures that if the bluetooth process
dies, the callbacks will be re-established once it comes back up.

Tag: #feature
Bug: 175700972
Test: Manual
Change-Id: I2a20b229fcc1d8f69ccc1b24b62c26ce8155c29f
2020-12-17 12:23:23 -08:00
Jakub Pawlowski
14b8b7fca2 Merge "Add LE Audio UUID placeholder" am: eec09803da am: b253796204
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513324

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0461b86760f5c26bf066799b8bf6452ac2162704
2020-12-15 22:12:21 +00:00