diff options
author | Prerepa Viswanadham <dham@google.com> | 2014-09-11 13:39:16 -0700 |
---|---|---|
committer | Prerepa Viswanadham <dham@google.com> | 2014-09-11 22:29:27 +0000 |
commit | ba4f57a1c6979676d20ff29a614deb64171230e6 (patch) | |
tree | 0b6577c5816f9cf52549131b1eedf9ce2944cf2e /core/java/android/bluetooth | |
parent | c46cd62b5c808101a204be6a5db2bf63701c8944 (diff) | |
download | frameworks_base-ba4f57a1c6979676d20ff29a614deb64171230e6.zip frameworks_base-ba4f57a1c6979676d20ff29a614deb64171230e6.tar.gz frameworks_base-ba4f57a1c6979676d20ff29a614deb64171230e6.tar.bz2 |
Remove onConnectionCongested callback
Bug:17289507
Change-Id: I49fd99d320084c618dcec756b832fb3b6a6aec51
Diffstat (limited to 'core/java/android/bluetooth')
4 files changed, 4 insertions, 30 deletions
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java index d77a77b..2276229 100644 --- a/core/java/android/bluetooth/BluetoothGatt.java +++ b/core/java/android/bluetooth/BluetoothGatt.java @@ -51,6 +51,7 @@ public final class BluetoothGatt implements BluetoothProfile { private int mConnState; private final Object mStateLock = new Object(); private Boolean mDeviceBusy = false; + private Boolean mIsCongested = false; private int mTransport; private static final int CONN_STATE_IDLE = 0; @@ -616,7 +617,7 @@ public final class BluetoothGatt implements BluetoothProfile { + " congested=" + congested); if (!address.equals(mDevice.getAddress())) return; try { - mCallback.onConnectionCongested(BluetoothGatt.this, congested); + mIsCongested = congested; } catch (Exception ex) { Log.w(TAG, "Unhandled exception in callback", ex); } diff --git a/core/java/android/bluetooth/BluetoothGattCallback.java b/core/java/android/bluetooth/BluetoothGattCallback.java index 19900ec..a915620 100644 --- a/core/java/android/bluetooth/BluetoothGattCallback.java +++ b/core/java/android/bluetooth/BluetoothGattCallback.java @@ -152,18 +152,4 @@ public abstract class BluetoothGattCallback { */ public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) { } - - /** - * Callback indicating that a remote device connection congestestion status has changed. - * - * An application should refrain from sending additional data to a remote device when - * a callback is received with the congested flag set to true. Once the congestion status - * is cleared up, the application will receive an additional callback with the congested - * flag set to false. - * - * @param gatt The GATT client associated with the remote device - * @param congested true, if the connection is currently congested - */ - public void onConnectionCongested(BluetoothGatt gatt, boolean congested) { - } } diff --git a/core/java/android/bluetooth/BluetoothGattServer.java b/core/java/android/bluetooth/BluetoothGattServer.java index c8df60e..a7f117b 100644 --- a/core/java/android/bluetooth/BluetoothGattServer.java +++ b/core/java/android/bluetooth/BluetoothGattServer.java @@ -48,6 +48,7 @@ public final class BluetoothGattServer implements BluetoothProfile { private BluetoothAdapter mAdapter; private IBluetoothGatt mService; private BluetoothGattServerCallback mCallback; + private Boolean mIsCongested = false; private Object mServerIfLock = new Object(); private int mServerIf; @@ -297,7 +298,7 @@ public final class BluetoothGattServer implements BluetoothProfile { if (device == null) return; try { - mCallback.onConnectionCongested(device, congested); + mIsCongested = congested; } catch (Exception ex) { Log.w(TAG, "Unhandled exception in callback", ex); } diff --git a/core/java/android/bluetooth/BluetoothGattServerCallback.java b/core/java/android/bluetooth/BluetoothGattServerCallback.java index b0ddc26..1dd06f2 100644 --- a/core/java/android/bluetooth/BluetoothGattServerCallback.java +++ b/core/java/android/bluetooth/BluetoothGattServerCallback.java @@ -145,18 +145,4 @@ public abstract class BluetoothGattServerCallback { */ public void onNotificationSent(BluetoothDevice device, int status) { } - - /** - * Callback indicating that a remote device connection congestestion status has changed. - * - * An application should refrain from sending additional data (notifications, indications - * etc.) to a remote device when a callback is received with the congested flag set - * to true. Once the congestion status is cleared up, the application will receive an - * additional callback with the congested flag set to false. - * - * @param device The remote device that triggered the congestion state change - * @param congested true, if the connection is currently congested - */ - public void onConnectionCongested(BluetoothDevice device, boolean congested) { - } } |