forked from github-mirror/CoreProtect
Disable processor information when running on Android
This commit is contained in:
1 parent
65705508c5
commit
e5ec7ede72
1 file changed
+3
@@ -127,6 +127,9 @@ public class Util extends Queue {
|
||||
if (System.getProperty("os.name").startsWith("Windows") && !System.getProperty("sun.arch.data.model").equals("64")) {
|
||||
Class.forName("com.sun.jna.platform.win32.Win32Exception");
|
||||
}
|
||||
else if (System.getProperty("os.name").toLowerCase().contains("android") || System.getProperty("java.runtime.name").toLowerCase().contains("android")) {
|
||||
return null;
|
||||
}
|
||||
Configurator.setLevel("oshi.hardware.common.AbstractCentralProcessor", Level.OFF);
|
||||
SystemInfo systemInfo = new SystemInfo();
|
||||
result = systemInfo.getHardware().getProcessor();
|
||||
|
||||
Reference in new issue
Block a user