By default, sync under all conditions (ref #127).

This is so the user knows *why* syncthing disables itself.
This commit is contained in:
Felix Ableitner 2014-09-24 19:30:48 +03:00
parent 879616a715
commit 33491bb40f
2 changed files with 4 additions and 4 deletions

View File

@ -141,8 +141,8 @@ public class SyncthingService extends Service {
*/ */
public void updateState() { public void updateState() {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
boolean prefStopMobileData = prefs.getBoolean(PREF_SYNC_ONLY_WIFI, true); boolean prefStopMobileData = prefs.getBoolean(PREF_SYNC_ONLY_WIFI, false);
boolean prefStopNotCharging = prefs.getBoolean(PREF_SYNC_ONLY_CHARGING, true); boolean prefStopNotCharging = prefs.getBoolean(PREF_SYNC_ONLY_CHARGING, false);
// Start syncthing. // Start syncthing.
if ((mDeviceStateHolder.isCharging() || !prefStopNotCharging) && if ((mDeviceStateHolder.isCharging() || !prefStopNotCharging) &&

View File

@ -4,12 +4,12 @@
<CheckBoxPreference <CheckBoxPreference
android:key="sync_only_charging" android:key="sync_only_charging"
android:title="@string/sync_only_charging" android:title="@string/sync_only_charging"
android:defaultValue="true" /> android:defaultValue="false" />
<CheckBoxPreference <CheckBoxPreference
android:key="sync_only_wifi" android:key="sync_only_wifi"
android:title="@string/sync_only_wifi" android:title="@string/sync_only_wifi"
android:defaultValue="true" /> android:defaultValue="false" />
<PreferenceScreen <PreferenceScreen
android:key="syncthing_options" android:key="syncthing_options"