Fixed refresh account tokens in some cases

This commit is contained in:
M66B 2022-08-13 14:32:41 +02:00
parent 8c010244e6
commit e528fa3f00
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ public class GmailState {
expiration - ServiceAuthenticator.MIN_FORCE_REFRESH_INTERVAL < now)
needsRefresh = true;
if (needsRefresh) {
if (needsRefresh && token != null) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
String key = "token." + id + "." + user;
long last_refresh = prefs.getLong(key, 0);