|
|
|
@ -21,6 +21,8 @@ package eu.faircode.email;
|
|
|
|
|
|
|
|
|
|
import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
|
|
|
|
|
|
|
|
|
|
import static eu.faircode.email.ServiceAuthenticator.AUTH_TYPE_PASSWORD;
|
|
|
|
|
|
|
|
|
|
import android.app.AlarmManager;
|
|
|
|
|
import android.app.NotificationManager;
|
|
|
|
|
import android.app.PendingIntent;
|
|
|
|
@ -1421,6 +1423,12 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
} else {
|
|
|
|
|
Log.e(ex);
|
|
|
|
|
|
|
|
|
|
// Allow Android account manager to refresh the access token
|
|
|
|
|
if (account.auth_type != AUTH_TYPE_PASSWORD &&
|
|
|
|
|
state.getBackoff() <= CONNECT_BACKOFF_INTERMEDIATE * 60)
|
|
|
|
|
throw ex;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
state.setBackoff(2 * CONNECT_BACKOFF_ALARM_MAX * 60);
|
|
|
|
|
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
|
|
|
|