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

Commit 626db853 authored by Zhihai Xu's avatar Zhihai Xu
Browse files

Bluetooth stopped working in master - "bad file descriptor"

ignore IllegalArgumentException in BluetoothSocket.close().

bug: 9960585
Change-Id: I301aa388b738dcb92b643fdd96b5c9cb6f8b3efe
parent 345178a6
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -461,8 +461,13 @@ public final class BluetoothSocket implements Closeable {
                    mSocket.close();
                    mSocket = null;
                }
                if(mPfd != null)
                if(mPfd != null) {
                    try {
                        mPfd.detachFd();
                    } catch (IllegalArgumentException e) {
                        Log.w(TAG, "ignore IllegalArgumentException");
                    }
                }
           }
        }
    }