summaryrefslogtreecommitdiff
path: root/core/java/android/bluetooth/BluetoothProfile.java
Commit message (Collapse)AuthorAgeFilesLines
* Migrating frameworks/base BT filesRoopa Sattiraju2022-01-171-459/+0
| | | | | | Bug: 206121418 Test: Compile Change-Id: Idb55371e9d678296fe46e5f4231ec2d12ec8b978
* gtbs: Add Generic Telephone Bearer Service supportMariusz Skamra2022-01-111-1/+8
| | | | | | | | | Tag: #feature Bug: 159786353 Bug: 213412267 Sponsor: jpawlowski@ Test: build Change-Id: Iecd56b91ce59f6b014878691fe4c6fae826b73f9
* Revert "gtbs: Add Generic Telephone Bearer Service support"Jack He2022-01-071-8/+1
| | | | | | | | | | | | | | | | | 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
* gtbs: Add Generic Telephone Bearer Service supportMariusz Skamra2021-12-171-1/+8
| | | | | | | | Tag: #feature Bug: 159786353 Sponsor: jpawlowski@ Test: build Change-Id: I8264ade4b07df17fc0207437dfdcae7028cc20ff
* Merge "Add BluetoothLeBroadcast profile API."Qasim Javed2021-12-061-1/+8
|\
| * Add BluetoothLeBroadcast profile API.Qasim Javed2021-12-051-1/+8
| | | | | | | | | | | | | | | | | | | | | | Implementation for the APIs will be added later. Bug: 205174140 Bug: 208222281 Tag: #feature Test: gd/cert/run Change-Id: I8781be89cba45a6e7a76fec7df24790a9f02d6a6
* | Bluetooth: Pretty print LE Audio profile name in logsJakub Pawlowski2021-12-021-0/+2
|/ | | | | Bug: 159786353 Change-Id: I1157a34fa91883a861ff0573431009823c2cd8b1
* Merge "csip: Add constants for the Coordinated Set Identification Profile" ↵Jakub Pawlowski2021-08-301-1/+7
|\ | | | | | | | | | | | | | | am: 54beaf2012 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1807297 Change-Id: I707c1fdd5831763a3bcdfa819e61ea3b01707110
| * csip: Add constants for the Coordinated Set Identification ProfileŁukasz Rymanowski2021-08-241-1/+7
| | | | | | | | | | | | | | | | Bug: 150670922 Tag: #feature Test: compilation Sponsor: jpawlowski@ Change-Id: I331fe270b75f306d57a15933ab4afa2e48c8bf50
* | Merge changes Icabed06e,I25bc13c6 am: afce05e2e5 am: 9de9c7f693Treehugger Robot2021-08-101-1/+8
|\| | | | | | | | | | | Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1683328 Change-Id: I50a17e3b0a1d0da3794db7704585a7d1df3af14e
| * Bluetooth: Add Media Control ProfileJakub Tyszkowski2021-08-091-1/+8
| | | | | | | | | | | | | | | | Tag: #feature Bug: 150670922 Sponsor: jpawlowski@ Test: compilation Change-Id: Icabed06e6b1973ecee9cd1d6eeec80c6d2a9d72e
| * Unhide BluetoothProfile.LE_AUDIO and getGroupId for the App usage.Alice Kuo2021-06-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Bluetooth: fix comments on Volume Control Profile reviewJakub Pawlowski2021-06-181-0/+2
| | | | | | | | | | | | | | Bug: 150670922 Test: compilation Merged-In: I72b36b77aa97aa9501d13ecdfe0b9b7f49bcce2c Change-Id: I72b36b77aa97aa9501d13ecdfe0b9b7f49bcce2c
* | Bluetooth: fix comments on Volume Control Profile reviewJakub Pawlowski2021-06-191-0/+2
| | | | | | | | | | | | | | | | Bug: 150670922 Test: compilation Merged-In: I72b36b77aa97aa9501d13ecdfe0b9b7f49bcce2c Change-Id: I72b36b77aa97aa9501d13ecdfe0b9b7f49bcce2c (cherry picked from commit 37c700dbbebfa6d7da0cd715d4eac178b82749b3)
* | Unhide BluetoothProfile.LE_AUDIO and getGroupId for the App usage.Alice Kuo2021-06-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Bluetooth: add Volume Control Profile boilerpalate" am: 0778be8099 ↵Jakub Pawlowski2021-06-171-1/+7
|\| | | | | | | | | | | | | | | am: 46a57e4af2 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1736553 Change-Id: Ic5e77ef574940ec720f82e3d13026e6d74863bc2
| * Bluetooth: add Volume Control Profile boilerpalateŁukasz Rymanowski2021-06-141-1/+7
| | | | | | | | | | | | | | | | | | | | | | 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
* | More Bluetooth API annotation updates.Jeff Sharkey2021-04-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Update Bluetooth API annotations.Jeff Sharkey2021-04-141-6/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add BluetoothMapClient to system APIJoseph Pirozzo2021-02-191-0/+1
| | | | | | | | | | Add BluetoothMapClient.sendMessage to system API for use by mainline modules. Bug: 157948464 Test: atest BluetoothInstrumentationTests Tag: #feature Change-Id: Idee4cb2cefeaf03f0351ea576f919a294219d391
* Add Bluetooth LE Audio Profile (3/3)Grzegorz Kołodziejczyk2020-12-011-1/+8
| | | | | | | | | This is boilerplate code for Bluetooth LE Audio profile Bug: 150670922 Test: compilation Tag: #feature Change-Id: Iadc3af12fd8b2808db2f4e933a1906a819824ade
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-11-041-1/+2
| | | | | | | | | | | 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
* Make certain BluetoothProfile constants being used by CarBluetoothTestRahul Sabnis2020-01-211-2/+4
| | | | | | | | into @SystemApi Bug: 146663105 Test: Manual Change-Id: Ic474a85c17b69c71cf24b06d0262c13b3b8142fe
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-101-1/+1
| | | | | | | | | 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
* Rename priority to connection policy in bluetooth apisRahul Sabnis2019-12-021-0/+36
| | | | | | Bug: 145005327 Test: Manual Change-Id: I43ad57feb7dd70f39005ad7a01bc7dac6fb7b639
* Resolve API dependencies on BluetoothPanRahul Sabnis2019-11-211-2/+4
| | | | | | Bug: 143244283 Test: Manual Change-Id: Ie419b2f83358d06d094dcf4921c4595fc0e72857
* Add method to convert profile ID into human readable stringUgo Yu2019-11-141-0/+50
| | | | | | Bug: 136068566 Test: adb shell dumpsys bluetooth_manager Change-Id: I9f354ecbe20caf058c9de843180b7a07de7af569
* Cleanup annontations for Hearing Aids Profile APIStanley Tng2019-03-161-1/+14
| | | | | | | | | | 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
* Add Android APIs for Hearing Aids ProfileStanley Tng2019-01-221-1/+0
| | | | | | | | | 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
* Deprecate BluetoothHealth APIsJack He2019-01-091-4/+9
| | | | | | | | | | | | | | | | * 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 2be70a11a2dff8c801fdf044d34657b41c2006c5)
* Move some members to the "Q blacklist".Mathew Inwood2018-10-221-1/+2
| | | | | | | | | | | | | | | | 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 8c854f86a477fbbee38092f449333e1425e5cd7e)
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-011-0/+6
| | | | | | | | | | | | | | | | | | 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
* Add the AVRCP Target Service (2/2)Ajay Panicker2018-03-161-27/+34
| | | | | | | | | 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
* Hearing Aid profileJakub Pawlowski2018-02-141-1/+8
| | | | | | | | | 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
* Make Bluetooth constants used by gmscore a system apiSelim Gurun2018-01-091-0/+3
| | | | | | | | | These constants are used by GMSCore car module via reflection. Make them system API. Bug: 67052734 Test: Manual - and using make update-api Change-Id: I0709c0e0eb9fcb9fb29d575e9b74927a70b2a924
* BluetoothProfile: Add Object Push Profile (OPP)Myles Watson2018-01-091-1/+8
| | | | | Test: toggle Bluetooth Change-Id: I5aec940ba3d6c6364c2de667426d98d0b3cea0c6
* Publish Bluetooth HID Device Profile Service APIHansong Zhang2017-12-151-2/+0
| | | | | | | | | | Enable the BluetoothHidDevice API in framework. Bug: 63384609 Test: SL4A HID test; test with apps using BluetoothHidDevice Merged-In: I52ca4674f11179f865bdff22e0289dfe893c40f5 Change-Id: I52ca4674f11179f865bdff22e0289dfe893c40f5 (cherry picked from commit 7bb587d72b8bb5ba8bd2d7530dbd89b4faac289f)
* Bluetooth: Add convenience method to convert connection state to stringJack He2017-12-111-0/+24
| | | | | | | | | | | * Add method to convert the following state values to string - BluetoothHeadset.STATE_DISCONNECTED - BluetoothHeadset.STATE_CONNECTING - BluetoothHeadset.STATE_CONNECTED - BluetoothHeadset.STATE_DISCONNECTING Test: make Change-Id: Iaa5b6e35d3214ded8edbe29d626e0869651417d1
* Change Bluetooth HID Profile Name (1/6)Hansong Zhang2017-10-231-4/+4
| | | | | | | | | | | | | | | | | | Make the Bluetooth HID profile name consistent with the Bluetooth HID service name. BluetoothInputHost → BluetoothHidDevice BluetoothInputDevice → BluetoothHidHost IBluetoothInputHost → IBluetoothHidDevice IBluetoothInputDevice → IBluetoothHidHost BluetoothProfile.INPUT_HOST → BluetoothProfile.HID_DEVICE BluetoothProfile.INPUT_DEVICE → BluetoothProfile.HID_HOST (Cherry-picked from commit c26c76c63d933f8057f795d05624f91b811c8c71) Merged-In: Iadb890a54dd3d6868b87514472bbac6bb0c6179f Bug: 68055651 Test: make Change-Id: Iadb890a54dd3d6868b87514472bbac6bb0c6179f
* Fix checkstyle errors (2/2)Jack He2017-08-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * Manual style corrections with IDE assistance * Variable name refactors are done through IDE * Corrected general style errors such as: - "final private var" -> "private final var" - "&&", "+", "||" should not be at the end of line - Non-static private variable should be like "mVar" - Private static variable should be like "sVar" - Code file should always end with newline - Inherited methods should be annotated with @Override and no @hide tags - Public methods should always have a JavaDoc entry - "int[] array" is preferred over "int array[]" - private methods should be accessed without "this." when there is no name collisions. - "boolean ? true : false" -> boolean - "boolean ? false : true" -> !boolean - "boolean == true" OR "boolean != false" -> boolean - "boolean != true" OR "boolean == false" -> !boolean Bug: 63596319 Test: make checkbuild, no functional changes Change-Id: Iabdc2be912a32dd63a53213d175cf1bfef268ccd
* Fix checkstyle errors (1/2)Jack He2017-08-241-18/+31
| | | | | | | | * Automatic style corrections through IDE Bug: 63596319 Test: make checkbuild, no manual changes, no functional changes Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
* More auto-doc work.Jeff Sharkey2017-04-211-6/+0
| | | | | | | | | | | | | | Add support for AnyThread, CallSuper, and UiThread. Another related CL started documenting @RequiresPermission, so remove duplicated information in existing APIs. Suppress auto-doc on a handful of classes that are already well-documented. Test: make -j32 offline-sdk-docs Bug: 37526420 Change-Id: I791437dccec0f11d5349a23b982ba098cb551af8
* Rename the Bluetooth profile classes for HID Device role.Ivan Podogov2016-12-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | We already have BluetoothInputDevice class, so adding something called BluetoothHidDevice seems confusing. On the other hand, the new class is designed to connect to HID Host devices, so naming it BluetoothInputHost makes sense and goes in line with the existing BluetoothInputDevice. The same goes for the new constant HID_DEVICE that is just as confusing to have together with the INPUT_DEVICE one. This CL also renames the "connection state changed" broadcast (for the same reasons), declares it as an SDK constant, and also adds some javadoc to it. Note that BluetoothHidDeviceApp* classes remained unchanged, as those correspond to the app that implements the Device (and connects to the Host). Test: make Change-Id: I5075ca5b97db3c1dd403c2e9660eecc7380cffe2
* Bluetooth: Add support for HID Device RoleHemant Gupta2016-12-291-1/+7
| | | | | | | | | This patch adds the HID Device Role support in Bluetooth framework. Also AIDL and callback related files for HID Device role are added to provide interface for third party applications to communicate with HID Device Service. Change-Id: Id03a362b7bcfa2e76056fa0197eaac12ce49b5a2
* MAP MCEJoseph Pirozzo2016-11-011-1/+7
| | | | | | | | | | Add MAP client code into packages/apps/Bluetooth. Changes here are to define the MAP MCE interface and enable its selection when running on a device that is also running a PBAP client (Car Kitt). Bug: 30467210 Change-Id: Ifa2cdea7d67f63a2b5f3d971df8ec6d321dc5fee (cherry picked from commit 433b3054847951e8e7b3864d11990604a66b8651)
* Add a way to query for supported Bluetooth profiles.Bryce Lee2016-11-011-0/+7
| | | | | | | | | | | | Currently there is no way to get the profiles supported by the Bluetooth adapter. Asking for a profile proxy of an unsupported profile does not fail and can lead to code indefinitely waiting for the proxy response. This new code will allow for checking the supported profiles before asking for the proxies. Bug: 26451648 Change-Id: I4b48e7151f5ca53851aa3b967c143fae140ecd34 (cherry picked from commit b1301fa2849bafd6daa422281dc5200863bc761e)
* Add BluetoothProfile for PBAP PCE role.Joseph Pirozzo2016-03-141-0/+6
| | | | | | | Create a new Bluetooth profile for Pbap Client. Bug: 27490041 Change-Id: I77d2c7eeeb8e955ea61386d784b02b14f415b318
* Remove duplicate Bluetooth profiles.Bryce Lee2015-12-181-12/+0
| | | | Change-Id: I04fd867511713dd02ef249b113f7a46c69f22f98
* Add setting for declaring disabled bluetooth profiles.Bryce Lee2015-12-161-0/+12
| | | | | Bug: 25900899 Change-Id: I420a7c590d72ba10f3e466d15dccfdbb520e810a
* Add bluetooth permission annotationsTor Norbye2015-05-151-0/+6
| | | | Change-Id: I5bc86f8ec6ea5c873f1e14dab0e0c47c5c9df7f7