Do disabling of Bluetooth Adapter in Background Thread
Apparently disabling the Bluetooth adapter causes Android to write to disk:
android.os.StrictMode$StrictModeDiskWriteViolation: policy=287 violation=1
at android.os.StrictMode$AndroidBlockGuardPolicy.onWriteToDisk(StrictMode.java:1120)
at android.database.sqlite.SQLiteConnection.applyBlockGuardPolicy(SQLiteConnection.java:1047)
...
at com.android.server.BluetoothManagerService.persistBluetoothSetting(BluetoothManagerService.java:298)
at com.android.server.BluetoothManagerService.disable(BluetoothManagerService.java:497)
which is caused by at least:
at org.briarproject.android.invitation.AddContactActivity.disableBluetooth(AddContactActivity.java:336)
So we should run all enabling/disabling of Bluetooth in a background thread.