Ниже приведен исходный код для onConnectionUpdated
/**
* Callback invoked when the given connection is updated
* @hide
*/
@Override
public void onConnectionUpdated(String address, int interval, int latency,
int timeout, int status) {
if (DBG) {
Log.d(TAG, "onConnectionUpdated() - Device=" + address
+ " interval=" + interval + " latency=" + latency
+ " timeout=" + timeout + " status=" + status);
}
if (!address.equals(mDevice.getAddress())) {
return;
}
runOrQueueCallback(new Runnable() {
@Override
public void run() {
final BluetoothGattCallback callback = mCallback;
if (callback != null) {
callback.onConnectionUpdated(BluetoothGatt.this, interval, latency,
timeout, status);
}
}
});
}
Полный исходный код можно отправить в BluetoothGatt.java
Дополнительно к исходному коду на сервере относится
/**
* Callback indicating the connection parameters were updated.
*
* @param device The remote device involved
* @param interval Connection interval used on this connection, 1.25ms unit. Valid range is from
* 6 (7.5ms) to 3200 (4000ms).
* @param latency Slave latency for the connection in number of connection events. Valid range
* is from 0 to 499
* @param timeout Supervision timeout for this connection, in 10ms unit. Valid range is from 10
* (0.1s) to 3200 (32s)
* @param status {@link BluetoothGatt#GATT_SUCCESS} if the connection has been updated
* successfully
* @hide
*/
public void onConnectionUpdated(BluetoothDevice device, int interval, int latency, int timeout,
int status) {
}
Это можно найти по адресу BluetoothGattServerCallback.java