Merge branch '539-564-568-notification-overhaul' into 'master'

Fix various notification bugs

Fixes #539, #564, #568.

Depends on !276.

See merge request !286
This commit is contained in:
akwizgran
2016-08-29 16:27:47 +00:00
18 changed files with 435 additions and 140 deletions

View File

@@ -126,12 +126,13 @@ class DroidtoothPlugin implements DuplexPlugin {
// BluetoothAdapter.getDefaultAdapter() must be called on a thread
// with a message queue, so submit it to the AndroidExecutor
try {
adapter = androidExecutor.submit(new Callable<BluetoothAdapter>() {
@Override
public BluetoothAdapter call() throws Exception {
return BluetoothAdapter.getDefaultAdapter();
}
}).get();
adapter = androidExecutor.runOnBackgroundThread(
new Callable<BluetoothAdapter>() {
@Override
public BluetoothAdapter call() throws Exception {
return BluetoothAdapter.getDefaultAdapter();
}
}).get();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new IOException("Interrupted while getting BluetoothAdapter");