summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorStanley Tng <stng@google.com>2018-04-13 14:54:10 -0700
committerStanley Tng <stng@google.com>2018-04-18 16:10:11 -0700
commitd0c1b23e06ef350ce9d6bb3f6fcc2f7de5e50216 (patch)
treeaac8de95a0ac02a0a2f355e685ec24346bea8a25 /core/java
parent03ddb28cda9ee91245f24fdfb4839a6e68e3bced (diff)
Clarify API doc for BluetoothGattServer::addService
Clarify that the caller has to wait for onServiceAdded callback before calling BluetoothGattServer::addService again. Bug: 72717069 Test: Compile Change-Id: I20b031c724ba64bfd71cf10e58e587f69e4a2555 (cherry picked from commit 4b5cf4856064efbc018c0f2b4d6d3ff199403ee0)
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/bluetooth/BluetoothGattServer.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/bluetooth/BluetoothGattServer.java b/core/java/android/bluetooth/BluetoothGattServer.java
index 4ed250043ae9..ef1b0bd71885 100644
--- a/core/java/android/bluetooth/BluetoothGattServer.java
+++ b/core/java/android/bluetooth/BluetoothGattServer.java
@@ -701,10 +701,14 @@ public final class BluetoothGattServer implements BluetoothProfile {
* <p>If the local device has already exposed services when this function
* is called, a service update notification will be sent to all clients.
*
+ * <p>The {@link BluetoothGattServerCallback#onServiceAdded} callback will indicate
+ * whether this service has been added successfully. Do not add another service
+ * before this callback.
+ *
* <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
*
* @param service Service to be added to the list of services provided by this device.
- * @return true, if the service has been added successfully
+ * @return true, if the request to add service has been initiated
*/
public boolean addService(BluetoothGattService service) {
if (DBG) Log.d(TAG, "addService() - service: " + service.getUuid());