BluetoothGattServer cancelConnection does not cancel the connection
<p>I have Android application which exposes BLE Server. I connect with <a href="https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onConnectionStateChange(android.bluetooth.BluetoothDevice,%20int,%20int)" rel="noreferrer">BluetoothGattServer#connect</a>. It works - my app gets call to <a href="https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onConnectionStateChange(android.bluetooth.BluetoothDevice,%20int,%20int)" rel="noreferrer">BluetoothGattServerCallback#onConnectionStateChange</a> with <a href="https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#STATE_CONNECTED" rel="noreferrer">STATE_CONNECTED</a>. When I'm done with the client I try to disconnect from my app with <a href="https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#STATE_CONNECTED" rel="noreferrer">BluetoothGattServer#cancelConnection</a>.</p>

<p><strong>But I do not get call to <a href="https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onConnectionStateChange(android.bluetooth.BluetoothDevice,%20int,%20int)" rel="noreferrer">BluetoothGattServerCallback#onConnectionStateChange</a></strong> and it seems  that the connection is still active as my BLE client does not start to advertise (which it does when nothing is connected to it).</p>

<p>In logcat I see only:</p>

<pre><code>BluetoothGattServer: cancelConnection() - device: XX:XX:XX:XX:XX:XX
</code></pre>

<p>The funny part is, my app gets call to <a href="https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback.html#onConnectionStateChange(android.bluetooth.BluetoothDevice,%20int,%20int)" rel="noreferrer">BluetoothGattServerCallback#onConnectionStateChange</a> with <a href="https://developer.android.com/reference/android/bluetooth/BluetoothProfile.html#STATE_DISCONNECTED" rel="noreferrer">STATE_DISCONNECTED</a> as soon as I turn off BT completely.</p>

<p>Similar issues in Google's tracker: <a href="https://code.google.com/p/android/issues/detail?can=2&amp;start=0&amp;num=100&amp;q=&amp;colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&amp;groupby=&amp;sort=&amp;id=63461" rel="noreferrer">63461</a> and <a href="http://code.google.com/p/android/issues/detail?id=63464" rel="noreferrer">63464</a>.</p>