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

Skip to content
Commit 71c3c780 authored by Nick Pelly's avatar Nick Pelly
Browse files

Immediately destroy BluetoothSocket's on close().

Unfortunatley, shutdown() on the underlying fd does not actually stop a
listening socket from listening. You need to call close() on the fd to
do this. There is no way around it.

So this means the Java BluetoothSocket code has to call destroyNative() during
BluetoothSocket.close().

Since native methods cannot be called after destroyNative(), add a ReadWrite
lock and mClosed field to protect access to native methods.

This fixes the "resource busy" error when Bluetooth OPP and Bluetooth PBAP
tried to resume listening after turning BT off and then on.
parent 05a6f3cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment