Commit Graph

1703 Commits

Author SHA1 Message Date
Ł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
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
eec09803da Merge "Add LE Audio UUID placeholder" 2020-12-15 21:54:45 +00:00
Jakub Pawlowski
224146d50d Add LE Audio UUID placeholder
Actual value will will be added in the future. We already have to
reference it in the source.

Bug: 150670922
Test: compilation
Tag: #feature
Sponsor: jpawlowski@
Change-Id: I3ba1e0e1136346e469952568f5a409cf32b898be
2020-12-15 09:09:31 +00:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
2020-12-08 08:36:27 -07:00
Myles Watson
89bf39528f BluetoothClass: Use mask to get MajorDeviceClass
Bug: 174650196
Test: compiles
Change-Id: I6042a02fa329c5291aa7b9719907485e748582bf
2020-12-02 20:48:08 -08:00
Grzegorz Kołodziejczyk
f08f986a9b Add Bluetooth LE Audio Profile (3/3)
This is boilerplate code for Bluetooth LE Audio profile

Bug: 150670922
Test: compilation
Tag: #feature
Change-Id: Iadc3af12fd8b2808db2f4e933a1906a819824ade
2020-12-01 23:30:49 +01:00
Mathew Inwood
5d123b6775 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
2020-11-04 09:45:53 +00:00
Treehugger Robot
917b0a4488 Merge "Introduce a BluetoothConnectionCallback that will fire off events when a device is connected or disconnected." 2020-10-30 02:34:25 +00:00
Rahul Sabnis
79ce82f840 Introduce a BluetoothConnectionCallback that will fire off events when a
device is connected or disconnected.

Tag: #feature
Bug: 171902843
Test: Manual
Change-Id: I194a35a69fe0c5d960ea88a1a0fa52c8df7738e2
2020-10-29 16:51:26 -07:00
Treehugger Robot
5ba504f179 Merge "Move all BluetoothCodecConfig and BluetoothCodecStatus APIs moved from the non-SDK API list to the blocklist in Android 11 back to the non-SDK API list." 2020-10-28 19:44:40 +00:00
Rahul Sabnis
57835f979c Move all BluetoothCodecConfig and BluetoothCodecStatus APIs moved from
the non-SDK API list to the blocklist in Android 11 back to the non-SDK
API list.

Tag: #feature
Bug: 168812851
Test: atest BluetoothHostTest#testCodecMethodsAccessible
Merged-In: I29983284b1a1c271d983c99b286e204604abdc72
Change-Id: I29983284b1a1c271d983c99b286e204604abdc72
2020-10-28 18:35:25 +00:00
Jakub Pawlowski
9b46151ead Bluetooth: make it possible to advertise service solicitation UUID
Bug: 159827149
Tag: #feature
Test: called the API in test app, verified advertisement content
Change-Id: I3ab43e39bb7fd8fef97e141eeb981419aa3ec35a
2020-10-08 07:26:01 +00:00
Myles Watson
70b5ba179c Bluetooth: Spell mandatory correctly
Bug: 169654068
Test: compilation
Change-Id: Ibb0046180760e27d6991ae17849a7405738b6f01
2020-10-05 11:23:24 -07:00
Jakub Pawlowski
2c1d2c21cf Make BluetoothGattCallback.onServiceChanged public
Bug: 154056389
Test: proper CTS test will be provided
Change-Id: I2c9264910b65d62124c75c3ee3fd0b5bd18a2006
2020-09-26 15:50:37 +00:00
HsingYuan Lo
762a05f057 Expose service changed event to application (2/3)
Handle service changed event from GattService

Bug: 154056389
Tag: #feature
Test: test service changed scenario
Change-Id: If56dcbd7cf17b23c88cceb9c67c5d75b21320965
2020-09-24 09:27:58 +08:00
Treehugger Robot
cf44a015e8 Merge "Add action for Bluetooth tethering state changed" 2020-09-17 02:01:00 +00:00
Ted Wang
47558ca2b2 Add action for Bluetooth tethering state changed
Add new action for Bluetooth tethering state changed and extra for
broadcasting Bluetooth tethering state changed.

Tag: #feature
Bug: 138688805
Test: Manual
Change-Id: Ie0f848448f9717a6a1233d0dbb0785da7d30dc81
2020-09-16 10:31:25 +08:00
Jeff Sharkey
a8cec413b6 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
2020-09-14 10:00:07 -06:00
Jeff Sharkey
16dd960d6f Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Id1a0f2a38e41badee3a34bd71af240511f273a7b
2020-09-14 10:00:05 -06:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Zach Johnson
f2a8b85026 Remove listenUsingEncryptedRfcommOn & listenUsingScoOn
both are hidden and not @UnsupportedAppUsage, so are safe to remove

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I58acb4160207fc0eeaeb7875bfd61f3bd442ad9a
2020-08-19 16:53:06 -07:00
Alice Kuo
9922d8cc9d Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

#inclusivefixit

Bug: 161896447
Test: NA (Comment only)

Change-Id: Id4f72f98d5a5def26d42d112aeb1b67217d38af0
2020-07-29 04:00:34 +00:00
Treehugger Robot
e63b8e9c80 Merge "Bluetooth: MCE: Add new API to set message read status or deleted status" am: ab98549022 am: 5cdec2e9d1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1212983

Change-Id: Ie09a4b1e54288b88bc829c6713172c1dbe1608a2
2020-07-14 21:39:51 +00:00
Treehugger Robot
ab98549022 Merge "Bluetooth: MCE: Add new API to set message read status or deleted status" 2020-07-14 21:05:46 +00:00
Treehugger Robot
24c414d9e5 Merge "Add debug log for set/remove active device." am: cbb4cd1f8c am: 1466c82f13
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1351257

Change-Id: I55b4b2f1296628228d36ed4259f08178b1a01d56
2020-07-09 03:14:48 +00:00
weichinweng
f6ec2d07e2 Add debug log for set/remove active device.
Bug: 160746277
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: I3decaa102345d9e9485882cfeee2fae203264e25
2020-07-08 03:41:32 +00:00
Fei Zheng
bc5eaa9e36 Bluetooth: MCE: Add new API to set message read status or deleted status
Bug: 146314855
Test:
1. Pair with a remote device which address is like 00:01:02:03:04:05
2. On remote device allow MAP connection
3. Make sure there is at least 1 unread message in last week on remote device
4. adb shell am instrument -w -e mce_set_message_status_iterations 1 -e device_address
 00:01:02:03:04:05 -e class android.bluetooth.BluetoothStressTest#testMceSetMessageStatus
 com.android.bluetooth.tests/android.bluetooth.BluetoothTestRunner

Change-Id: I7a3e337142bc39a55c1bfd425e0966e1fb1b9a68
2020-06-26 07:27:35 +08:00
Makoto Onuki
a11035a7eb Remove unnecessarily @System/TestApi annotations
We can't expose APIs if the enclosing class is hidden, so these
annotations are redundant. We need to remove them so that we can enable the
check.

Exempt-From-Owner-Approval: Cherry-pick from goog/master
Bug: 159121253
Test: treehugger (i.e. this shouldn't trigger "API has changed" error.)
Merged-in: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
Change-Id: I36e3562b72e64b51e4febd1d42a3bc8e4dc60988
2020-06-24 20:49:20 +00:00
Makoto Onuki
42bec243c0 Remove unnecessarily @System/TestApi annotations
We can't expose APIs if the enclosing class is hidden, so these
annotations are redundant. We need to remove them so that we can enable the
check.

Exempt-From-Owner-Approval:Cherry-pick from goog/master
Bug: 159121253
Test: treehugger (i.e. this shouldn't trigger "API has changed" error.)
Merged-in: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
Change-Id: Ie1841a670bdf6c6f4b25a1fc5deed8ec2d18cda2
2020-06-24 18:02:10 +00:00
Treehugger Robot
adeef01787 Merge "A2DP: Check AAC bitrate mode by its CodecSpecific1" am: bdc57bef81 am: bb606cfc11
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1207444

Change-Id: I0e6cab7597bbdf12292feb7c5b8a03bcd05df7f8
2020-06-22 17:59:33 +00:00
Treehugger Robot
bdc57bef81 Merge "A2DP: Check AAC bitrate mode by its CodecSpecific1" 2020-06-22 17:22:54 +00:00
Treehugger Robot
bbd3af4d38 Merge "BluetoothLeScanner: clarify the documentation for permission requirements for startScan" am: 9b128b9d1b am: 434d64e4a1
Change-Id: I9cb189ffb7df29be2ae97de220ed03937eb19d40
2020-05-18 17:26:20 +00:00
Treehugger Robot
434d64e4a1 Merge "BluetoothLeScanner: clarify the documentation for permission requirements for startScan" am: 9b128b9d1b
Change-Id: I39ded23183483f8791d8a6ea8b474b5c72a7b2eb
2020-05-18 17:07:02 +00:00
Treehugger Robot
9b128b9d1b Merge "BluetoothLeScanner: clarify the documentation for permission requirements for startScan" 2020-05-18 16:51:02 +00:00
Jakub Pawlowski
f4d2f6c50c BluetoothLeScanner: clarify the documentation for permission requirements for startScan
Bug: 145153879
Change-Id: I698952f67cfc97a33b703096cbba65129a91c220
2020-05-13 17:55:53 +00:00
Hungyen Weng
bacc6cd08c Merge "Revert "BluetoothProfileConnecter now calls the ServiceListener'..."" into rvc-dev am: 1c85c4501b
Change-Id: I12ad1c145a368be02b68b83e4568149cc7703202
2020-05-04 07:04:23 +00:00
Hungyen Weng
ba5692ea72 Revert "BluetoothProfileConnecter now calls the ServiceListener'..."
Revert submission 11348591-btmap-close-gts

Reason for revert: Droidcop reverted the change due to test failure, Test failed. https://android-build.googleplex.com/builds/tests/view?invocationId=I05500004181087103&testResultId=TR42507671126333727

Reverted Changes:
I324b4ea66:BluetoothProfileConnecter now calls the ServiceLis...
I1427f1a86:Add GTS test for BluetoothMap#close

Bug: 155587865

Change-Id: I9a2645c7bbaec9fdf0c6f5972b08ba70cfe78741
2020-05-04 04:53:46 +00:00