- Deal with conflicting bouncycastle libs take #2

- Disable NTCP
- Shuffle the startup/shutdown tasks some
This commit is contained in:
zzz
2009-03-13 21:49:27 +00:00
parent b8f22bf3bf
commit 5022575429
6 changed files with 24 additions and 11 deletions

View File

@ -12,6 +12,7 @@ import java.io.InputStream;
import java.io.IOException;
import net.i2p.router.Router;
import net.i2p.router.web.ContextHelper;
import net.i2p.router.web.ReseedChecker;
import net.i2p.util.I2PFile;
@ -29,11 +30,6 @@ public class I2PAndroid extends Activity
_context = this; // Activity extends Context
debugStuff();
initialize();
Router.main(null);
System.err.println("Router.main finished");
ReseedChecker.checkReseed();
}
public void onRestart()
@ -42,6 +38,16 @@ public class I2PAndroid extends Activity
super.onRestart();
}
public void onStart()
{
System.err.println("onStart called");
super.onStart();
Router.main(null);
System.err.println("Router.main finished");
ReseedChecker.checkReseed();
}
public void onResume()
{
System.err.println("onResume called");
@ -58,6 +64,9 @@ public class I2PAndroid extends Activity
{
System.err.println("onStop called");
super.onStop();
// shutdown() doesn't return so use shutdownGracefully()
ContextHelper.getContext(null).router().shutdownGracefully(Router.EXIT_HARD);
System.err.println("shutdown complete");
}
public void onDestroy()