1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-23 04:41:16 +00:00

Merge pull request #496 from brianhlin/master

Check if using discovery servers (#488)
This commit is contained in:
Felix Ableitner 2015-11-15 19:14:36 +01:00
commit ecbce403ff

View file

@ -440,9 +440,14 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
SystemInfo si = new SystemInfo();
si.alloc = system.getLong("alloc");
si.cpuPercent = system.getDouble("cpuPercent");
if (system.has("discoveryEnabled")) {
si.extAnnounceTotal = system.getInt("discoveryMethods");
si.extAnnounceConnected =
si.extAnnounceTotal - system.getJSONObject("discoveryErrors").length();
} else {
si.extAnnounceTotal = 0;
si.extAnnounceConnected = 0;
}
si.goroutines = system.getInt("goroutines");
si.myID = system.getString("myID");
si.sys = system.getLong("sys");