aboutsummaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothGattCharacteristic.java
Commit message (Collapse)AuthorAgeFilesLines
* Address API council feedback on GATT API changes.Rahul Sabnis2022-03-171-1/+13
| | | | | | | | | | | This CL also updates the permission enforcement mechanism for GATT APIs so it now throws a SecurityException on new APIs as well as on older APIs called by apps targeting T+. Tag: #feature Bug: 217742355 Test: Manual Change-Id: I87fe2ffd088cbce4a9887538964e73f3f5198157
* Deprecate GATT callbacks and methods that were not memory safe andRahul Sabnis2021-11-051-2/+33
| | | | | | | | | | | replace with memory safe versions. Tag: #feature Bug: 195157393 Test: Manual CTS-Coverage-Bug: 205190062 Merged-In: I5ae604ec20febcf646bfe6a8f866b218448349c1 Change-Id: I5ae604ec20febcf646bfe6a8f866b218448349c1
* Update Bluetooth API annotations.Jeff Sharkey2021-04-141-2/+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
* Update language to comply with Android's inclusive language guidanceJeff Sharkey2020-09-141-3/+3
| | | | | | | | | See https://source.android.com/setup/contribute/respectful-code for reference Test: none Bug: 168334533 Exempt-From-Owner-Approval: docs updates Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-091-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
* All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | 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
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-021-0/+5
| | | | | | | | | | | | | | | | | 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: I88a1311e27c5f9a5f9d1035db76034f86f650efc
* Merge "docs: Typo fixes" into oc-mr1-devAndrew Solovay2017-10-281-1/+1
|\ | | | | | | | | | | am: ab9449561e Change-Id: I6edaeba7a59fab7fafe7847a6b27dbba8313d233
| * docs: Typo fixesAndrew Solovay2017-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | See first comment for doc stage location. Change-Id: I29661ffab0ff10021671df0b725c9f9b12430960 Bug: 67886596 Bug: 67932414 Test: make ds-docs
* | Fix checkstyle errors (2/2)Jack He2017-08-241-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-61/+71
|/ | | | | | | | * Automatic style corrections through IDE Bug: 63596319 Test: make checkbuild, no manual changes, no functional changes Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
* GATT Server refactoring (2/4)Jakub Pawlowski2016-08-021-2/+10
| | | | | Bug: 27999121 Change-Id: Ia5f91298a4b01b62adebc8adc30f27f757259588
* Fix GATT Characteristic write type serializationJakub Pawlowski2016-05-111-0/+4
| | | | | | | | | Default writeType for GATT characteristic was not being serialized into Parcel. This cause errors when trying to write into Characteristic. Bug: 27910548 Change-Id: Ib2f88cf991123eaea244f16fa36deb0d773c5a33
* Change how services are passed up to the stackJakub Pawlowski2016-03-181-1/+57
| | | | | | | | Right now we pass all services, characteristics and descriptors one by one. This patch changes that - now we pass whole GATT database at once. Bug: 27455533 Change-Id: Ie42cd80072538e411904b9c9b011a978f26158b9
* Prevent NullPointerException in getStringValue if no value is setAndre Eisenbach2014-12-091-1/+1
| | | | | Bug: 18686365 Change-Id: I5f5d07ef49500e0d8118ba04aaf373ae4514f034
* Remove unused imports from frameworks/base.John Spurlock2013-11-201-1/+0
| | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* LE: Add instance ID to descriptors (1/4)Andre Eisenbach2013-08-131-0/+14
| | | | | | | If a remote devices offers multiple descriptors with the same UUID, the instance ID is used to differentiate between them. Change-Id: I0c36494c980c86abd23f9647196af8d59ef663e9
* Change BluetoothGattCallback methods argument from BluetoothDevice to ↵Matthew Xie2013-04-031-0/+4
| | | | | | | | | | | | | BluetoothGatt Change name of BluetoothDevice#connectGattServer to BluetoothDevice#connectGatt Add BluetoothGatt#getDevice to retrieve device from BluetoothGatt Add BluetoothGatt#connect() to reconnect back to the server. Make BluetoothGatt#close() public to clean up/unregister callback Add BluetoothDevice.getType() to return int of bug 8529188 Change-Id: Iebd9ac68cc7a64c43972e617dd3068f66c8ea0b2
* Unhide Bluetooth Low Energy public APIsMatthew Xie2013-03-281-42/+49
| | | | | | | | | | Updated API headers. Add BluetoothManager to be retrieved by context.getSystemService(Context.BLUETOOTH_SERVICE). LE scan functions are placed in BluetoothAdapter The GATT API are device driven instead of a profile-driver. bug 8450158 Change-Id: I424a4cedaac3ef8120a05996500008dd210d2553
* Fixed 32 bit characteristic value assignmentAndre Eisenbach2013-03-121-1/+2
| | | | | | Also fixed link in comment. Change-Id: I27223b8aadae2fc7c8037abc6396760e23f6f161
* Initial version of BLE support for BluedroidGanesh Ganapathi Batta2013-02-271-0/+670
The API classes are hidden for now. Will unhide after API console approval. Change-Id: I8283dd562fd6189fdd15c866ef2efb8bbdbc4109