Suppress connection errors in airplane mode

This commit is contained in:
M66B
2019-05-22 15:44:10 +02:00
parent 1f14c58ae8
commit 0afc34cfb1
2 changed files with 6 additions and 1 deletions

View File

@@ -665,7 +665,7 @@ public class ServiceSynchronize extends LifecycleService {
ConnectionHelper.connect(this, istore, account);
} catch (Throwable ex) {
// Report account connection error
if (account.last_connected != null) {
if (account.last_connected != null && !ConnectionHelper.airplaneMode(this)) {
EntityLog.log(this, account.name + " last connected: " + new Date(account.last_connected));
long now = new Date().getTime();
long delayed = now - account.last_connected - account.poll_interval * 60 * 1000L;