From 16bf846990293e1f19f042eed8e2ce5e7348ac5a Mon Sep 17 00:00:00 2001 From: Andre Eisenbach Date: Tue, 18 Nov 2014 11:34:26 -0800 Subject: Add server-side callback for change in MTU (4/4) When a client requests to update the LE transport MTU, the server currently does not get notified and can therefor not properly size notifications appropriate to the current MTU. Bug: 18388114 Change-Id: I515bfc2cc9846490d57de71860f41ea9a61fa243 --- core/java/android/bluetooth/BluetoothGattServerCallback.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core/java/android/bluetooth/BluetoothGattServerCallback.java') diff --git a/core/java/android/bluetooth/BluetoothGattServerCallback.java b/core/java/android/bluetooth/BluetoothGattServerCallback.java index 1dd06f2..2afcf9a 100644 --- a/core/java/android/bluetooth/BluetoothGattServerCallback.java +++ b/core/java/android/bluetooth/BluetoothGattServerCallback.java @@ -145,4 +145,16 @@ public abstract class BluetoothGattServerCallback { */ public void onNotificationSent(BluetoothDevice device, int status) { } + + /** + * Callback indicating the MTU for a given device connection has changed. + * + *

This callback will be invoked if a remote client has requested to change + * the MTU for a given connection. + * + * @param device The remote device that requested the MTU change + * @param mtu The new MTU size + */ + public void onMtuChanged(BluetoothDevice device, int mtu) { + } } -- cgit v1.1