Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77e70541 authored by Andre Eisenbach's avatar Andre Eisenbach Committed by Android (Google) Code Review
Browse files

Merge "Remove remanents of onConnectionCongested in framwork" into lmp-dev

parents 7486328d f0b56a5a
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ 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;
@@ -607,21 +606,6 @@ public final class BluetoothGatt implements BluetoothProfile {
                    Log.w(TAG, "Unhandled exception in callback", ex);
                }
            }

            /**
             * Callback indicating the remote device connection is congested.
             * @hide
             */
            public void onConnectionCongested(String address, boolean congested) {
                if (DBG) Log.d(TAG, "onConnectionCongested() - Device=" + address
                        + " congested=" + congested);
                if (!address.equals(mDevice.getAddress())) return;
                try {
                    mIsCongested = congested;
                } catch (Exception ex) {
                    Log.w(TAG, "Unhandled exception in callback", ex);
                }
            }
        };

    /*package*/ BluetoothGatt(Context context, IBluetoothGatt iGatt, BluetoothDevice device,
+0 −4
Original line number Diff line number Diff line
@@ -119,10 +119,6 @@ public class BluetoothGattCallbackWrapper extends IBluetoothGattCallback.Stub {
    public void onConfigureMTU(String address, int mtu, int status) throws RemoteException {
    }

    @Override
    public void onConnectionCongested(String address, boolean congested) throws RemoteException {
    }

    @Override
    public void onFoundOrLost(boolean onFound, ScanResult scanResult) throws RemoteException {
    }
+0 −19
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ 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;
@@ -285,24 +284,6 @@ public final class BluetoothGattServer implements BluetoothProfile {
                    Log.w(TAG, "Unhandled exception: " + ex);
                }
            }

            /**
             * Callback indicating the remote device connection is congested.
             * @hide
             */
            public void onConnectionCongested(String address, boolean congested) {
                if (DBG) Log.d(TAG, "onConnectionCongested() - Device=" + address
                        + " congested=" + congested);

                BluetoothDevice device = mAdapter.getRemoteDevice(address);
                if (device == null) return;

                try {
                    mIsCongested = congested;
                } catch (Exception ex) {
                    Log.w(TAG, "Unhandled exception in callback", ex);
                }
            }
        };

    /**
+0 −1
Original line number Diff line number Diff line
@@ -68,6 +68,5 @@ oneway interface IBluetoothGattCallback {
    void onMultiAdvertiseCallback(in int status, boolean isStart,
                                  in AdvertiseSettings advertiseSettings);
    void onConfigureMTU(in String address, in int mtu, in int status);
    void onConnectionCongested(in String address, in boolean congested);
    void onFoundOrLost(in boolean onFound, in ScanResult scanResult);
}
+0 −1
Original line number Diff line number Diff line
@@ -59,5 +59,4 @@ oneway interface IBluetoothGattServerCallback {
                                     in byte[] value);
    void onExecuteWrite(in String address, in int transId, in boolean execWrite);
    void onNotificationSent(in String address, in int status);
    void onConnectionCongested(in String address, in boolean congested);
}