mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-02 13:14:39 +00:00
Retry fetching OAuth tokens
This commit is contained in:
parent
157f5a5c19
commit
523f5a2f29
1 changed files with 4 additions and 1 deletions
|
@ -21,6 +21,8 @@ package eu.faircode.email;
|
||||||
|
|
||||||
import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
|
import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
|
||||||
|
|
||||||
|
import static eu.faircode.email.ServiceAuthenticator.AUTH_TYPE_PASSWORD;
|
||||||
|
|
||||||
import android.app.AlarmManager;
|
import android.app.AlarmManager;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
|
@ -1415,7 +1417,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||||
lastStillHere.setTime(0);
|
lastStillHere.setTime(0);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
// Immediately report auth errors
|
// Immediately report auth errors
|
||||||
if (ex instanceof AuthenticationFailedException) {
|
if (account.auth_type == AUTH_TYPE_PASSWORD &&
|
||||||
|
ex instanceof AuthenticationFailedException) {
|
||||||
if (ConnectionHelper.isIoError(ex)) {
|
if (ConnectionHelper.isIoError(ex)) {
|
||||||
if (!BuildConfig.PLAY_STORE_RELEASE)
|
if (!BuildConfig.PLAY_STORE_RELEASE)
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
|
|
Loading…
Reference in a new issue