diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index ae52cb7d2c..0a20242b7e 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -164,8 +164,6 @@ public class ServiceSynchronize extends LifecycleService { // builder.addCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED); cm.registerNetworkCallback(builder.build(), serviceManager); - registerReceiver(airplaneModeReceiver, new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED)); - DB db = DB.getInstance(this); db.account().liveStats().observe(this, new Observer() { @@ -245,8 +243,6 @@ public class ServiceSynchronize extends LifecycleService { ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); cm.unregisterNetworkCallback(serviceManager); - unregisterReceiver(airplaneModeReceiver); - serviceManager.service_destroy(); Widget.update(this, -1); @@ -2556,16 +2552,6 @@ public class ServiceSynchronize extends LifecycleService { }; } - private BroadcastReceiver airplaneModeReceiver = new BroadcastReceiver() { - @Override - public void onReceive(Context context, Intent intent) { - if (intent.getBooleanExtra("state", true)) // state = airplane mode on - reload(ServiceSynchronize.this, intent.getAction()); - else - EntityLog.log(ServiceSynchronize.this, intent.getAction()); - } - }; - public static void init(Context context) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); if (prefs.getBoolean("enabled", true)) {