summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothProfile.java
AgeCommit message (Collapse)Author
2022-07-19Bluetooth: Added New Profile IdPhaneendra Reddy
Coordinated audio unicast profile is added in the bluetooth profile. CRs-Fixed: 3234293 Change-Id: I7cf17c3a1b50480ca0f55684b33bc8477eb16aea
2022-05-30Update profile constantsSravan voleti
Update value added Bluetooth profile constants. Bug: 203821845 CRs-Fixed: 3208393 Change-Id: I0da6b52e61ed7b4f408b1f5faf44165a4f868a44
2022-04-22Merge TP1A.220414.003Scott Lobdell
Change-Id: I7225f3a31204834ab12679885cd136bdff31f554
2022-04-04Pretty print profile names in BluetoothDatabaseJakub Pawlowski
Test: observe logcat output when connecting to device Change-Id: Iec184020ff8778cb9c626b354c89fd8a7ef416de (cherry picked from commit 3605603ceb504845ad4b05bd0a50c238f21379e5)
2022-03-25Merge TP1A.220321.002Scott Lobdell
Change-Id: Ie8206e8b9c11c3fd55b7adddac5c782ad92c9da4
2022-03-11Merge TP1A.220225.003Scott Lobdell
Change-Id: Id71ac466dbfe3707fe2e544ce22b1da8f474ec2b
2022-03-10bas: add Battery service profile supportKyunglyul Hyun
This profile provides the battery level characteristic of the BLE device. Settings.Global."settings_bluetooth_battery" or "sys.fflag.override.settings_bluetooth_battery" should be set to enable the feature. (or the ProfileService doesn't start) Bug: 193631822 Tag: #feature Test: atest BatteryStateMachineTest BatteryServiceTest DatabaseManagerTest AdapterServiceTest && manually with BLE keyboard as well Change-Id: I5459218a3362e97f37128aa6bdf286ccbdbc8761
2022-03-07Merge TP1A.220209.001Deyao Ren
Change-Id: Id0e2895d3220831d2c617a243047e8229af8acc9
2022-02-14Remove non logical permission on apiWilliam Escande
Tag: #refactor Test: build Merged-In: I6e817cfca8c73f6a4dd3bec3c054bb9bbcdb7be6 Change-Id: I6e817cfca8c73f6a4dd3bec3c054bb9bbcdb7be6 Bug: 217352944
2022-02-14API Changes needed for apex to buildWilliam Escande
internal cherry-pick Bug: 216476895 Test: Compile Tag: #refactor Change-Id: I09108622038b174104457ca18ac6ec7949978f66 Merged-In: I09108622038b174104457ca18ac6ec7949978f66 CTS-Coverage-Bug: 217352944
2022-02-09Merge TP1A.220126.001Haamed Gheibi
Change-Id: Ibe4916c42b096976ac917991cf0c73f02512f3d4
2022-02-08Remove non logical permission on apiWilliam Escande
Tag: #refactor Test: build Change-Id: I6e817cfca8c73f6a4dd3bec3c054bb9bbcdb7be6 Ignore-AOSP-First: no such api on aosp Bug: 217352944
2022-02-04Merge TP1A.220120.003Haamed Gheibi
Change-Id: I202f5093bbd13b381ea11f969fee6154ba91fa11
2022-02-02Introduce LE audio broadcast system APIsJack He
* Rename BluetoothLeBroadcastSourceInfo to BluetoothLeBroadcastReceiveState so that it matches the name in the Bluetooth specification * Added callbacks to BluetoothLeBroadcast so that caller that wait for asynchronouze operations with reason code in the hope to reduce potential race conditions * Allow multiple broadcast to be set up on the same deivce if the device supports it * Added ScanFilter to searchForSources() method and removed selectSources() method for BluetoothLeBroadcastAssistant so that the Bluetooth stack can automatically handle periodic sync after a Broadcast source is found and only do this for a limited number of devices * Added structural APIs to store Broadcast Source and Group information * Added unknown address type in BluetoothDevice Bug: 208222281 Test: make Tag: #feature Ignore-AOSP-First: Merge conflict in master Change-Id: If4c3af658b5bc1283d76e5d1899485a487ab7626 Merged-In: If4c3af658b5bc1283d76e5d1899485a487ab7626 (cherry picked from commit 4f9d902028fbe271167547884c33fb9ec7601080)
2022-02-01API Changes needed for apex to buildWilliam Escande
Bug: 216476895 Test: Compile Tag: #refactor Ignore-AOSP-First: AOSP will be updated later Change-Id: I09108622038b174104457ca18ac6ec7949978f66 CTS-Coverage-Bug: 217352944
2022-01-27Introduce LE audio broadcast system APIsJack He
* Rename BluetoothLeBroadcastSourceInfo to BluetoothLeBroadcastReceiveState so that it matches the name in the Bluetooth specification * Added callbacks to BluetoothLeBroadcast so that caller that wait for asynchronouze operations with reason code in the hope to reduce potential race conditions * Allow multiple broadcast to be set up on the same deivce if the device supports it * Added ScanFilter to searchForSources() method and removed selectSources() method for BluetoothLeBroadcastAssistant so that the Bluetooth stack can automatically handle periodic sync after a Broadcast source is found and only do this for a limited number of devices * Added structural APIs to store Broadcast Source and Group information * Added unknown address type in BluetoothDevice Bug: 208222281 Test: make Tag: #feature Ignore-AOSP-First: Merge conflict in master Change-Id: If4c3af658b5bc1283d76e5d1899485a487ab7626
2022-01-20hap: Add Hearing Access Profile boilerplateJakub Tyszkowski
Implementation will be provided by the upcoming patch. Tag: #feature Test: compilation Bug: 150670922 Sponsor: jpawlowski@ Change-Id: Ice1949eb2ea9ffd20753b0fd953dee7c81fba012
2022-01-11gtbs: Add Generic Telephone Bearer Service supportMariusz Skamra
Tag: #feature Bug: 159786353 Bug: 213412267 Sponsor: jpawlowski@ Test: build Change-Id: Iecd56b91ce59f6b014878691fe4c6fae826b73f9
2022-01-07Revert "gtbs: Add Generic Telephone Bearer Service support"Jack He
Revert "gtbs: Add Generic Telephone Bearer Service implementation" Revert submission 1873900-gtbs Reason for revert: broke cellular call over BT, see b/213412267 Reverted Changes: I284ddacfc:gtbs: Add Generic Telephone Bearer Service impleme... I8264ade4b:gtbs: Add Generic Telephone Bearer Service support... I996cd5ff9:Add support for Generic Telephone Bearer service (... Bug: 213412267 Tag: #feature Test: answer cellular call by pressing button on HFP headset Change-Id: I9c6b12b794b7378fd852238ad06890f46922c095
2021-12-17gtbs: Add Generic Telephone Bearer Service supportMariusz Skamra
Tag: #feature Bug: 159786353 Sponsor: jpawlowski@ Test: build Change-Id: I8264ade4b07df17fc0207437dfdcae7028cc20ff
2021-12-06Merge "Add BluetoothLeBroadcast profile API."Qasim Javed
2021-12-05Add BluetoothLeBroadcast profile API.Qasim Javed
Implementation for the APIs will be added later. Bug: 205174140 Bug: 208222281 Tag: #feature Test: gd/cert/run Change-Id: I8781be89cba45a6e7a76fec7df24790a9f02d6a6
2021-12-02Bluetooth: Pretty print LE Audio profile name in logsJakub Pawlowski
Bug: 159786353 Change-Id: I1157a34fa91883a861ff0573431009823c2cd8b1
2021-08-30Merge "csip: Add constants for the Coordinated Set Identification Profile" ↵Jakub Pawlowski
am: 30e401f95a Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1807297 Change-Id: I707c1fdd5831763a3bcdfa819e61ea3b01707110
2021-08-24csip: Add constants for the Coordinated Set Identification ProfileŁukasz Rymanowski
Bug: 150670922 Tag: #feature Test: compilation Sponsor: jpawlowski@ Change-Id: I331fe270b75f306d57a15933ab4afa2e48c8bf50
2021-08-10Merge changes Icabed06e,I25bc13c6 am: 020a379b50 am: dcea1a5aa5Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1683328 Change-Id: I50a17e3b0a1d0da3794db7704585a7d1df3af14e
2021-08-09Bluetooth: Add Media Control ProfileJakub Tyszkowski
Tag: #feature Bug: 150670922 Sponsor: jpawlowski@ Test: compilation Change-Id: Icabed06e6b1973ecee9cd1d6eeec80c6d2a9d72e
2021-06-21Unhide BluetoothProfile.LE_AUDIO and getGroupId for the App usage.Alice Kuo
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-19Bluetooth: fix comments on Volume Control Profile reviewJakub Pawlowski
Bug: 150670922 Test: compilation Merged-In: I72b36b77aa97aa9501d13ecdfe0b9b7f49bcce2c Change-Id: I72b36b77aa97aa9501d13ecdfe0b9b7f49bcce2c (cherry picked from commit dc50891255ed0168d6068b328b48cc027cd97ca5)
2021-06-18Bluetooth: fix comments on Volume Control Profile reviewJakub Pawlowski
Bug: 150670922 Test: compilation Merged-In: I72b36b77aa97aa9501d13ecdfe0b9b7f49bcce2c Change-Id: I72b36b77aa97aa9501d13ecdfe0b9b7f49bcce2c
2021-06-18Unhide BluetoothProfile.LE_AUDIO and getGroupId for the App usage.Alice Kuo
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 Ignore-AOSP-First: prevent merge conflict Change-Id: I32865720a8195b7c5ae29411cd1f3de95e7fc9b5
2021-06-17Merge "Bluetooth: add Volume Control Profile boilerpalate" am: ac034b8842 ↵Jakub Pawlowski
am: 126acb2597 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1736553 Change-Id: Ic5e77ef574940ec720f82e3d13026e6d74863bc2
2021-06-14Bluetooth: add Volume Control Profile boilerpalateŁukasz Rymanowski
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-04-16More Bluetooth API annotation updates.Jeff Sharkey
This change adds a "BluetoothPermissionChecker" that ensures that all Bluetooth permission annotations are consistent. In addition, it verifies that all Bluetooth public APIs have been audited to be permission protected where relevant. We've currently standardized on saying that APIs that return device or Bluetooth state information (without sharing details about any particular remote Bluetooth device) do not need to be permission protected. This change is only annotations and has no behavior changes. Bug: 183626724 Test: ./build/soong/soong_ui.bash --make-mode Bluetooth RUN_ERROR_PRONE=true Change-Id: Ie80b15b058359bf1e9a6ee881b89cb3e5b584ca1
2021-04-14Update Bluetooth API annotations.Jeff Sharkey
Recent work has introduced a new "Nearby devices" runtime permission which protects all existing Bluetooth APIs; we've done this by defining a <split-permission> to convert the old BLUETOOTH and BLUETOOTH_ADMIN permissions into one of three new permissions: * BLUETOOTH_ADVERTISE: Required to be able to advertise to nearby Bluetooth devices. * BLUETOOTH_CONNECT: Allows applications to connect to paired bluetooth devices. * BLUETOOTH_SCAN: Required to be able to discover and pair nearby Bluetooth devices. At its core, this change begins updating the Bluetooth APIs to have correct @RequiresPermission indicating which permission is actually enforced internally. To ensure alignment across Binder, the newly added "RequiresPermissionChecker" Error Prone checker was used to discover any inconsistencies, ensuring correctness from server-side enforcement up through to the public APIs. In addition, since developers will continue building apps for both modern and legacy platforms, this change introduces new auto-doc annotations which will emit helpful consistent documentation describing the behavior of older devices that are still using the old permission model. Bug: 183626724 Test: ./build/soong/soong_ui.bash --make-mode Bluetooth RUN_ERROR_PRONE=true Change-Id: I02aa127e8e07f239561f4f2a3bbdfc6fccb82f7f
2021-02-19Add BluetoothMapClient to system APIJoseph Pirozzo
Add BluetoothMapClient.sendMessage to system API for use by mainline modules. Bug: 157948464 Test: atest BluetoothInstrumentationTests Tag: #feature Change-Id: Idee4cb2cefeaf03f0351ea576f919a294219d391
2020-12-01Add Bluetooth LE Audio Profile (3/3)Grzegorz Kołodziejczyk
This is boilerplate code for Bluetooth LE Audio profile Bug: 150670922 Test: compilation Tag: #feature Change-Id: Iadc3af12fd8b2808db2f4e933a1906a819824ade
2020-11-04Add maxTargetSdk restriction to unused APIs.Mathew Inwood
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-01-21Make certain BluetoothProfile constants being used by CarBluetoothTestRahul Sabnis
into @SystemApi Bug: 146663105 Test: Manual Change-Id: Ic474a85c17b69c71cf24b06d0262c13b3b8142fe
2020-01-10Use new UnsupportedAppUsage annotation.Artur Satayev
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I6ab53570aca580fbee1fcc927871caa09780f58f Merged-In: I6ab53570aca580fbee1fcc927871caa09780f58f
2019-12-02Rename priority to connection policy in bluetooth apisRahul Sabnis
Bug: 145005327 Test: Manual Change-Id: I43ad57feb7dd70f39005ad7a01bc7dac6fb7b639
2019-11-21Resolve API dependencies on BluetoothPanRahul Sabnis
Bug: 143244283 Test: Manual Change-Id: Ie419b2f83358d06d094dcf4921c4595fc0e72857
2019-11-14Add method to convert profile ID into human readable stringUgo Yu
Bug: 136068566 Test: adb shell dumpsys bluetooth_manager Change-Id: I9f354ecbe20caf058c9de843180b7a07de7af569
2019-03-16Cleanup annontations for Hearing Aids Profile APIStanley Tng
Remove the @UnsupportedAppUsage and add the @IntDef for the Profile Connection States in the Hearing Aids Profile API. Also, the parent class BluetoothProfile has its Profile Connection States annontated. Bug: 128523382 Test: Compile only Change-Id: Ibd02516fa637ddb48d70a8dfacf607f047aec282
2019-01-22Add Android APIs for Hearing Aids ProfileStanley Tng
Add the new public Android APIs for the ASHA Hearing Aids Profile. Bug: 119617521 Bug: 120222233 Test: Run with the new HearingAidProfileTest CTS test Change-Id: I05fc3d565bd22b5000765122da7714d961dbc15b
2019-01-09Deprecate BluetoothHealth APIsJack He
* Mark all BluetoothHealth related APIs as deprecated * Make BluetoothAdapter#getProfileProxy(context, BluetoothProfile.HEALTH) always return false * Remove all logic behind BluetoothHealth APIs and add deprecation error log * Health Device Profile (HDP) and MCAP protocol has been largely replaced by BLE. New applications should use Bluetooth Low Energy instead of legacy Bluetooth Health Device Profile Bug: 111562841 Test: make, unit test, use Bluetooth Change-Id: If99a9d79e9e1b89b75b9b74bd3b1c965247a1892 Merged-In: If99a9d79e9e1b89b75b9b74bd3b1c965247a1892 (cherry picked from commit 07ffaa447fdd967689901cca38eba386a8d97b23)
2018-10-22Move some members to the "Q blacklist".Mathew Inwood
Based on some analysis, these fields/methods are likely false positives. Set maxTargetSdk=P so that any apps using them are required to migrate off them in future. See the bug for more details. Exempted-From-Owner-Approval: Automatic changes to the codebase affecting only @UnsupportedAppUsage annotations, themselves added without requiring owners approval earlier. Bug: 115609023 Test: m Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e (cherry picked from commit 7e50b2e0ee2efa6ca61a9f0116ccc0839f40e4f8)
2018-08-01Add @UnsupportedAppUsage annotationsMathew Inwood
For packages: android.bluetooth.le android.bluetooth This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: Ifcf24c0617acd7facc0e03f30a95c3a6b09b205c Merged-In: I88a1311e27c5f9a5f9d1035db76034f86f650efc
2018-03-16Add the AVRCP Target Service (2/2)Ajay Panicker
Add the AVRCP Target constant to Bluetooth Profile. Also remove redundant public static final modifier on the constants. Bug: 68854188 Test: Compiles and local test with service enabled Change-Id: If2ec607fc704c225f8903d438fe970dfafac25f1
2018-02-14Hearing Aid profileJakub Pawlowski
This is implementation of Hearing Aid Profile that will in future be connected to Bluetooth Manager - see TODOs in BluetoothHearingAid.java Bug: 69623109 Test: compilation. Manual test with HA. Change-Id: I79643ea1e14e9df7f5771169359c964a60c56618