summaryrefslogtreecommitdiffstats
path: root/src/com/android/bluetooth
diff options
context:
space:
mode:
authorAndre Eisenbach <eisenbach@google.com>2014-12-02 08:01:54 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-12-02 08:01:55 +0000
commit63fce3b9cad29f241c2a71b638655a09d21acb46 (patch)
tree16e23949b2d284a116a2c04ad8ff1d9595ce6f5f /src/com/android/bluetooth
parent4d41eecca0dab61f4bb6ea05c387a08956f52668 (diff)
parente632e4bb8c873f102cac7d6f39585ea06f34c082 (diff)
downloadandroid_packages_apps_Bluetooth-63fce3b9cad29f241c2a71b638655a09d21acb46.tar.gz
android_packages_apps_Bluetooth-63fce3b9cad29f241c2a71b638655a09d21acb46.tar.bz2
android_packages_apps_Bluetooth-63fce3b9cad29f241c2a71b638655a09d21acb46.zip
Merge "Add server-side callback for change in MTU (3/4)" into lmp-mr1-dev
Diffstat (limited to 'src/com/android/bluetooth')
-rw-r--r--src/com/android/bluetooth/gatt/GattService.java20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/com/android/bluetooth/gatt/GattService.java b/src/com/android/bluetooth/gatt/GattService.java
index f67daf8a6..915d81ce7 100644
--- a/src/com/android/bluetooth/gatt/GattService.java
+++ b/src/com/android/bluetooth/gatt/GattService.java
@@ -1688,9 +1688,6 @@ public class GattService extends ProfileService {
HandleMap.Entry entry = mHandleMap.getByHandle(attrHandle);
if (entry == null) return;
- if (DBG) Log.d(TAG, "onAttributeRead() UUID=" + entry.uuid
- + ", serverIf=" + entry.serverIf + ", type=" + entry.type);
-
mHandleMap.addRequest(transId, attrHandle);
ServerMap.App app = mServerMap.getById(entry.serverIf);
@@ -1738,9 +1735,6 @@ public class GattService extends ProfileService {
HandleMap.Entry entry = mHandleMap.getByHandle(attrHandle);
if (entry == null) return;
- if (DBG) Log.d(TAG, "onAttributeWrite() UUID=" + entry.uuid
- + ", serverIf=" + entry.serverIf + ", type=" + entry.type);
-
mHandleMap.addRequest(transId, attrHandle);
ServerMap.App app = mServerMap.getById(entry.serverIf);
@@ -1793,7 +1787,7 @@ public class GattService extends ProfileService {
}
void onNotificationSent(int connId, int status) throws RemoteException {
- if (DBG) Log.d(TAG, "onNotificationSent() connId=" + connId + ", status=" + status);
+ if (VDBG) Log.d(TAG, "onNotificationSent() connId=" + connId + ", status=" + status);
String address = mServerMap.addressByConnId(connId);
if (address == null) return;
@@ -1825,6 +1819,18 @@ public class GattService extends ProfileService {
}
}
+ void onMtuChanged(int connId, int mtu) throws RemoteException {
+ if (DBG) Log.d(TAG, "onMtuChanged() - connId=" + connId + ", mtu=" + mtu);
+
+ String address = mServerMap.addressByConnId(connId);
+ if (address == null) return;
+
+ ServerMap.App app = mServerMap.getByConnId(connId);
+ if (app == null) return;
+
+ app.callback.onMtuChanged(address, mtu);
+ }
+
/**************************************************************************
* GATT Service functions - SERVER
*************************************************************************/