LE: Un-hide new congestion control and MTU APIs
Change-Id: I5ce395481620dd7ab611b1ab0eaeb5e29c4f13fa
diff --git a/api/current.txt b/api/current.txt
index f3e27b2..2bc539d 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -6102,6 +6102,7 @@
method public deprecated void abortReliableWrite(android.bluetooth.BluetoothDevice);
method public boolean beginReliableWrite();
method public void close();
+ method public boolean configureMTU(int);
method public boolean connect();
method public void disconnect();
method public boolean discoverServices();
@@ -6118,6 +6119,7 @@
method public boolean setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic, boolean);
method public boolean writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic);
method public boolean writeDescriptor(android.bluetooth.BluetoothGattDescriptor);
+ field public static final int GATT_CONNECTION_CONGESTED = 143; // 0x8f
field public static final int GATT_FAILURE = 257; // 0x101
field public static final int GATT_INSUFFICIENT_AUTHENTICATION = 5; // 0x5
field public static final int GATT_INSUFFICIENT_ENCRYPTION = 15; // 0xf
@@ -6134,6 +6136,8 @@
method public void onCharacteristicChanged(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic);
method public void onCharacteristicRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int);
method public void onCharacteristicWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int);
+ method public void onConfigureMTU(android.bluetooth.BluetoothGatt, int, int);
+ method public void onConnectionCongested(android.bluetooth.BluetoothGatt, boolean);
method public void onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int);
method public void onDescriptorRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattDescriptor, int);
method public void onDescriptorWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattDescriptor, int);
@@ -6232,10 +6236,12 @@
ctor public BluetoothGattServerCallback();
method public void onCharacteristicReadRequest(android.bluetooth.BluetoothDevice, int, int, android.bluetooth.BluetoothGattCharacteristic);
method public void onCharacteristicWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattCharacteristic, boolean, boolean, int, byte[]);
+ method public void onConnectionCongested(android.bluetooth.BluetoothDevice, boolean);
method public void onConnectionStateChange(android.bluetooth.BluetoothDevice, int, int);
method public void onDescriptorReadRequest(android.bluetooth.BluetoothDevice, int, int, android.bluetooth.BluetoothGattDescriptor);
method public void onDescriptorWriteRequest(android.bluetooth.BluetoothDevice, int, android.bluetooth.BluetoothGattDescriptor, boolean, boolean, int, byte[]);
method public void onExecuteWrite(android.bluetooth.BluetoothDevice, int, boolean);
+ method public void onNotificationSent(android.bluetooth.BluetoothDevice, int);
method public void onServiceAdded(int, android.bluetooth.BluetoothGattService);
}
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java
index 4255cd4..8b7b0af9 100644
--- a/core/java/android/bluetooth/BluetoothGatt.java
+++ b/core/java/android/bluetooth/BluetoothGatt.java
@@ -86,9 +86,7 @@
/** A write operation exceeds the maximum length of the attribute */
public static final int GATT_INVALID_ATTRIBUTE_LENGTH = 0xd;
- /** A remote device connection is congested.
- * @hide
- */
+ /** A remote device connection is congested. */
public static final int GATT_CONNECTION_CONGESTED = 0x8f;
/** A GATT operation failed, errors other than the above */
@@ -1263,7 +1261,6 @@
* <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
*
* @return true, if the new MTU value has been requested successfully
- * @hide
*/
public boolean configureMTU(int mtu) {
if (DBG) Log.d(TAG, "configureMTU() - device: " + mDevice.getAddress()
diff --git a/core/java/android/bluetooth/BluetoothGattCallback.java b/core/java/android/bluetooth/BluetoothGattCallback.java
index b5e60f2..5817d68 100644
--- a/core/java/android/bluetooth/BluetoothGattCallback.java
+++ b/core/java/android/bluetooth/BluetoothGattCallback.java
@@ -149,7 +149,6 @@
* @param gatt GATT client invoked {@link BluetoothGatt#configureMTU}
* @param mtu The new MTU size
* @param status {@link BluetoothGatt#GATT_SUCCESS} if the MTU has been changed successfully
- * @hide
*/
public void onConfigureMTU(BluetoothGatt gatt, int mtu, int status) {
}
@@ -164,7 +163,6 @@
*
* @param gatt The GATT client associated with the remote device
* @param congested true, if the connection is currently congested
- * @hide
*/
public void onConnectionCongested(BluetoothGatt gatt, boolean congested) {
}
diff --git a/core/java/android/bluetooth/BluetoothGattServerCallback.java b/core/java/android/bluetooth/BluetoothGattServerCallback.java
index 4fbeb46..3a1b38ee 100644
--- a/core/java/android/bluetooth/BluetoothGattServerCallback.java
+++ b/core/java/android/bluetooth/BluetoothGattServerCallback.java
@@ -142,7 +142,6 @@
*
* @param device The remote device the notification has been sent to
* @param status 0 if the operation was successful
- * @hide
*/
public void onNotificationSent(BluetoothDevice device, int status) {
}
@@ -157,7 +156,6 @@
*
* @param device The remote device that triggered the congestion state change
* @param congested true, if the connection is currently congested
- * @hide
*/
public void onConnectionCongested(BluetoothDevice device, boolean congested) {
}