From 41787d7e1ec9bc1e1db9433d74e8482768eb40c5 Mon Sep 17 00:00:00 2001 From: Pavol Zibrita Date: Sat, 10 Sep 2011 06:45:13 +0200 Subject: [PATCH] Use system.exit to on exit --- OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java b/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java index 06a48d5102..d95d4b8a80 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java @@ -215,6 +215,9 @@ public class MainMenuActivity extends Activity { ((OsmandApplication) activity.getApplication()).closeApplication(); //moveTaskToBack(true); activity.finish(); + //http://stackoverflow.com/questions/2092951/how-to-close-android-application + System.runFinalizersOnExit(true); //if any threads are running, they will prevent app from exit + System.exit(0); //exit } });