* Console: Show unavailable crypto on /logs

* Router: Log warnings for unavailable crypto at startup
This commit is contained in:
zzz
2014-08-30 19:00:57 +00:00
parent 8a7c3390f5
commit fa1c077fdd
6 changed files with 109 additions and 4 deletions

View File

@ -26,6 +26,7 @@ public abstract class SystemVersion {
private static final boolean _oneDotSix;
private static final boolean _oneDotSeven;
private static final boolean _oneDotEight;
private static final int _androidSDK;
static {
@ -60,9 +61,11 @@ public abstract class SystemVersion {
if (_isAndroid) {
_oneDotSix = _androidSDK >= 9;
_oneDotSeven = _androidSDK >= 19;
_oneDotEight = false;
} else {
_oneDotSix = VersionComparator.comp(System.getProperty("java.version"), "1.6") >= 0;
_oneDotSeven = VersionComparator.comp(System.getProperty("java.version"), "1.7") >= 0;
_oneDotSeven = _oneDotSix && VersionComparator.comp(System.getProperty("java.version"), "1.7") >= 0;
_oneDotEight = _oneDotSeven && VersionComparator.comp(System.getProperty("java.version"), "1.8") >= 0;
}
}
@ -127,6 +130,15 @@ public abstract class SystemVersion {
return _oneDotSeven;
}
/**
*
* @return true if Java 1.8 or higher, false for Android.
* @since 0.9.15
*/
public static boolean isJava8() {
return _oneDotEight;
}
/**
* This isn't always correct.
* http://stackoverflow.com/questions/807263/how-do-i-detect-which-kind-of-jre-is-installed-32bit-vs-64bit