diff --git a/briar-android/src/net/sf/briar/android/AndroidExecutorImpl.java b/briar-android/src/net/sf/briar/android/AndroidExecutorImpl.java index 3cc4e2e206a73e1c181d4410911279761bbc38a6..79cf7db9cc5ee34ba067acedfd5dd929a6459a8c 100644 --- a/briar-android/src/net/sf/briar/android/AndroidExecutorImpl.java +++ b/briar-android/src/net/sf/briar/android/AndroidExecutorImpl.java @@ -46,7 +46,7 @@ class AndroidExecutorImpl implements AndroidExecutor { } } - public <V> V run(Callable<V> c) throws InterruptedException, + public <V> V call(Callable<V> c) throws InterruptedException, ExecutionException { startIfNecessary(); Future<V> f = new FutureTask<V>(c); diff --git a/briar-api/src/net/sf/briar/api/android/AndroidExecutor.java b/briar-api/src/net/sf/briar/api/android/AndroidExecutor.java index b950806aae6923c92260898928220ca7cff795f3..808c337853ad8e0d41c71a4fd92da026a1680fd7 100644 --- a/briar-api/src/net/sf/briar/api/android/AndroidExecutor.java +++ b/briar-api/src/net/sf/briar/api/android/AndroidExecutor.java @@ -9,8 +9,11 @@ import java.util.concurrent.ExecutionException; */ public interface AndroidExecutor { - /** Runs the given task on a thread with a message queue. */ - <V> V run(Callable<V> c) throws InterruptedException, ExecutionException; + /** + * Runs the given task on a thread with a message queue and returns the + * result of the task. + */ + <V> V call(Callable<V> c) throws InterruptedException, ExecutionException; void shutdown(); } diff --git a/briar-core/src/net/sf/briar/plugins/droidtooth/DroidtoothPlugin.java b/briar-core/src/net/sf/briar/plugins/droidtooth/DroidtoothPlugin.java index 5af3422c981e01fa0ad8f1ec3e189b4f51aee25d..b8c93bbfea431eb6d6bff873d833a8cf37377166 100644 --- a/briar-core/src/net/sf/briar/plugins/droidtooth/DroidtoothPlugin.java +++ b/briar-core/src/net/sf/briar/plugins/droidtooth/DroidtoothPlugin.java @@ -99,7 +99,7 @@ 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.run(new Callable<BluetoothAdapter>() { + adapter = androidExecutor.call(new Callable<BluetoothAdapter>() { public BluetoothAdapter call() throws Exception { return BluetoothAdapter.getDefaultAdapter(); }