diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml
index ff7a1c51..2807d5c1 100644
--- a/src/main/AndroidManifest.xml
+++ b/src/main/AndroidManifest.xml
@@ -12,7 +12,6 @@
-
Build.VERSION_CODES.LOLLIPOP && pm.isPowerSaveMode()) {
return false;
}
- else if (!ContentResolver.getMasterSyncAutomatically()) {
- return false;
- }
else if (SyncthingService.alwaysRunInBackground(mContext)) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mContext);
// Check wifi/charging state against preferences and start if ok.
diff --git a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java
index 14bde973..69c5c86c 100644
--- a/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java
+++ b/src/main/java/com/nutomic/syncthingandroid/syncthing/SyncthingService.java
@@ -10,7 +10,6 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
-import android.content.SyncStatusObserver;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Environment;
@@ -129,14 +128,6 @@ public class SyncthingService extends Service implements
private final HashSet mOnApiChangeListeners =
new HashSet<>();
- private Object mSyncStatusHandle;
- private final SyncStatusObserver mSyncStatusObserver = new SyncStatusObserver() {
- @Override
- public void onStatusChanged(int i) {
- updateState();
- }
- };
-
private final BroadcastReceiver mPowerSaveModeChangedReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
@@ -340,8 +331,6 @@ public class SyncthingService extends Service implements
new StartupTask(sp.getString("gui_user",""), sp.getString("gui_password","")).execute();
sp.registerOnSharedPreferenceChangeListener(this);
- mSyncStatusHandle = ContentResolver.addStatusChangeListener(
- ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS, mSyncStatusObserver);
}
/**
@@ -448,7 +437,6 @@ public class SyncthingService extends Service implements
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);
sp.unregisterOnSharedPreferenceChangeListener(this);
- ContentResolver.removeStatusChangeListener(mSyncStatusHandle);
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB)
unregisterReceiver(mPowerSaveModeChangedReceiver);
}