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

Commit c3cd4605 authored by Ajay Panicker's avatar Ajay Panicker Committed by android-build-merger
Browse files

Merge "Bluetooth: Add additional BluetoothSocket logging to root cause errors"...

Merge "Bluetooth: Add additional BluetoothSocket logging to root cause errors" am: 985fe4cb am: 7eaf518b am: 467d572e
am: 37b01db0

Change-Id: I2b82d44fbb807159ed6834704e8d5b6f14d4032d
parents 224f95a3 37b01db0
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -416,6 +416,11 @@ public final class BluetoothSocket implements Closeable {
                if(mSocketState != SocketState.INIT) return EBADFD;
                if(mPfd == null) return -1;
                FileDescriptor fd = mPfd.getFileDescriptor();
                if (fd == null) {
                    Log.e(TAG, "bindListen(), null file descriptor");
                    return -1;
                }

                if (DBG) Log.d(TAG, "bindListen(), Create LocalSocket");
                mSocket = LocalSocket.createConnectedLocalSocket(fd);
                if (DBG) Log.d(TAG, "bindListen(), new LocalSocket.getInputStream()");
@@ -556,8 +561,9 @@ public final class BluetoothSocket implements Closeable {

    @Override
    public void close() throws IOException {
        if (DBG) Log.d(TAG, "close() in, this: " + this + ", channel: " + mPort + ", state: "
                + mSocketState);
        Log.d(TAG, "close() this: " + this + ", channel: " + mPort +
            ", mSocketIS: " + mSocketIS + ", mSocketOS: " + mSocketOS +
            "mSocket: " + mSocket + ", mSocketState: " + mSocketState);
        if(mSocketState == SocketState.CLOSED)
            return;
        else
@@ -567,9 +573,6 @@ public final class BluetoothSocket implements Closeable {
                 if(mSocketState == SocketState.CLOSED)
                    return;
                 mSocketState = SocketState.CLOSED;
                 if (DBG) Log.d(TAG, "close() this: " + this + ", channel: " + mPort +
                         ", mSocketIS: " + mSocketIS + ", mSocketOS: " + mSocketOS +
                         "mSocket: " + mSocket);
                 if(mSocket != null) {
                    if (DBG) Log.d(TAG, "Closing mSocket: " + mSocket);
                    mSocket.shutdownInput();