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

Fixed crash when setting rate limit

This commit is contained in:
Felix Ableitner 2017-01-23 21:27:22 +09:00
parent b01eb9a877
commit 94bad4c98a

View file

@ -232,18 +232,18 @@ public class SettingsActivity extends SyncthingActivity {
case "listenAddresses": case "listenAddresses":
mOptions.listenAddresses = Iterables.toArray(splitter.split((String) o), String.class); mOptions.listenAddresses = Iterables.toArray(splitter.split((String) o), String.class);
break; break;
case "maxRecvKbps": mOptions.maxRecvKbps = (int) o; break; case "maxRecvKbps": mOptions.maxRecvKbps = Integer.parseInt((String) o); break;
case "maxSendKbps": mOptions.maxRecvKbps = (int) o; break; case "maxSendKbps": mOptions.maxRecvKbps = Integer.parseInt((String) o); break;
case "natEnabled": mOptions.natEnabled = (boolean) o; break; case "natEnabled": mOptions.natEnabled = (boolean) o; break;
case "localAnnounceEnabled": mOptions.localAnnounceEnabled = (boolean) o; break; case "localAnnounceEnabled": mOptions.localAnnounceEnabled = (boolean) o; break;
case "globalAnnounceEnabled": mOptions.globalAnnounceEnabled = (boolean) o; break; case "globalAnnounceEnabled": mOptions.globalAnnounceEnabled = (boolean) o; break;
case "relaysEnabled": mOptions.relaysEnabled = (boolean) o; break; case "relaysEnabled": mOptions.relaysEnabled = (boolean) o; break;
case "globalAnnounceServers": case "globalAnnounceServers":
mOptions.globalAnnounceServers = Iterables.toArray(splitter.split((String) o), String.class); mOptions.globalAnnounceServers = Iterables.toArray(splitter.split((String) o), String.class);
break; break;
case "address": mGui.address = (String) o; break; case "address": mGui.address = (String) o; break;
case "user": mGui.user = (String) o; break; case "user": mGui.user = (String) o; break;
case "password": mGui.password = (String) o; break; case "password": mGui.password = (String) o; break;
case "urAccepted": case "urAccepted":
mOptions.urAccepted = ((boolean) o) mOptions.urAccepted = ((boolean) o)
? Options.USAGE_REPORTING_ACCEPTED ? Options.USAGE_REPORTING_ACCEPTED