mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 22:59:54 +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))
|
if(LOG.isLoggable(INFO))
|
||||||
LOG.info("Interrupted while waiting for service");
|
LOG.info("Interrupted while waiting for service");
|
||||||
}
|
}
|
||||||
// Finish the activity and kill the JVM
|
finishAndExit();
|
||||||
runOnUiThread(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
finish();
|
|
||||||
if(LOG.isLoggable(INFO)) LOG.info("Exiting");
|
|
||||||
System.exit(0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}.start();
|
}.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) {
|
protected void runOnDbThread(final Runnable task) {
|
||||||
dbUiExecutor.execute(new Runnable() {
|
dbUiExecutor.execute(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|||||||
Reference in New Issue
Block a user