summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothClass.java
AgeCommit message (Collapse)Author
2022-03-25Merge TP1A.220321.002Scott Lobdell
Change-Id: Ie8206e8b9c11c3fd55b7adddac5c782ad92c9da4
2022-03-18Merge changes from topic "bt-api-fix-v2" am: 1b64f3f923 am: 3fb9307c84 am: ↵Jack He
a0a323827e Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2030692 Change-Id: Ie5334acca6d00ea3ca870d3f5ca4832ccdde8ebc
2022-03-17BluetoothClass: Add documentation for constantsJack He
Bug: 215555854 Tag: #feature Test: make Change-Id: I6bafc92365fdb882ee3a2200e370214413c4b4f3
2022-03-17Merge TP1A.220310.002Daniel Norman
Change-Id: If2f3a2a6833c45ec4c0cba7c7e668a487938cb92
2022-03-11Merge TP1A.220225.003Scott Lobdell
Change-Id: Id71ac466dbfe3707fe2e544ce22b1da8f474ec2b
2022-03-08Fix after API_reviewWilliam Escande
* isMandatoryCodec is now public * SCAN_FAILED_OUT_OF_HARDWARE/SCANNING_TOO_FREQUENTLY is now public with a IntDef (method using the value are changed accordingly) * Update doc for EXTRA_BATTERY_LEVEL and EXTRA_PAIRING_INITIATOR and ACTION_CONNECTION_STATE_CHANGED * Add Autoclosable to BluetoothSap to remove the NotCloseable * BluetoothClass.Device.PERI* are now public Bug: 222725037 Fix: 221851154 Test: Build + TH Tag: #refactor CTS-Coverage-Bug: 222539659 Merged-In: Ia6aa778d6bdc0319266c52a84633ee593eaa7eb0 Change-Id: Ia6aa778d6bdc0319266c52a84633ee593eaa7eb0
2022-03-08Fix after API_reviewWilliam Escande
* isMandatoryCodec is now public * SCAN_FAILED_OUT_OF_HARDWARE/SCANNING_TOO_FREQUENTLY is now public with a IntDef (method using the value are changed accordingly) * Update doc for EXTRA_BATTERY_LEVEL and EXTRA_PAIRING_INITIATOR and ACTION_CONNECTION_STATE_CHANGED * Add Autoclosable to BluetoothSap to remove the NotCloseable * BluetoothClass.Device.PERI* are now public Bug: 222725037 Fix: 221851154 Test: Build + TH Tag: #refactor CTS-Coverage-Bug: 222539659 Ignore-AOSP-First: merge conflict resolution Change-Id: Ia6aa778d6bdc0319266c52a84633ee593eaa7eb0
2022-03-07Merge TP1A.220209.001Deyao Ren
Change-Id: Id0e2895d3220831d2c617a243047e8229af8acc9
2022-02-14Removed useless testapi annotationWilliam Escande
Fix: 218401294 Test: atest 'CtsBluetoothTestCases:android.bluetooth.cts.BluetoothClassTest' Merged-In: Ie47d71b5251f5e78083b8b60705fb1717057f5b6 Change-Id: Ie47d71b5251f5e78083b8b60705fb1717057f5b6
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-09Removed useless testapi annotationWilliam Escande
Ignore-AOSP-First: comming to AOSP soon Fix: 218401294 Test: atest 'CtsBluetoothTestCases:android.bluetooth.cts.BluetoothClassTest' Change-Id: Ie47d71b5251f5e78083b8b60705fb1717057f5b6
2022-02-04Merge TP1A.220120.003Haamed Gheibi
Change-Id: I202f5093bbd13b381ea11f969fee6154ba91fa11
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-07Merge "Bluetooth: add LE Audio COD constant definition" am: bd1d6ac73b am: ↵Treehugger Robot
63616465b6 am: d6489030fb am: e4207c17c8 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1937497 Change-Id: Ie6f8ff44d60719865b5ba8ce84919b4bffd003f4
2022-01-05Bluetooth: add LE Audio COD constant definitionJakub Pawlowski
Tag: #feature Test: compilation Bug: 150670922 Change-Id: Ic68cd1e9ce4f10d7c2388eeeabe67acad5e555ea
2021-11-22Made BluetoothClass#doesClassMatch public.Etienne Ruffieux
Removed UnsupportedAppUsage annotation, added SuppressLint annotation to SettingsLib usage. CTS-Coverage-Bug: 205159131 Tag: #feature Bug: 195158535 Test: Make Change-Id: Ie26f3b627ec725dc6abf4a1a0d01628ccbb2df77
2020-12-03Merge "BluetoothClass: Use mask to get MajorDeviceClass" am: a9f7570de6 am: ↵Treehugger Robot
c894726379 am: 11a22bdca2 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1516221 Change-Id: If4788ee4e28ee9a7dc571eea1ca15f751e2611ef
2020-12-02BluetoothClass: Use mask to get MajorDeviceClassMyles Watson
Bug: 174650196 Test: compiles Change-Id: I6042a02fa329c5291aa7b9719907485e748582bf
2020-10-15Add @Nullable annotation to the parameter of Object.equals() methods.Roman Kalukiewicz
Those annotations could be inferred by some tools (like Kotlin), but the https://checkerframework.org/ doesn't check inherited annotations complaining about all equals() invocations that get nullable argument. The change was generated by running find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /' in the frameworks/base directory and by automatically adding and formatting required imports if needed. No manual edits. Bug: 170883422 Test: Annotation change only. Should have not impact. Exempt-From-Owner-Approval: Mechanical change not specific to any component. Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
2020-01-09Use 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-18Use 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
2019-02-28All Parcelable CREATOR fields are @NonNull.Jeff Sharkey
If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
2018-12-28Limit access to suspected false positives.Mathew Inwood
Members modified herein are suspected to be false positives: i.e. things that were added to the greylist in P, but subsequent data analysis suggests that they are not, in fact, used after all. Add a maxTargetSdk=P to these APIs. This is lower-risk that simply removing these things from the greylist, as none of out data sources are perfect nor complete. For APIs that are not supported yet by annotations, move them to hiddenapi-greylist-max-p.txt instead which has the same effect. Exempted-From-Owner-Approval: Automatic changes to the codebase affecting only @UnsupportedAppUsage annotations, themselves added without requiring owners approval earlier. Bug: 115609023 Test: m Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
2018-08-06Mark BluetoothClass#getClassOfDevice as TestApiRalph Nathan
This method is being used the Android Things instrumentation test apk. Bug: 111654175 Test: tests pass Change-Id: Id3fcd2d89789868e50048542fd1dfe25d9986103
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
2017-09-20Modify Bluetooth Class of Device from Android stackPulkit Bhuwalka
Bug: 36015415 Test: Modified Class of Device using sample app and verified device icon change when discovering from a remote device. Change-Id: Ie25f10be5560f9c090ebe489d5f3bb00cbca81ef
2017-08-24Fix checkstyle errors (2/2)Jack He
* 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
2017-08-24Fix checkstyle errors (1/2)Jack He
* Automatic style corrections through IDE Bug: 63596319 Test: make checkbuild, no manual changes, no functional changes Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
2016-01-14Add support for AVRCP 1.3.Sanket Agarwal
* Add metadata support. * Add player settings support. * Add playback support. A2DP Settings App support. Bluetooth: A2DP Sink support for Settings App - add support for A2DP Sink in Settings App. This will enable connection initiation and updation on Settings App - add framework Apis to support A2DP Sink. Any third party Apps can access A2DP Sink priority of device and playing state of device - add support for key to set priority. This manages priority of device for A2DP Sink profile Change-Id: If5f9139f37cdb9d200387877c7801075205c78a0
2011-01-06Follow the spec recommendation for keyboard pairing.Jaikumar Ganesh
Generate a variable pin and show it to the user. Change-Id: Id4aae7a16f25c67d6c6ead6fd936cb14087f3c7a
2010-09-30resolved conflicts for merge of c242248f to masterJake Hamby
Change-Id: I8810cc6dbd532de002d6a623ad93e86afb48c0b4
2010-09-30Typo fixes in comments and minor code cleanups.Jake Hamby
* Fix some typos in Javadoc and log messages. * Remove redundant initializer in BluetoothAdapter.readOutOfBandData() * Use canonical "UTF-8" charset name instead of "UTF8" in BluetoothDevice.convertPinToBytes() Change-Id: I58cd5dc48a7ad0053d204c5f590b4b3d438d8672
2010-08-23Add Tethering class bit check.Jaikumar Ganesh
Change-Id: Iaa87c91c4b3db3b77c2e6c4f559fa2e438c9c247
2010-06-21Changes for bluetooth keyboard support.Adam Powell
Add device class constant for PROFILE_HID and check for Device.Major.PERIPHERAL when checking for class matches. Change UUID for HID support. Fix bug in BluetoothService. Change-Id: Ie5361257d90fd749249e915824564bc3d79fb95d
2009-12-09docs: add the Bluetooth developer guide,Scott Main
and make some revisions to the BT javadocs
2009-11-09docs: add more documentation for the bluetooth apis.Scott Main
more descriptions for some of the classes and a new overview and pseudo-code example for using BT APIs in the package summary.
2009-09-17Do not @hide Parcelable implementations in BluetoothClass and BluetoothDevice.Nick Pelly
Change-Id: I92389c53a9b99c9507f78898329ff87b631c7aa3
2009-09-10API_CHANGE: Cleanup, javadoc and unhide more Bluetooth API.Nick Pelly
This is a large batch, and covers: -- Bluetooth Device Discovery -- BluetoothAdapter.ACTION_DISCOVERY_STARTED BluetoothAdapter.ACTION_DISCOVERY_FINISHED BluetoothAdapter.startDiscovery() BluetoothAdapter.cancelDiscovery() BluetoothAdapter.isDiscovering() -- Bluetooth bonding (pairing) -- BluetoothAdapter.getBondedDevices() BluetoothDevice.ACTION_BOND_STATE_CHANGED BluetoothDevice.EXTRA_BOND_STATE BluetoothDevice.EXTRA_PREVIOUS_BOND_STATE BluetoothDevice.BOND_NONE BluetoothDevice.BOND_BONDING BluetoothDevice.BOND_BONDED BluetoothDevice.getBondState() BluetoothDevice.createBond() BluetoothDevice.cancelBondProcess() BluetoothDevice.removeBond() -- BluetoothClass -- BluetoothDevice.ACTION_CLASS_CHANGED BluetoothDevice.EXTRA_CLASS BluetoothDevice.getBluetoothClass() BluetoothClass.Service.* BluetoothClass.Device.Major.* BluetoothClass.Device.* BluetoothClass.getDeviceClass() BluetoothClass.getMajorDeviceClass() BluetoothClass.hasService() -- Misc BluetoothDevice -- BluetoothDevice.ACTION_ACL_CONNECTED BluetoothDevice.ACTION_ACL_DISCONNECTED_REQUESTED BluetoothDevice.ACTION_ACL_DISCONNECTED BluetoothDevice.ACTION_DISCOVERED BluetoothDevice.ACTION_NAME_CHANGED BluetoothDevice.EXTRA_DEVICE BluetoothDevice.EXTRA_NAME BluetoothDevice.EXTRA_RSSI -- Misc BluetoothAdapter -- BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED BluetoothAdapter.EXTRA_LOCAL_NAME BluetoothAdapter.checkBluetoothAddress() I deprecated BluetoothIntent and moved each intent into the class it relates to. Change-Id: I877b1280428ab46278b2bc25668bb44cda22dc36
2009-08-19Add Bluetooth device picker supportYue Lixin
- add Intent and Extra definition - move profile filter into BluetoothClass
2009-03-03auto import from //depot/cupcake/@135843The Android Open Source Project
2009-03-03auto import from //depot/cupcake/@135843The Android Open Source Project
2008-12-17Code drop from //branches/cupcake/...@124589The Android Open Source Project