forked from I2P_Developers/i2p.i2p
Use hasWrapper() util method
This commit is contained in:
@ -29,7 +29,7 @@
|
||||
<input type="submit" class="cancel" name="action" value="<%=intl._t("Cancel graceful shutdown")%>" >
|
||||
<% } %>
|
||||
</div>
|
||||
<% if (System.getProperty("wrapper.version") != null) { %>
|
||||
<% if (net.i2p.util.SystemVersion.hasWrapper()) { %>
|
||||
<h3 class="ptitle" id="restartrouter"><%=intl._t("Restart the router")%></h3>
|
||||
<p class="infohelp">
|
||||
<%=intl._t("If you want the router to restart itself after shutting down, you can choose one of the following.")%>
|
||||
@ -72,7 +72,7 @@
|
||||
|
||||
<h3 class="ptitle" id="servicedebug"><%=intl._t("Debugging")%> <a href="/jobs">[<%=intl._t("View the job queue")%>]</a></h3>
|
||||
<p class="infohelp">
|
||||
<% if (System.getProperty("wrapper.version") != null) { %>
|
||||
<% if (net.i2p.util.SystemVersion.hasWrapper()) { %>
|
||||
<%=intl._t("At times, it may be helpful to debug I2P by getting a thread dump. To do so, please select the following option and review the thread dumped to <a href=\"logs.jsp#servicelogs\">wrapper.log</a>.")%>
|
||||
<% } else { // hack to make layout work for non-wrapper %>
|
||||
|
||||
@ -81,7 +81,7 @@
|
||||
<hr>
|
||||
<div class="formaction" id="dumpthreads">
|
||||
<input type="submit" class="reload" name="action" value="<%=intl._t("Force GC")%>" >
|
||||
<% if (System.getProperty("wrapper.version") != null) { %>
|
||||
<% if (net.i2p.util.SystemVersion.hasWrapper()) { %>
|
||||
<input type="submit" class="download" name="action" value="<%=intl._t("Dump threads")%>" >
|
||||
<% } %>
|
||||
</div>
|
||||
|
@ -36,6 +36,7 @@ import net.i2p.util.SecureDirectory;
|
||||
import net.i2p.util.SimpleScheduler;
|
||||
import net.i2p.util.SimpleTimer;
|
||||
import net.i2p.util.SimpleTimer2;
|
||||
import net.i2p.util.SystemVersion;
|
||||
import net.i2p.util.I2PProperties.I2PPropertyCallback;
|
||||
|
||||
/**
|
||||
@ -928,7 +929,7 @@ public class I2PAppContext {
|
||||
* @since 0.8.8
|
||||
*/
|
||||
public boolean hasWrapper() {
|
||||
return System.getProperty("wrapper.version") != null;
|
||||
return SystemVersion.hasWrapper();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -51,6 +51,7 @@ import net.i2p.util.Log;
|
||||
import net.i2p.util.OrderedProperties;
|
||||
import net.i2p.util.SimpleTimer;
|
||||
import net.i2p.util.SimpleTimer2;
|
||||
import net.i2p.util.SystemVersion;
|
||||
import net.i2p.util.VersionComparator;
|
||||
|
||||
/**
|
||||
@ -1070,7 +1071,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
// laptop mode
|
||||
// For now, only do this at startup
|
||||
if (oldIP != null &&
|
||||
System.getProperty("wrapper.version") != null &&
|
||||
SystemVersion.hasWrapper() &&
|
||||
_context.getBooleanProperty(PROP_LAPTOP_MODE) &&
|
||||
now - lastChanged > 10*60*1000 &&
|
||||
_context.router().getUptime() < 10*60*1000) {
|
||||
|
Reference in New Issue
Block a user