mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Each task that runs on a separate thread should have its own method.
This commit is contained in:
@@ -95,18 +95,21 @@ public class BriarActivity extends RoboFragmentActivity {
|
||||
if(LOG.isLoggable(INFO))
|
||||
LOG.info("Interrupted while waiting for service");
|
||||
}
|
||||
// Finish the activity and kill the JVM
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
finish();
|
||||
if(LOG.isLoggable(INFO)) LOG.info("Exiting");
|
||||
System.exit(0);
|
||||
}
|
||||
});
|
||||
finishAndExit();
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
private void finishAndExit() {
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
finish();
|
||||
if(LOG.isLoggable(INFO)) LOG.info("Exiting");
|
||||
System.exit(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void runOnDbThread(final Runnable task) {
|
||||
dbUiExecutor.execute(new Runnable() {
|
||||
public void run() {
|
||||
|
||||
Reference in New Issue
Block a user