From 1da4079a8198eceb4ed0cb176e38a3e3fba5a81f Mon Sep 17 00:00:00 2001
From: akwizgran <michael@briarproject.org>
Date: Tue, 19 Feb 2013 23:10:37 +0000
Subject: [PATCH] Call System.exit() to prevent shut-down components from being
 restarted.

Perhaps a better solution would be to make all components restartable,
but that's difficult as they may have entered error states.
---
 .../net/sf/briar/android/helloworld/HelloWorldActivity.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/briar-android/src/net/sf/briar/android/helloworld/HelloWorldActivity.java b/briar-android/src/net/sf/briar/android/helloworld/HelloWorldActivity.java
index 34fdc41323..281267ae5e 100644
--- a/briar-android/src/net/sf/briar/android/helloworld/HelloWorldActivity.java
+++ b/briar-android/src/net/sf/briar/android/helloworld/HelloWorldActivity.java
@@ -157,12 +157,13 @@ implements OnClickListener, DatabaseListener {
 					if(LOG.isLoggable(INFO)) LOG.info("Shutting down service");
 					service.shutdown();
 					service.waitForShutdown();
-					if(LOG.isLoggable(INFO)) LOG.info("Service shut down");
-					// Unbind from the service and finish the activity
+					// Unbind from the service, finish the activity, and die
 					runOnUiThread(new Runnable() {
 						public void run() {
 							unbindService(serviceConnection);
 							finish();
+							if(LOG.isLoggable(INFO)) LOG.info("Exiting");
+							System.exit(0);
 						}
 					});
 				} catch(InterruptedException e) {
-- 
GitLab