mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
run bluetooth adapter enabling/disabling in background thread
also run setting the default preferences in a background thread Closes #184
This commit is contained in:
@@ -7,6 +7,7 @@ import android.widget.Toast;
|
||||
|
||||
import org.briarproject.R;
|
||||
import org.briarproject.android.BriarActivity;
|
||||
import org.briarproject.android.util.AndroidUtils;
|
||||
import org.briarproject.api.TransportConfig;
|
||||
import org.briarproject.api.TransportId;
|
||||
import org.briarproject.api.android.ReferenceManager;
|
||||
@@ -333,7 +334,7 @@ implements InvitationListener {
|
||||
if (LOG.isLoggable(INFO)) LOG.info("Turning off Bluetooth again");
|
||||
|
||||
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
||||
if (adapter != null) adapter.disable();
|
||||
if (adapter != null) AndroidUtils.setBluetooth(adapter, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user