mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +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:
@@ -17,6 +17,7 @@ import android.widget.TextView;
|
||||
|
||||
import org.briarproject.R;
|
||||
import org.briarproject.android.panic.PanicPreferencesActivity;
|
||||
import org.briarproject.android.util.AndroidUtils;
|
||||
import org.briarproject.android.util.FixedVerticalSpace;
|
||||
import org.briarproject.android.util.HorizontalBorder;
|
||||
import org.briarproject.android.util.LayoutUtils;
|
||||
@@ -330,8 +331,7 @@ OnClickListener {
|
||||
bluetoothSetting = !bluetoothSetting;
|
||||
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
||||
if (adapter != null) {
|
||||
if (bluetoothSetting) adapter.enable();
|
||||
else adapter.disable();
|
||||
AndroidUtils.setBluetooth(adapter, bluetoothSetting);
|
||||
}
|
||||
storeBluetoothSetting();
|
||||
displaySettings();
|
||||
|
||||
Reference in New Issue
Block a user