1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 14:21:16 +00:00

Added incoming rate limit preference.

This commit is contained in:
Felix Ableitner 2014-09-24 18:42:01 +03:00
parent 2363d92f22
commit 875b6b8c8d
2 changed files with 8 additions and 1 deletions

View file

@ -163,7 +163,9 @@ public class SettingsFragment extends PreferenceFragment
// Set the preference value as summary. // Set the preference value as summary.
if (preference instanceof EditTextPreference) { if (preference instanceof EditTextPreference) {
String value = (String) o; String value = (o instanceof String)
? (String) o
: Integer.toString((Integer) o);
preference.setSummary(value); preference.setSummary(value);
} }

View file

@ -21,6 +21,11 @@
android:title="Sync Protocol Listen Addresses" android:title="Sync Protocol Listen Addresses"
android:defaultValue="0.0.0.0:22000" /> android:defaultValue="0.0.0.0:22000" />
<EditTextPreference
android:key="MaxRecvKbps"
android:title="Incoming Rate Limit (KiB/s)"
android:numeric="integer" />
<EditTextPreference <EditTextPreference
android:key="MaxSendKbps" android:key="MaxSendKbps"
android:title="Outgoing Rate Limit (KiB/s)" android:title="Outgoing Rate Limit (KiB/s)"