I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 39b54c41 authored by sponge's avatar sponge
Browse files

Remove duplicate Debug, move wrapper.log delete to a better place.

parent cc3b37c4
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,7 @@ class InitActivities { ...@@ -59,6 +59,7 @@ class InitActivities {
} }
void initialize() { void initialize() {
(new File(myDir, "wrapper.log")).delete();
if (checkNewVersion()) { if (checkNewVersion()) {
Properties props = new Properties(); Properties props = new Properties();
props.setProperty("i2p.dir.temp", myDir + "/tmp"); props.setProperty("i2p.dir.temp", myDir + "/tmp");
......
...@@ -19,38 +19,18 @@ class Init { ...@@ -19,38 +19,18 @@ class Init {
_ourVersion = Util.getOurVersion(c); _ourVersion = Util.getOurVersion(c);
} }
void debugStuff() {
Util.i("java.io.tmpdir" + ": " + System.getProperty("java.io.tmpdir"));
Util.i("java.vendor" + ": " + System.getProperty("java.vendor"));
Util.i("java.version" + ": " + System.getProperty("java.version"));
Util.i("os.arch" + ": " + System.getProperty("os.arch"));
Util.i("os.name" + ": " + System.getProperty("os.name"));
Util.i("os.version" + ": " + System.getProperty("os.version"));
Util.i("user.dir" + ": " + System.getProperty("user.dir"));
Util.i("user.home" + ": " + System.getProperty("user.home"));
Util.i("user.name" + ": " + System.getProperty("user.name"));
Util.i("getFilesDir()" + ": " + myDir);
Util.i("max mem" + ": " + DataHelper.formatSize(Runtime.getRuntime().maxMemory()));
Util.i("Package" + ": " + ctx.getPackageName());
Util.i("Version" + ": " + _ourVersion);
Util.i("MODEL" + ": " + Build.MODEL);
Util.i("DISPLAY" + ": " + Build.DISPLAY);
Util.i("VERSION" + ": " + Build.VERSION.RELEASE);
Util.i("SDK" + ": " + Build.VERSION.SDK);
}
void initialize() { void initialize() {
deleteOldFiles(); deleteOldFiles();
// Set up the locations so Router and WorkingDir can find them // Set up the locations so Router and WorkingDir can find them
// We do this again here, in the event settings were changed.
System.setProperty("i2p.dir.base", myDir); System.setProperty("i2p.dir.base", myDir);
System.setProperty("i2p.dir.config", myDir); System.setProperty("i2p.dir.config", myDir);
System.setProperty("wrapper.logfile", myDir + "/wrapper.log"); System.setProperty("wrapper.logfile", myDir + "/wrapper.log");
} }
private void deleteOldFiles() { private void deleteOldFiles() {
(new File(myDir, "wrapper.log")).delete();
File tmp = new File(myDir, "tmp"); File tmp = new File(myDir, "tmp");
File[] files = tmp.listFiles(); File[] files = tmp.listFiles();
if (files != null) { if (files != null) {
......
...@@ -60,7 +60,6 @@ public class RouterService extends Service { ...@@ -60,7 +60,6 @@ public class RouterService extends Service {
_myDir = getFilesDir().getAbsolutePath(); _myDir = getFilesDir().getAbsolutePath();
// init other stuff here, delete log, etc. // init other stuff here, delete log, etc.
Init init = new Init(this); Init init = new Init(this);
init.debugStuff();
init.initialize(); init.initialize();
//_apkPath = init.getAPKPath(); //_apkPath = init.getAPKPath();
_statusBar = new StatusBar(this); _statusBar = new StatusBar(this);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment