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 | 18c76934f62410d1499e2eb63635b5dd8da5013a (patch) | |
| tree | c22c2957b2ce7cd366e7eb399810b86f2946edb6 /core/java/android/bluetooth/BluetoothGattService.java | |
| parent | e754e7880a76d23f06235e200e42704e1ace2977 (diff) | |
| download | frameworks_base-18c76934f62410d1499e2eb63635b5dd8da5013a.zip frameworks_base-18c76934f62410d1499e2eb63635b5dd8da5013a.tar.gz frameworks_base-18c76934f62410d1499e2eb63635b5dd8da5013a.tar.bz2 | |
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 'core/java/android/bluetooth/BluetoothGattService.java')
| -rw-r--r-- | core/java/android/bluetooth/BluetoothGattService.java | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/core/java/android/bluetooth/BluetoothGattService.java b/core/java/android/bluetooth/BluetoothGattService.java index 1e66369..52bc0f7 100644 --- a/core/java/android/bluetooth/BluetoothGattService.java +++ b/core/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; + } } |
