mirror of
https://github.com/etesync/android
synced 2024-11-15 12:28:57 +00:00
Don't pop notifications for serviceunavailable errors.
This commit is contained in:
parent
942276284e
commit
09196e52a5
@ -79,6 +79,9 @@ public class CalendarsSyncAdapterService extends SyncAdapterService {
|
||||
CalendarSyncManager syncManager = new CalendarSyncManager(getContext(), account, settings, extras, authority, syncResult, calendar, principal);
|
||||
syncManager.performSync();
|
||||
}
|
||||
} catch (Exceptions.ServiceUnavailableException e) {
|
||||
syncResult.stats.numIoExceptions++;
|
||||
syncResult.delayUntil = (e.retryAfter > 0) ? e.retryAfter : Constants.DEFAULT_RETRY_DELAY;
|
||||
} catch (Exception | OutOfMemoryError e) {
|
||||
if (e instanceof CalendarStorageException || e instanceof SQLiteException) {
|
||||
App.log.log(Level.SEVERE, "Couldn't prepare local calendars", e);
|
||||
|
@ -80,6 +80,9 @@ public class ContactsSyncAdapterService extends SyncAdapterService {
|
||||
}
|
||||
} else
|
||||
App.log.info("No CardDAV service found in DB");
|
||||
} catch (Exceptions.ServiceUnavailableException e) {
|
||||
syncResult.stats.numIoExceptions++;
|
||||
syncResult.delayUntil = (e.retryAfter > 0) ? e.retryAfter : Constants.DEFAULT_RETRY_DELAY;
|
||||
} catch (Exception | OutOfMemoryError e) {
|
||||
String syncPhase = SyncManager.SYNC_PHASE_JOURNALS;
|
||||
String title = getContext().getString(R.string.sync_error_contacts, account.name);
|
||||
|
@ -183,6 +183,7 @@ abstract public class SyncManager {
|
||||
App.log.log(Level.WARNING, "I/O exception during sync, trying again later", e);
|
||||
syncResult.stats.numIoExceptions++;
|
||||
} catch (Exceptions.ServiceUnavailableException e) {
|
||||
syncResult.stats.numIoExceptions++;
|
||||
syncResult.delayUntil = (e.retryAfter > 0) ? e.retryAfter : Constants.DEFAULT_RETRY_DELAY;
|
||||
} catch (InterruptedException e) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user