Retry fetching OAuth tokens

This commit is contained in:
M66B 2022-01-30 13:33:44 +01:00
parent 157f5a5c19
commit 523f5a2f29
1 changed files with 4 additions and 1 deletions

View File

@ -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;
@ -1415,7 +1417,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
lastStillHere.setTime(0);
} catch (Throwable ex) {
// Immediately report auth errors
if (ex instanceof AuthenticationFailedException) {
if (account.auth_type == AUTH_TYPE_PASSWORD &&
ex instanceof AuthenticationFailedException) {
if (ConnectionHelper.isIoError(ex)) {
if (!BuildConfig.PLAY_STORE_RELEASE)
Log.e(ex);