summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothGattCharacteristic.java
AgeCommit message (Collapse)Author
2022-03-17Address API council feedback on GATT API changes.Rahul Sabnis
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
2021-11-05Deprecate GATT callbacks and methods that were not memory safe andRahul Sabnis
replace with memory safe versions. Tag: #feature Bug: 195157393 Test: Manual CTS-Coverage-Bug: 205190062 Merged-In: I5ae604ec20febcf646bfe6a8f866b218448349c1 Change-Id: I5ae604ec20febcf646bfe6a8f866b218448349c1
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
2020-09-14Update language to comply with Android's inclusive language guidanceJeff Sharkey
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-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-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-08-02Add @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: I88a1311e27c5f9a5f9d1035db76034f86f650efc
2017-10-28Merge "docs: Typo fixes" into oc-mr1-devAndrew Solovay
am: ab9449561e Change-Id: I6edaeba7a59fab7fafe7847a6b27dbba8313d233
2017-10-27docs: Typo fixesAndrew Solovay
See first comment for doc stage location. Change-Id: I29661ffab0ff10021671df0b725c9f9b12430960 Bug: 67886596 Bug: 67932414 Test: make ds-docs
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-08-02GATT Server refactoring (2/4)Jakub Pawlowski
Bug: 27999121 Change-Id: Ia5f91298a4b01b62adebc8adc30f27f757259588
2016-05-11Fix GATT Characteristic write type serializationJakub Pawlowski
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
2016-03-18Change how services are passed up to the stackJakub Pawlowski
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
2014-12-09Prevent NullPointerException in getStringValue if no value is setAndre Eisenbach
Bug: 18686365 Change-Id: I5f5d07ef49500e0d8118ba04aaf373ae4514f034
2013-11-20Remove unused imports from frameworks/base.John Spurlock
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
2013-08-13LE: Add instance ID to descriptors (1/4)Andre Eisenbach
If a remote devices offers multiple descriptors with the same UUID, the instance ID is used to differentiate between them. Change-Id: I0c36494c980c86abd23f9647196af8d59ef663e9
2013-04-03Change BluetoothGattCallback methods argument from BluetoothDevice to ↵Matthew Xie
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
2013-03-28Unhide Bluetooth Low Energy public APIsMatthew Xie
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
2013-03-12Fixed 32 bit characteristic value assignmentAndre Eisenbach
Also fixed link in comment. Change-Id: I27223b8aadae2fc7c8037abc6396760e23f6f161
2013-02-27Initial version of BLE support for BluedroidGanesh Ganapathi Batta
The API classes are hidden for now. Will unhide after API console approval. Change-Id: I8283dd562fd6189fdd15c866ef2efb8bbdbc4109