Remove duplicate Debug, move wrapper.log delete to a better place.
This commit is contained in:
@ -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 {
|
|||||||
_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 {
|
|||||||
_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);
|
||||||
|
Reference in New Issue
Block a user