mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-23 04:41:16 +00:00
Fixed global discovery server setting not working.
This commit is contained in:
parent
530c156a9a
commit
9a587505be
3 changed files with 3 additions and 1 deletions
|
@ -244,7 +244,7 @@ public class SettingsFragment extends PreferenceFragment
|
||||||
((Boolean) o) ? 1 : 0, false, getActivity());
|
((Boolean) o) ? 1 : 0, false, getActivity());
|
||||||
} else if (mOptionsScreen.findPreference(preference.getKey()) != null) {
|
} else if (mOptionsScreen.findPreference(preference.getKey()) != null) {
|
||||||
boolean isArray = preference.getKey().equals("listenAddress") ||
|
boolean isArray = preference.getKey().equals("listenAddress") ||
|
||||||
preference.getKey().equals("globalAnnServers");
|
preference.getKey().equals("globalAnnounceServers");
|
||||||
mSyncthingService.getApi().setValue(RestApi.TYPE_OPTIONS, preference.getKey(), o,
|
mSyncthingService.getApi().setValue(RestApi.TYPE_OPTIONS, preference.getKey(), o,
|
||||||
isArray, getActivity());
|
isArray, getActivity());
|
||||||
} else if (preference.getKey().equals(ADDRESS)) {
|
} else if (preference.getKey().equals(ADDRESS)) {
|
||||||
|
|
|
@ -87,6 +87,7 @@ public class GetTask extends AsyncTask<String, Void, String> {
|
||||||
result += line;
|
result += line;
|
||||||
}
|
}
|
||||||
br.close();
|
br.close();
|
||||||
|
Log.v(TAG, "API call result: " + result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
} catch (IOException|IllegalArgumentException e) {
|
} catch (IOException|IllegalArgumentException e) {
|
||||||
|
|
|
@ -48,6 +48,7 @@ public class PostTask extends AsyncTask<String, Void, Boolean> {
|
||||||
try {
|
try {
|
||||||
if (params.length > 3) {
|
if (params.length > 3) {
|
||||||
post.setEntity(new StringEntity(params[3], HTTP.UTF_8));
|
post.setEntity(new StringEntity(params[3], HTTP.UTF_8));
|
||||||
|
Log.v(TAG, "API call parameters: " + params[3]);
|
||||||
}
|
}
|
||||||
httpclient.execute(post);
|
httpclient.execute(post);
|
||||||
} catch (IOException|IllegalArgumentException e) {
|
} catch (IOException|IllegalArgumentException e) {
|
||||||
|
|
Loading…
Reference in a new issue