summaryrefslogtreecommitdiffstats
path: root/src/com/android/bluetooth/gatt/HandleMap.java
diff options
context:
space:
mode:
authorWei Wang <weiwa@google.com>2013-10-29 21:20:05 -0700
committerWei Wang <weiwa@google.com>2013-12-19 22:04:43 +0000
commita08fff0ae81757bdab00ae8865a906c711d5572f (patch)
treedab261ec02a46b23d5e8526831bcaccb14737cbb /src/com/android/bluetooth/gatt/HandleMap.java
parentdaaec40bbe227e6ee735da947afc72777f66c65d (diff)
downloadandroid_packages_apps_Bluetooth-a08fff0ae81757bdab00ae8865a906c711d5572f.tar.gz
android_packages_apps_Bluetooth-a08fff0ae81757bdab00ae8865a906c711d5572f.tar.bz2
android_packages_apps_Bluetooth-a08fff0ae81757bdab00ae8865a906c711d5572f.zip
BLE peripheral mode (2/4): Gatt Service Change.
Change-Id: I0ea7df8c159ad388d8e58768c49e785e9a4694bb
Diffstat (limited to 'src/com/android/bluetooth/gatt/HandleMap.java')
-rw-r--r--src/com/android/bluetooth/gatt/HandleMap.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/com/android/bluetooth/gatt/HandleMap.java b/src/com/android/bluetooth/gatt/HandleMap.java
index 5d45654b9..187625a43 100644
--- a/src/com/android/bluetooth/gatt/HandleMap.java
+++ b/src/com/android/bluetooth/gatt/HandleMap.java
@@ -42,6 +42,7 @@ class HandleMap {
int serviceHandle = 0;
int charHandle = 0;
boolean started = false;
+ boolean advertisePreferred = false;
Entry(int serverIf, int handle, UUID uuid, int serviceType, int instance) {
this.serverIf = serverIf;
@@ -52,6 +53,17 @@ class HandleMap {
this.serviceType = serviceType;
}
+ Entry(int serverIf, int handle, UUID uuid, int serviceType, int instance,
+ boolean advertisePreferred) {
+ this.serverIf = serverIf;
+ this.type = TYPE_SERVICE;
+ this.handle = handle;
+ this.uuid = uuid;
+ this.instance = instance;
+ this.serviceType = serviceType;
+ this.advertisePreferred = advertisePreferred;
+ }
+
Entry(int serverIf, int type, int handle, UUID uuid, int serviceHandle) {
this.serverIf = serverIf;
this.type = type;
@@ -86,8 +98,9 @@ class HandleMap {
mRequestMap.clear();
}
- void addService(int serverIf, int handle, UUID uuid, int serviceType, int instance) {
- mEntries.add(new Entry(serverIf, handle, uuid, serviceType, instance));
+ void addService(int serverIf, int handle, UUID uuid, int serviceType, int instance,
+ boolean advertisePreferred) {
+ mEntries.add(new Entry(serverIf, handle, uuid, serviceType, instance, advertisePreferred));
}
void addCharacteristic(int serverIf, int handle, UUID uuid, int serviceHandle) {