diff options
author | Wei Wang <weiwa@google.com> | 2013-10-29 21:05:37 -0700 |
---|---|---|
committer | Wei Wang <weiwa@google.com> | 2013-12-19 16:33:32 -0800 |
commit | 2f7544ce3f0c2e0697318e9961c4ced457b71d5f (patch) | |
tree | a4a0e738a34adef4ab93c3d42e31fd59df5034e9 /framework/java/android/bluetooth/BluetoothGattService.java | |
parent | 609e9389988f9c15cbb6f8db677a359c1e024039 (diff) |
BLE peripheral mode (3/4): Add peripheral mode API.
Change-Id: Id9d2f566b6d9ed0fffe73b67efad2e3d045360b4
Conflicts:
core/java/android/bluetooth/BluetoothAdapter.java
core/java/android/bluetooth/BluetoothGatt.java
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothGattService.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothGattService.java | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/framework/java/android/bluetooth/BluetoothGattService.java b/framework/java/android/bluetooth/BluetoothGattService.java index 1e66369601..52bc0f796c 100644 --- a/framework/java/android/bluetooth/BluetoothGattService.java +++ b/framework/java/android/bluetooth/BluetoothGattService.java @@ -15,8 +15,6 @@ */ package android.bluetooth; -import android.bluetooth.BluetoothDevice; - import java.util.ArrayList; import java.util.List; import java.util.UUID; @@ -82,6 +80,11 @@ public class BluetoothGattService { protected List<BluetoothGattService> mIncludedServices; /** + * Whether the service uuid should be advertised. + */ + private boolean mAdvertisePreferred; + + /** * Create a new BluetoothGattService. * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission. * @@ -263,4 +266,20 @@ public class BluetoothGattService { } return null; } + + /** + * Returns whether the uuid of the service should be advertised. + * @hide + */ + public boolean isAdvertisePreferred() { + return mAdvertisePreferred; + } + + /** + * Set whether the service uuid should be advertised. + * @hide + */ + public void setAdvertisePreferred(boolean advertisePreferred) { + this.mAdvertisePreferred = advertisePreferred; + } } |